From: Sean Young <sean@mess.org>
To: Nikolaos Beredimas <beredim@gmail.com>
Cc: linux-media@vger.kernel.org
Subject: Re: Revisiting ITE8708 on ASUS PN50 uses a 16 byte io region
Date: Thu, 18 Mar 2021 09:48:36 +0000 [thread overview]
Message-ID: <20210318094836.GA31678@gofer.mess.org> (raw)
In-Reply-To: <CAMbLOeCCwrfoGvaV4vWPfF7tHnE-b4sFUNmK8v=ekRZAtjA-4w@mail.gmail.com>
Hi Nikolaos,
On Wed, Mar 17, 2021 at 04:41:15PM +0200, Nikolaos Beredimas wrote:
> Hi,
> There was a thread on this list last September
> https://www.spinics.net/lists/linux-media/msg177724.html
> about the IR module on the ASUS PN50.
>
> Even though that discussion never fully resolved,
> it did contain the solution to get the IR working on the PN50.
> I have documented this at
> https://forum.libreelec.tv/thread/23145-asus-pn50-challenge/?postID=152207#post152207
>
> So, what I had to do is edit a single line of drivers/media/rc/ite-cir.h
> and change IT8708_IOREG_LENGTH 0x08 to IT8708_IOREG_LENGTH 0x10
> and the IR module is now recognized and working
>
> How do I go about submitting this as a patch?
> I am a little overwhelmed honestly.
> Do I follow https://www.linuxtv.org/wiki/index.php/Development:_How_to_submit_patches
> ?
> And which git tree?
Thanks for fixing this. The patch should be a diff against
https://git.linuxtv.org/media_tree.git/
This is the guide for submitting patches:
https://www.kernel.org/doc/html/latest/process/submitting-patches.html
>
> --- a/drivers/media/rc/ite-cir.h
> +++ b/drivers/media/rc/ite-cir.h
> @@ -406,7 +406,7 @@
> #define IT8708_C0WCR 0x06 /* wakeup code read/write register */
> #define IT8708_C0WPS 0x07 /* wakeup power control/status register */
>
> -#define IT8708_IOREG_LENGTH 0x08 /* length of register file */
> +#define IT8708_IOREG_LENGTH 0x10 /* length of register file */
I don't think this is correct though. There are other devices that have
length of 8; I think the correct solution.
I think:
if (!pnp_port_valid(pdev, io_rsrc_no) ||
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;
}
should be changed to:
if (!pnp_port_valid(pdev, io_rsrc_no) ||
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;
}
Thanks
>
> /* two more registers that are defined in the hacked driver, but can't be
> * found in the data sheets; no idea what they are or how they are accessed,
next prev parent reply other threads:[~2021-03-18 9:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-17 14:41 Revisiting ITE8708 on ASUS PN50 uses a 16 byte io region Nikolaos Beredimas
2021-03-18 9:48 ` Sean Young [this message]
2021-03-19 21:50 ` Nikolaos Beredimas
[not found] ` <CAHp75VdQw=2J090w77bJVAY0UOyj1UcerZNDqyz_9dawVmK=-A@mail.gmail.com>
2021-03-20 21:58 ` Nikolaos Beredimas
2021-03-20 22:06 ` Sean Young
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210318094836.GA31678@gofer.mess.org \
--to=sean@mess.org \
--cc=beredim@gmail.com \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox