Skip to content

Commit

Permalink
driver: デバイスの内部名称を変更
Browse files Browse the repository at this point in the history
ISDB6014 -> ISDB6014_4TS
デバイス名は変更なし
  • Loading branch information
nns779 committed Dec 23, 2020
1 parent 77ad6c4 commit 0d0d369
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
6 changes: 3 additions & 3 deletions driver/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PX4_USB_MAX_DEVICE := 0
PXMLT5_USB_MAX_DEVICE := 0
PXMLT8_USB_MAX_DEVICE := 0
ISDB2056_USB_MAX_DEVICE := 0
ISDB6014_USB_MAX_DEVICE := 0
ISDB6014_4TS_USB_MAX_DEVICE := 0
PSB_DEBUG := 0
ITEDTV_BUS_USE_WORKQUEUE := 0

Expand All @@ -28,8 +28,8 @@ endif
ifneq ($(ISDB2056_USB_MAX_DEVICE),0)
ccflags-y += -DISDB2056_USB_MAX_DEVICE=$(ISDB2056_USB_MAX_DEVICE)
endif
ifneq ($(ISDB6014_USB_MAX_DEVICE),0)
ccflags-y += -DISDB6014_USB_MAX_DEVICE=$(ISDB6014_USB_MAX_DEVICE)
ifneq ($(ISDB6014_4TS_USB_MAX_DEVICE),0)
ccflags-y += -DISDB6014_4TS_USB_MAX_DEVICE=$(ISDB6014_4TS_USB_MAX_DEVICE)
endif
ifneq ($(PSB_DEBUG),0)
ccflags-y += -DPSB_DEBUG
Expand Down
28 changes: 14 additions & 14 deletions driver/px4_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
#endif
#define ISDB2056_USB_MAX_CHRDEV (ISDB2056_USB_MAX_DEVICE * ISDB2056_CHRDEV_NUM)

#ifndef ISDB6014_USB_MAX_DEVICE
#define ISDB6014_USB_MAX_DEVICE 16
#ifndef ISDB6014_4TS_USB_MAX_DEVICE
#define ISDB6014_4TS_USB_MAX_DEVICE 16
#endif
#define ISDB6014_USB_MAX_CHRDEV (ISDB6014_USB_MAX_DEVICE * ISDB6014_CHRDEV_NUM)
#define ISDB6014_4TS_USB_MAX_CHRDEV (ISDB6014_4TS_USB_MAX_DEVICE * ISDB6014_4TS_CHRDEV_NUM)

