All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: ite-cir: probe of ITE8708 on ASUS PN50 fails
@ 2021-04-08  8:44 Sean Young
  2021-04-09  6:55 ` Michael Zimmermann
  0 siblings, 1 reply; 2+ messages in thread
From: Sean Young @ 2021-04-08  8:44 UTC (permalink / raw)
  To: linux-media; +Cc: Nikolaos Beredimas, Michael Zimmermann

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] media: ite-cir: probe of ITE8708 on ASUS PN50 fails
  2021-04-08  8:44 [PATCH] media: ite-cir: probe of ITE8708 on ASUS PN50 fails Sean Young
@ 2021-04-09  6:55 ` Michael Zimmermann
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Zimmermann @ 2021-04-09  6:55 UTC (permalink / raw)
  To: Sean Young; +Cc: linux-media, Nikolaos Beredimas

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
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-09  6:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08  8:44 [PATCH] media: ite-cir: probe of ITE8708 on ASUS PN50 fails Sean Young
2021-04-09  6:55 ` Michael Zimmermann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.