diff options
Diffstat (limited to 'drivers/media/rc/ite-cir.c')
-rw-r--r-- | drivers/media/rc/ite-cir.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c index e716b931cf7e..ecd3d0280768 100644 --- a/drivers/media/rc/ite-cir.c +++ b/drivers/media/rc/ite-cir.c | |||
@@ -1347,6 +1347,7 @@ static const struct ite_dev_params ite_dev_descs[] = { | |||
1347 | { /* 0: ITE8704 */ | 1347 | { /* 0: ITE8704 */ |
1348 | .model = "ITE8704 CIR transceiver", | 1348 | .model = "ITE8704 CIR transceiver", |
1349 | .io_region_size = IT87_IOREG_LENGTH, | 1349 | .io_region_size = IT87_IOREG_LENGTH, |
1350 | .io_rsrc_no = 0, | ||
1350 | .hw_tx_capable = true, | 1351 | .hw_tx_capable = true, |
1351 | .sample_period = (u32) (1000000000ULL / 115200), | 1352 | .sample_period = (u32) (1000000000ULL / 115200), |
1352 | .tx_carrier_freq = 38000, | 1353 | .tx_carrier_freq = 38000, |
@@ -1371,6 +1372,7 @@ static const struct ite_dev_params ite_dev_descs[] = { | |||
1371 | { /* 1: ITE8713 */ | 1372 | { /* 1: ITE8713 */ |
1372 | .model = "ITE8713 CIR transceiver", | 1373 | .model = "ITE8713 CIR transceiver", |
1373 | .io_region_size = IT87_IOREG_LENGTH, | 1374 | .io_region_size = IT87_IOREG_LENGTH, |
1375 | .io_rsrc_no = 0, | ||
1374 | .hw_tx_capable = true, | 1376 | .hw_tx_capable = true, |
1375 | .sample_period = (u32) (1000000000ULL / 115200), | 1377 | .sample_period = (u32) (1000000000ULL / 115200), |
1376 | .tx_carrier_freq = 38000, | 1378 | .tx_carrier_freq = 38000, |
@@ -1395,6 +1397,7 @@ static const struct ite_dev_params ite_dev_descs[] = { | |||
1395 | { /* 2: ITE8708 */ | 1397 | { /* 2: ITE8708 */ |
1396 | .model = "ITE8708 CIR transceiver", | 1398 | .model = "ITE8708 CIR transceiver", |
1397 | .io_region_size = IT8708_IOREG_LENGTH, | 1399 | .io_region_size = IT8708_IOREG_LENGTH, |
1400 | .io_rsrc_no = 0, | ||
1398 | .hw_tx_capable = true, | 1401 | .hw_tx_capable = true, |
1399 | .sample_period = (u32) (1000000000ULL / 115200), | 1402 | .sample_period = (u32) (1000000000ULL / 115200), |
1400 | .tx_carrier_freq = 38000, | 1403 | .tx_carrier_freq = 38000, |
@@ -1420,6 +1423,7 @@ static const struct ite_dev_params ite_dev_descs[] = { | |||
1420 | { /* 3: ITE8709 */ | 1423 | { /* 3: ITE8709 */ |
1421 | .model = "ITE8709 CIR transceiver", | 1424 | .model = "ITE8709 CIR transceiver", |
1422 | .io_region_size = IT8709_IOREG_LENGTH, | 1425 | .io_region_size = IT8709_IOREG_LENGTH, |
1426 | .io_rsrc_no = 2, | ||
1423 | .hw_tx_capable = true, | 1427 | .hw_tx_capable = true, |
1424 | .sample_period = (u32) (1000000000ULL / 115200), | 1428 | .sample_period = (u32) (1000000000ULL / 115200), |
1425 | .tx_carrier_freq = 38000, | 1429 | .tx_carrier_freq = 38000, |
@@ -1461,6 +1465,7 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id | |||
1461 | struct rc_dev *rdev = NULL; | 1465 | struct rc_dev *rdev = NULL; |
1462 | int ret = -ENOMEM; | 1466 | int ret = -ENOMEM; |
1463 | int model_no; | 1467 | int model_no; |
1468 | int io_rsrc_no; | ||
1464 | 1469 | ||
1465 | ite_dbg("%s called", __func__); | 1470 | ite_dbg("%s called", __func__); |
1466 | 1471 | ||
@@ -1490,10 +1495,11 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id | |||
1490 | 1495 | ||
1491 | /* get the description for the device */ | 1496 | /* get the description for the device */ |
1492 | dev_desc = &ite_dev_descs[model_no]; | 1497 | dev_desc = &ite_dev_descs[model_no]; |
1498 | io_rsrc_no = dev_desc->io_rsrc_no; | ||
1493 | 1499 | ||
1494 | /* validate pnp resources */ | 1500 | /* validate pnp resources */ |
1495 | if (!pnp_port_valid(pdev, 0) || | 1501 | if (!pnp_port_valid(pdev, io_rsrc_no) || |
1496 | pnp_port_len(pdev, 0) != dev_desc->io_region_size) { | 1502 | pnp_port_len(pdev, io_rsrc_no) != dev_desc->io_region_size) { |
1497 | dev_err(&pdev->dev, "IR PNP Port not valid!\n"); | 1503 | dev_err(&pdev->dev, "IR PNP Port not valid!\n"); |
1498 | goto failure; | 1504 | goto failure; |
1499 | } | 1505 | } |
@@ -1504,7 +1510,7 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id | |||
1504 | } | 1510 | } |
1505 | 1511 | ||
1506 | /* store resource values */ | 1512 | /* store resource values */ |
1507 | itdev->cir_addr = pnp_port_start(pdev, 0); | 1513 | itdev->cir_addr = pnp_port_start(pdev, io_rsrc_no); |
1508 | itdev->cir_irq = pnp_irq(pdev, 0); | 1514 | itdev->cir_irq = pnp_irq(pdev, 0); |
1509 | 1515 | ||
1510 | /* initialize spinlocks */ | 1516 | /* initialize spinlocks */ |