diff mbox series

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

Message ID 20210408084407.21828-1-sean@mess.org (mailing list archive)
State New
Headers show
Series media: ite-cir: probe of ITE8708 on ASUS PN50 fails | expand

Commit Message

Sean Young April 8, 2021, 8:44 a.m. UTC
The Asus PN50 has 16 byte io region for the ITE8708 in its DSDT, which
causes the probe fail. So, accept larger regions.

Link: https://www.spinics.net/lists/linux-media/msg177725.html
Cc: Nikolaos Beredimas <beredim@gmail.com>
Reported-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
---
 drivers/media/rc/ite-cir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Zimmermann April 9, 2021, 6:55 a.m. UTC | #1
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 :)

On Thu, Apr 8, 2021 at 10:44 AM Sean Young <sean@mess.org> wrote:
>
> The Asus PN50 has 16 byte io region for the ITE8708 in its DSDT, which
> causes the probe fail. So, accept larger regions.
>
> Link: https://www.spinics.net/lists/linux-media/msg177725.html
> Cc: Nikolaos Beredimas <beredim@gmail.com>
> Reported-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
> Signed-off-by: Sean Young <sean@mess.org>
> ---
>  drivers/media/rc/ite-cir.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
> index 9388774df9d7..5bc23e8c6d91 100644
> --- a/drivers/media/rc/ite-cir.c
> +++ b/drivers/media/rc/ite-cir.c
> @@ -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
>
diff mbox series

Patch

diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
index 9388774df9d7..5bc23e8c6d91 100644
--- a/drivers/media/rc/ite-cir.c
+++ b/drivers/media/rc/ite-cir.c
@@ -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;
 	}