struct px4_usb_context {
enum px4_usb_device_type type;
Expand Down Expand Up @@ -170,15 +170,15 @@ static int px4_usb_probe(struct usb_interface *intf,
&ctx->quit_completion);
break;

case USB_PID_DIGIBEST_ISDB6014:
case USB_PID_DIGIBEST_ISDB6014_4TS:
ret = px4_usb_init_bridge(dev, usb_dev,
&ctx->ctx.pxmlt.it930x);
if (ret)
break;

ctx->type = ISDB6014_USB_DEVICE;
ret = pxmlt_device_init(&ctx->ctx.pxmlt, dev, ISDB6014_MODEL,
px4_usb_chrdev_ctx[ISDB6014_USB_DEVICE],
ctx->type = ISDB6014_4TS_USB_DEVICE;
ret = pxmlt_device_init(&ctx->ctx.pxmlt, dev, ISDB6014_4TS_MODEL,
px4_usb_chrdev_ctx[ISDB6014_4TS_USB_DEVICE],
&ctx->quit_completion);
break;

Expand Down Expand Up @@ -230,7 +230,7 @@ static void px4_usb_disconnect(struct usb_interface *intf)

case PXMLT5_USB_DEVICE:
case PXMLT8_USB_DEVICE:
case ISDB6014_USB_DEVICE:
case ISDB6014_4TS_USB_DEVICE:
pxmlt_device_term(&ctx->ctx.pxmlt);
wait_for_completion(&ctx->quit_completion);
break;
Expand Down Expand Up @@ -274,7 +274,7 @@ static const struct usb_device_id px4_usb_ids[] = {
{ USB_DEVICE(0x0511, USB_PID_PX_MLT8PE3) },
{ USB_DEVICE(0x0511, USB_PID_PX_MLT8PE5) },
{ USB_DEVICE(0x0511, USB_PID_DIGIBEST_ISDB2056) },
{ USB_DEVICE(0x0511, USB_PID_DIGIBEST_ISDB6014) },
{ USB_DEVICE(0x0511, USB_PID_DIGIBEST_ISDB6014_4TS) },
{ 0 }
};

Expand All @@ -297,7 +297,7 @@ int px4_usb_register()
pr_debug("px4_usb_register: PXMLT5_USB_MAX_DEVICE: %d\n", PXMLT5_USB_MAX_DEVICE);
pr_debug("px4_usb_register: PXMLT8_USB_MAX_DEVICE: %d\n", PXMLT8_USB_MAX_DEVICE);
pr_debug("px4_usb_register: ISDB2056_USB_MAX_DEVICE: %d\n", ISDB2056_USB_MAX_DEVICE);
pr_debug("px4_usb_register: ISDB6014_USB_MAX_DEVICE: %d\n", ISDB6014_USB_MAX_DEVICE);
pr_debug("px4_usb_register: ISDB6014_4TS_USB_MAX_DEVICE: %d\n", ISDB6014_4TS_USB_MAX_DEVICE);

memset(&px4_usb_chrdev_ctx, 0, sizeof(px4_usb_chrdev_ctx));

Expand Down Expand Up @@ -334,8 +334,8 @@ int px4_usb_register()
}

ret = ptx_chrdev_context_create("isdb6014", "isdb6014video",
ISDB6014_USB_MAX_CHRDEV,
&px4_usb_chrdev_ctx[ISDB6014_USB_DEVICE]);
ISDB6014_4TS_USB_MAX_CHRDEV,
&px4_usb_chrdev_ctx[ISDB6014_4TS_USB_DEVICE]);
if (ret) {
pr_err("px4_usb_register: ptx_chrdev_context_create(\"isdb6014\") failed.\n");
goto fail_isdb6014;
Expand All @@ -350,7 +350,7 @@ int px4_usb_register()
return 0;

fail_usb:
ptx_chrdev_context_destroy(px4_usb_chrdev_ctx[ISDB6014_USB_DEVICE]);
ptx_chrdev_context_destroy(px4_usb_chrdev_ctx[ISDB6014_4TS_USB_DEVICE]);

fail_isdb6014:
ptx_chrdev_context_destroy(px4_usb_chrdev_ctx[ISDB2056_USB_DEVICE]);
Expand All @@ -371,7 +371,7 @@ int px4_usb_register()
void px4_usb_unregister()
{
usb_deregister(&px4_usb_driver);
ptx_chrdev_context_destroy(px4_usb_chrdev_ctx[ISDB6014_USB_DEVICE]);
ptx_chrdev_context_destroy(px4_usb_chrdev_ctx[ISDB6014_4TS_USB_DEVICE]);
ptx_chrdev_context_destroy(px4_usb_chrdev_ctx[ISDB2056_USB_DEVICE]);
ptx_chrdev_context_destroy(px4_usb_chrdev_ctx[PXMLT8_USB_DEVICE]);
ptx_chrdev_context_destroy(px4_usb_chrdev_ctx[PXMLT5_USB_DEVICE]);
Expand Down
4 changes: 2 additions & 2 deletions driver/px4_usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
#define USB_PID_PX_MLT8PE3 0x0252
#define USB_PID_PX_MLT8PE5 0x0253
#define USB_PID_DIGIBEST_ISDB2056 0x004b
#define USB_PID_DIGIBEST_ISDB6014 0x0254
#define USB_PID_DIGIBEST_ISDB6014_4TS 0x0254

enum px4_usb_device_type {
UNKNOWN_USB_DEVICE = 0,
PX4_USB_DEVICE,
PXMLT5_USB_DEVICE,
PXMLT8_USB_DEVICE,
ISDB2056_USB_DEVICE,
ISDB6014_USB_DEVICE
ISDB6014_4TS_USB_DEVICE
};

int px4_usb_register(void);
Expand Down
4 changes: 2 additions & 2 deletions driver/pxmlt_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ static const struct {
{ { 0x65, 3, 0 }, { 0x6c, 3, 3 }, { 0x64, 3, 4 }, { 0x00, 0, 1 }, { 0x00, 0, 2 } },
/* PX-MLT8PE5 */
{ { 0x65, 1, 0 }, { 0x64, 1, 1 }, { 0x6c, 1, 2 }, { 0x6c, 3, 3 }, { 0x64, 3, 4 } },
/* ISDB6014 */
/* ISDB6014 V2.0 (4TS) */
{ { 0x65, 3, 0 }, { 0x6c, 1, 1 }, { 0x64, 1, 2 }, { 0x64, 3, 4 }, { 0x00, 0, 3 } }
};

Expand Down Expand Up @@ -956,7 +956,7 @@ int pxmlt_device_init(struct pxmlt_device *pxmlt, struct device *dev,
pxmlt->chrdevm_num = 3;
break;

case ISDB6014_MODEL:
case ISDB6014_4TS_MODEL:
pxmlt->chrdevm_num = 4;
break;

Expand Down
4 changes: 2 additions & 2 deletions driver/pxmlt_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@

#define PXMLT5_CHRDEV_NUM 5
#define PXMLT8_CHRDEV_NUM 8
#define ISDB6014_CHRDEV_NUM 4
#define ISDB6014_4TS_CHRDEV_NUM 4

enum pxmlt_model {
PXMLT5PE_MODEL = 0,
PXMLT8PE3_MODEL,
PXMLT8PE5_MODEL,
ISDB6014_MODEL
ISDB6014_4TS_MODEL
};

struct pxmlt_device;
Expand Down

0 comments on commit 0d0d369

Please sign in to comment.