Skip to contentSkip to conversation

media: ite-cir: probe of ITE8708 on ASUS PN50 fails

PATCH In review Sean Young 2 participants 2 messages Apr 8, 2021 – Apr 9, 2021

Subsystems (2)
lore
Share & tools
lore

Sean Young

author maintainer
#0 lore raw

PATCH 1/1 media: ite-cir: probe of ITE8708 on ASUS PN50 fails

The Asus PN50 has 16 byte io region for the ITE8708 in its DSDT, which causes the probe fail. So, accept larger regions.

---
 drivers/media/rc/ite-cir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/rc/ite-cir.c +1 -1
index 9388774df9d7..5bc23e8c6d91 100644
@@ -1333,7 +1333,7 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id
 
 	/* validate pnp resources */
 	if (!pnp_port_valid(pdev, io_rsrc_no) ||
-	    pnp_port_len(pdev, io_rsrc_no) != dev_desc->io_region_size) {
+	    pnp_port_len(pdev, io_rsrc_no) < dev_desc->io_region_size) {
 		dev_err(&pdev->dev, "IR PNP Port not valid!\n");
 		goto exit_free_dev_rdev;
 	}
Signature · 1 line
2.30.2
#1 lore raw

I tested this on 5.11.11.zen1-1 (from arch linux) and it works:
ite_cir: Auto-detected model: ITE8708 CIR transceiver
ite_cir: Using model: ITE8708 CIR transceiver
ite_cir: TX-capable: 1
ite_cir: Sample period (ns): 8680
ite_cir: TX carrier frequency (Hz): 38000
ite_cir: TX duty cycle (%): 33
ite_cir: RX low carrier frequency (Hz): 0
ite_cir: RX high carrier frequency (Hz): 0

Thanks :)

Quoted 28 lines · Sean Young

The Asus PN50 has 16 byte io region for the ITE8708 in its DSDT, which causes the probe fail. So, accept larger regions.

---
 drivers/media/rc/ite-cir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/rc/ite-cir.c +1 -2
index 9388774df9d7..5bc23e8c6d91 100644
@@ -1333,7 +1333,7 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id
 
        /* validate pnp resources */
        if (!pnp_port_valid(pdev, io_rsrc_no) ||
-           pnp_port_len(pdev, io_rsrc_no) != dev_desc->io_region_size) {
+           pnp_port_len(pdev, io_rsrc_no) < dev_desc->io_region_size) {
                dev_err(&pdev->dev, "IR PNP Port not valid!\n");
                goto exit_free_dev_rdev;
        }
--

2.30.2