Message ID | 20230703185222.50554-1-andriy.shevchenko@linux.intel.com (mailing list archive) |
---|---|
Headers | show |
Series | HID: cp2112: Cleanups and refactorings | expand |
On Mon, Jul 03, 2023 at 09:52:10PM +0300, Andy Shevchenko wrote: > After I updated GPIO library for the case Benjamin has with CP2112, > I have a brief look into the CP2112 driver itself. > > From GPIO perspective it has two main (maitenance) issues: > - usage of ->to_irq() with IRQ chip present; > - having IRQ chip not immutable. > > Besides that there are plenty small cleanups here and there. > Hence this series. Any comments on this?
On Thu, Jul 27, 2023 at 09:43:29PM +0300, Andy Shevchenko wrote: > On Mon, Jul 03, 2023 at 09:52:10PM +0300, Andy Shevchenko wrote: > > After I updated GPIO library for the case Benjamin has with CP2112, > > I have a brief look into the CP2112 driver itself. > > > > From GPIO perspective it has two main (maitenance) issues: > > - usage of ->to_irq() with IRQ chip present; > > - having IRQ chip not immutable. > > > > Besides that there are plenty small cleanups here and there. > > Hence this series. > > Any comments on this? Gentle ping^2 for this... Anything should I do to improve it or is it okay to go as is?
On Fri, 4 Aug 2023, Andy Shevchenko wrote: > On Thu, Jul 27, 2023 at 09:43:29PM +0300, Andy Shevchenko wrote: > > On Mon, Jul 03, 2023 at 09:52:10PM +0300, Andy Shevchenko wrote: > > > After I updated GPIO library for the case Benjamin has with CP2112, > > > I have a brief look into the CP2112 driver itself. > > > > > > From GPIO perspective it has two main (maitenance) issues: > > > - usage of ->to_irq() with IRQ chip present; > > > - having IRQ chip not immutable. > > > > > > Besides that there are plenty small cleanups here and there. > > > Hence this series. > > > > Any comments on this? > > Gentle ping^2 for this... > > Anything should I do to improve it or is it okay to go as is? I have been off pretty much the whole July. I am now back and slowly making my way through everything that accumulated, I will eventually get to this. Thanks for the patience,
On Mon, Aug 07, 2023 at 01:19:54PM +0200, Jiri Kosina wrote: > On Fri, 4 Aug 2023, Andy Shevchenko wrote: > > On Thu, Jul 27, 2023 at 09:43:29PM +0300, Andy Shevchenko wrote: > > > On Mon, Jul 03, 2023 at 09:52:10PM +0300, Andy Shevchenko wrote: > > > > After I updated GPIO library for the case Benjamin has with CP2112, > > > > I have a brief look into the CP2112 driver itself. > > > > > > > > From GPIO perspective it has two main (maitenance) issues: > > > > - usage of ->to_irq() with IRQ chip present; > > > > - having IRQ chip not immutable. > > > > > > > > Besides that there are plenty small cleanups here and there. > > > > Hence this series. > > > > > > Any comments on this? > > > > Gentle ping^2 for this... > > > > Anything should I do to improve it or is it okay to go as is? > > I have been off pretty much the whole July. I am now back and slowly > making my way through everything that accumulated, I will eventually get > to this. > > Thanks for the patience, Ah, okay, no worries and take your time! I was thinking more on Benjamin's answer as last time he had a hw setup to test... Not sure what the status of that now and if he has a chance to test this or busy enough with something else.
On Mon, 7 Aug 2023, Andy Shevchenko wrote: > > > > > After I updated GPIO library for the case Benjamin has with CP2112, > > > > > I have a brief look into the CP2112 driver itself. > > > > > > > > > > From GPIO perspective it has two main (maitenance) issues: > > > > > - usage of ->to_irq() with IRQ chip present; > > > > > - having IRQ chip not immutable. > > > > > > > > > > Besides that there are plenty small cleanups here and there. > > > > > Hence this series. > > > > > > > > Any comments on this? > > > > > > Gentle ping^2 for this... > > > > > > Anything should I do to improve it or is it okay to go as is? > > > > I have been off pretty much the whole July. I am now back and slowly > > making my way through everything that accumulated, I will eventually get > > to this. > > > > Thanks for the patience, > > Ah, okay, no worries and take your time! > > I was thinking more on Benjamin's answer as last time he had a hw setup > to test... Not sure what the status of that now and if he has a chance > to test this or busy enough with something else. Ah, that would be of course nice. Benjamin? Thanks,
On Mon, Aug 14, 2023 at 11:28:58AM +0200, Jiri Kosina wrote: > On Mon, 7 Aug 2023, Andy Shevchenko wrote: ... > > > > > > After I updated GPIO library for the case Benjamin has with CP2112, > > > > > > I have a brief look into the CP2112 driver itself. > > > > > > > > > > > > From GPIO perspective it has two main (maitenance) issues: > > > > > > - usage of ->to_irq() with IRQ chip present; > > > > > > - having IRQ chip not immutable. > > > > > > > > > > > > Besides that there are plenty small cleanups here and there. > > > > > > Hence this series. > > > > > > > > > > Any comments on this? > > > > > > > > Gentle ping^2 for this... > > > > > > > > Anything should I do to improve it or is it okay to go as is? > > > > > > I have been off pretty much the whole July. I am now back and slowly > > > making my way through everything that accumulated, I will eventually get > > > to this. > > > > > > Thanks for the patience, > > > > Ah, okay, no worries and take your time! > > > > I was thinking more on Benjamin's answer as last time he had a hw setup > > to test... Not sure what the status of that now and if he has a chance > > to test this or busy enough with something else. > > Ah, that would be of course nice. Benjamin? Benjamin? It almost full release cycle passed... I understand if you are busy with something, just tell us.
On Aug 21 2023, Andy Shevchenko wrote: > On Mon, Aug 14, 2023 at 11:28:58AM +0200, Jiri Kosina wrote: > > On Mon, 7 Aug 2023, Andy Shevchenko wrote: > > ... > > > > > > > > After I updated GPIO library for the case Benjamin has with CP2112, > > > > > > > I have a brief look into the CP2112 driver itself. > > > > > > > > > > > > > > From GPIO perspective it has two main (maitenance) issues: > > > > > > > - usage of ->to_irq() with IRQ chip present; > > > > > > > - having IRQ chip not immutable. > > > > > > > > > > > > > > Besides that there are plenty small cleanups here and there. > > > > > > > Hence this series. > > > > > > > > > > > > Any comments on this? > > > > > > > > > > Gentle ping^2 for this... > > > > > > > > > > Anything should I do to improve it or is it okay to go as is? > > > > > > > > I have been off pretty much the whole July. I am now back and slowly > > > > making my way through everything that accumulated, I will eventually get > > > > to this. > > > > > > > > Thanks for the patience, > > > > > > Ah, okay, no worries and take your time! > > > > > > I was thinking more on Benjamin's answer as last time he had a hw setup > > > to test... Not sure what the status of that now and if he has a chance > > > to test this or busy enough with something else. > > > > Ah, that would be of course nice. Benjamin? > > Benjamin? It almost full release cycle passed... > I understand if you are busy with something, just tell us. Sorry for not answering, I was off in August until just now. I tried you series just before taking time off, but the problem was that my automation relies on this driver to not be too far from the current upstream, as I need to patch it to be able to inject a node child in it. Which is why I was very interested in the ACPI/DT work so that I do not have to patch the driver. Long story short, I'm not able to test it right now (and I got quite some backlog as you can imagine). IIRC the code was fine, so I think we can just take the series as is, and work on the quirks (if any) later. Cheers, Benjamin
On Mon, Aug 21, 2023 at 10:51:04AM +0200, Benjamin Tissoires wrote: > On Aug 21 2023, Andy Shevchenko wrote: > > On Mon, Aug 14, 2023 at 11:28:58AM +0200, Jiri Kosina wrote: > > > On Mon, 7 Aug 2023, Andy Shevchenko wrote: ... > > > > > > > > After I updated GPIO library for the case Benjamin has with CP2112, > > > > > > > > I have a brief look into the CP2112 driver itself. > > > > > > > > > > > > > > > > From GPIO perspective it has two main (maitenance) issues: > > > > > > > > - usage of ->to_irq() with IRQ chip present; > > > > > > > > - having IRQ chip not immutable. > > > > > > > > > > > > > > > > Besides that there are plenty small cleanups here and there. > > > > > > > > Hence this series. > > > > > > > > > > > > > > Any comments on this? > > > > > > > > > > > > Gentle ping^2 for this... > > > > > > > > > > > > Anything should I do to improve it or is it okay to go as is? > > > > > > > > > > I have been off pretty much the whole July. I am now back and slowly > > > > > making my way through everything that accumulated, I will eventually get > > > > > to this. > > > > > > > > > > Thanks for the patience, > > > > > > > > Ah, okay, no worries and take your time! > > > > > > > > I was thinking more on Benjamin's answer as last time he had a hw setup > > > > to test... Not sure what the status of that now and if he has a chance > > > > to test this or busy enough with something else. > > > > > > Ah, that would be of course nice. Benjamin? > > > > Benjamin? It almost full release cycle passed... > > I understand if you are busy with something, just tell us. > > Sorry for not answering, I was off in August until just now. > > I tried you series just before taking time off, but the problem was that > my automation relies on this driver to not be too far from the current > upstream, as I need to patch it to be able to inject a node child in it. > > Which is why I was very interested in the ACPI/DT work so that I do not > have to patch the driver. > > Long story short, I'm not able to test it right now (and I got quite > some backlog as you can imagine). IIRC the code was fine, so I think we > can just take the series as is, and work on the quirks (if any) later. Thank you! The thing that might be broken is interrupts handling. If that works, I'm pretty confident with the rest.
On Mon, Aug 21, 2023 at 12:34:30PM +0300, Andy Shevchenko wrote: > On Mon, Aug 21, 2023 at 10:51:04AM +0200, Benjamin Tissoires wrote: > > On Aug 21 2023, Andy Shevchenko wrote: ... > > Long story short, I'm not able to test it right now (and I got quite > > some backlog as you can imagine). IIRC the code was fine, so I think we > > can just take the series as is, and work on the quirks (if any) later. > > Thank you! > > The thing that might be broken is interrupts handling. If that works, > I'm pretty confident with the rest. I.o.w. first 5 patches to test is already 98% of guarantee that everything is fine.
On Mon, Aug 21, 2023 at 11:35 AM Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > > On Mon, Aug 21, 2023 at 12:34:30PM +0300, Andy Shevchenko wrote: > > On Mon, Aug 21, 2023 at 10:51:04AM +0200, Benjamin Tissoires wrote: > > > On Aug 21 2023, Andy Shevchenko wrote: > > ... > > > > Long story short, I'm not able to test it right now (and I got quite > > > some backlog as you can imagine). IIRC the code was fine, so I think we > > > can just take the series as is, and work on the quirks (if any) later. > > > > Thank you! > > > > The thing that might be broken is interrupts handling. If that works, > > I'm pretty confident with the rest. > > I.o.w. first 5 patches to test is already 98% of guarantee that everything > is fine. Actually I applied you series locally, and applied Danny's patches on top, and I could run your series in qemu with the cp2112 as USB passthrough. Everything is working fine, so I can take this one just now. Cheers, Benjamin > > -- > With Best Regards, > Andy Shevchenko > >
On Mon, Aug 21, 2023 at 12:19 PM Benjamin Tissoires <benjamin.tissoires@redhat.com> wrote: > > On Mon, Aug 21, 2023 at 11:35 AM Andy Shevchenko > <andriy.shevchenko@linux.intel.com> wrote: > > > > On Mon, Aug 21, 2023 at 12:34:30PM +0300, Andy Shevchenko wrote: > > > On Mon, Aug 21, 2023 at 10:51:04AM +0200, Benjamin Tissoires wrote: > > > > On Aug 21 2023, Andy Shevchenko wrote: > > > > ... > > > > > > Long story short, I'm not able to test it right now (and I got quite > > > > some backlog as you can imagine). IIRC the code was fine, so I think we > > > > can just take the series as is, and work on the quirks (if any) later. > > > > > > Thank you! > > > > > > The thing that might be broken is interrupts handling. If that works, > > > I'm pretty confident with the rest. > > > > I.o.w. first 5 patches to test is already 98% of guarantee that everything > > is fine. > > Actually I applied you series locally, and applied Danny's patches on > top, and I could run your series in qemu with the cp2112 as USB > passthrough. > > Everything is working fine, so I can take this one just now. I've pushed the series to for-6.6/cp2112, but for some reasons, b4 doesn't seem to believe the series is the one you submitted. Would you mind double checking on your side if everything is good? https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/log/?h=for-6.6/cp2112 Cheers, Benjamin > > Cheers, > Benjamin > > > > > -- > > With Best Regards, > > Andy Shevchenko > > > >
On Mon, Aug 21, 2023 at 12:19:39PM +0200, Benjamin Tissoires wrote: > On Mon, Aug 21, 2023 at 11:35 AM Andy Shevchenko > <andriy.shevchenko@linux.intel.com> wrote: > > On Mon, Aug 21, 2023 at 12:34:30PM +0300, Andy Shevchenko wrote: > > > On Mon, Aug 21, 2023 at 10:51:04AM +0200, Benjamin Tissoires wrote: > > > > On Aug 21 2023, Andy Shevchenko wrote: ... > > > > Long story short, I'm not able to test it right now (and I got quite > > > > some backlog as you can imagine). IIRC the code was fine, so I think we > > > > can just take the series as is, and work on the quirks (if any) later. > > > > > > Thank you! > > > > > > The thing that might be broken is interrupts handling. If that works, > > > I'm pretty confident with the rest. > > > > I.o.w. first 5 patches to test is already 98% of guarantee that everything > > is fine. > > Actually I applied you series locally, and applied Danny's patches on > top, and I could run your series in qemu with the cp2112 as USB > passthrough. > > Everything is working fine, so I can take this one just now. Thank you! I assume you have some IRQ (like GPIO button) to test with that. If no, it's easily to describe (in ACPI, see [1]) and use a wire to emulate the button presses. In that case the /proc/interrupts should show the different numbers. [1]: https://github.com/westeri/meta-acpi/blob/master/recipes-bsp/acpi-tables/samples/edison/buttons.asli
On Mon, Aug 21, 2023 at 12:27:22PM +0200, Benjamin Tissoires wrote: > On Mon, Aug 21, 2023 at 12:19 PM Benjamin Tissoires > <benjamin.tissoires@redhat.com> wrote: > > On Mon, Aug 21, 2023 at 11:35 AM Andy Shevchenko > > <andriy.shevchenko@linux.intel.com> wrote: > > > On Mon, Aug 21, 2023 at 12:34:30PM +0300, Andy Shevchenko wrote: > > > > On Mon, Aug 21, 2023 at 10:51:04AM +0200, Benjamin Tissoires wrote: > > > > > On Aug 21 2023, Andy Shevchenko wrote: ... > > > > > Long story short, I'm not able to test it right now (and I got quite > > > > > some backlog as you can imagine). IIRC the code was fine, so I think we > > > > > can just take the series as is, and work on the quirks (if any) later. > > > > > > > > Thank you! > > > > > > > > The thing that might be broken is interrupts handling. If that works, > > > > I'm pretty confident with the rest. > > > > > > I.o.w. first 5 patches to test is already 98% of guarantee that everything > > > is fine. > > > > Actually I applied you series locally, and applied Danny's patches on > > top, and I could run your series in qemu with the cp2112 as USB > > passthrough. > > > > Everything is working fine, so I can take this one just now. > > I've pushed the series to for-6.6/cp2112, but for some reasons, b4 > doesn't seem to believe the series is the one you submitted. > > Would you mind double checking on your side if everything is good? > > https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/log/?h=for-6.6/cp2112 Everything is fine as far as I can tell.
On Mon, Aug 21, 2023 at 12:32 PM Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > > On Mon, Aug 21, 2023 at 12:19:39PM +0200, Benjamin Tissoires wrote: > > On Mon, Aug 21, 2023 at 11:35 AM Andy Shevchenko > > <andriy.shevchenko@linux.intel.com> wrote: > > > On Mon, Aug 21, 2023 at 12:34:30PM +0300, Andy Shevchenko wrote: > > > > On Mon, Aug 21, 2023 at 10:51:04AM +0200, Benjamin Tissoires wrote: > > > > > On Aug 21 2023, Andy Shevchenko wrote: > > ... > > > > > > Long story short, I'm not able to test it right now (and I got quite > > > > > some backlog as you can imagine). IIRC the code was fine, so I think we > > > > > can just take the series as is, and work on the quirks (if any) later. > > > > > > > > Thank you! > > > > > > > > The thing that might be broken is interrupts handling. If that works, > > > > I'm pretty confident with the rest. > > > > > > I.o.w. first 5 patches to test is already 98% of guarantee that everything > > > is fine. > > > > Actually I applied you series locally, and applied Danny's patches on > > top, and I could run your series in qemu with the cp2112 as USB > > passthrough. > > > > Everything is working fine, so I can take this one just now. > > Thank you! I assume you have some IRQ (like GPIO button) to test with that. Yeah, binding a test i2c-hid touchpad on top of hid forces you to use GPIOs. Otherwise you are polling, and it's not allowed in i2c-hid anymore IIRC :) > If no, it's easily to describe (in ACPI, see [1]) and use a wire to emulate > the button presses. In that case the /proc/interrupts should show the > different numbers. Thanks, but again, the GPIO is tested just by checking if the touchpad can send events when touched. Now I need to update my CI to rely on danny's patches and a DSDT overwrite :) Cheers, Benjamin > > [1]: https://github.com/westeri/meta-acpi/blob/master/recipes-bsp/acpi-tables/samples/edison/buttons.asli > > -- > With Best Regards, > Andy Shevchenko > >
On Aug 21 2023, Andy Shevchenko wrote: > On Mon, Aug 21, 2023 at 12:27:22PM +0200, Benjamin Tissoires wrote: > > On Mon, Aug 21, 2023 at 12:19 PM Benjamin Tissoires > > <benjamin.tissoires@redhat.com> wrote: > > > On Mon, Aug 21, 2023 at 11:35 AM Andy Shevchenko > > > <andriy.shevchenko@linux.intel.com> wrote: > > > > On Mon, Aug 21, 2023 at 12:34:30PM +0300, Andy Shevchenko wrote: > > > > > On Mon, Aug 21, 2023 at 10:51:04AM +0200, Benjamin Tissoires wrote: > > > > > > On Aug 21 2023, Andy Shevchenko wrote: > > ... > > > > > > > Long story short, I'm not able to test it right now (and I got quite > > > > > > some backlog as you can imagine). IIRC the code was fine, so I think we > > > > > > can just take the series as is, and work on the quirks (if any) later. > > > > > > > > > > Thank you! > > > > > > > > > > The thing that might be broken is interrupts handling. If that works, > > > > > I'm pretty confident with the rest. > > > > > > > > I.o.w. first 5 patches to test is already 98% of guarantee that everything > > > > is fine. > > > > > > Actually I applied you series locally, and applied Danny's patches on > > > top, and I could run your series in qemu with the cp2112 as USB > > > passthrough. > > > > > > Everything is working fine, so I can take this one just now. > > > > I've pushed the series to for-6.6/cp2112, but for some reasons, b4 > > doesn't seem to believe the series is the one you submitted. > > > > Would you mind double checking on your side if everything is good? > > > > https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/log/?h=for-6.6/cp2112 > > Everything is fine as far as I can tell. Great, thanks for double checking. Cheers, Benjamin > > -- > With Best Regards, > Andy Shevchenko > >