Re: [PATCH v4 09/16] gpio: support ROHM BD71815 GPOs

2021-03-28 Thread Matti Vaittinen
Hi Again Andy, On Fri, 2021-03-26 at 19:51 +0200, Andy Shevchenko wrote: > On Fri, Mar 26, 2021 at 3:33 PM Matti Vaittinen > wrote: > > On Fri, 2021-03-26 at 13:26 +0200, Andy Shevchenko wrote: > > > On Wed, Mar 24, 2021 at 12:20 PM Matti Vaittinen > > > wrote: > > > > > > + if

Re: [PATCH v4 09/16] gpio: support ROHM BD71815 GPOs

2021-03-26 Thread Andy Shevchenko
On Fri, Mar 26, 2021 at 3:33 PM Matti Vaittinen wrote: > On Fri, 2021-03-26 at 13:26 +0200, Andy Shevchenko wrote: > > On Wed, Mar 24, 2021 at 12:20 PM Matti Vaittinen > > wrote: ... > > > + return (val >> offset) & 1; > > > > !!(val & BIT(offset)) can also work and be in alignment with

Re: [PATCH v4 09/16] gpio: support ROHM BD71815 GPOs

2021-03-26 Thread Matti Vaittinen
Hi Andy, On Fri, 2021-03-26 at 13:26 +0200, Andy Shevchenko wrote: > On Wed, Mar 24, 2021 at 12:20 PM Matti Vaittinen > wrote: > > Support GPO(s) found from ROHM BD71815 power management IC. The IC > > has two > > GPO pins but only one is properly documented in data-sheet. The > > driver > > in

Re: [PATCH v4 09/16] gpio: support ROHM BD71815 GPOs

2021-03-26 Thread Andy Shevchenko
On Fri, Mar 26, 2021 at 1:26 PM Andy Shevchenko wrote: > On Wed, Mar 24, 2021 at 12:20 PM Matti Vaittinen > wrote: > > +#include > > You may do better than be OF-centric. See below. Ah, yep, when you switch to unified device property API, you would need property.h and mod_devicetable.h

Re: [PATCH v4 09/16] gpio: support ROHM BD71815 GPOs

2021-03-26 Thread Andy Shevchenko
On Wed, Mar 24, 2021 at 12:20 PM Matti Vaittinen wrote: > > Support GPO(s) found from ROHM BD71815 power management IC. The IC has two > GPO pins but only one is properly documented in data-sheet. The driver in the datasheet > exposes by default only the documented GPO. The second GPO is

Re: [PATCH v4 09/16] gpio: support ROHM BD71815 GPOs

2021-03-25 Thread Matti Vaittinen
Hello Linus, On Thu, 2021-03-25 at 10:35 +0100, Linus Walleij wrote: > On Wed, Mar 24, 2021 at 8:29 AM Matti Vaittinen > wrote: > > > Support GPO(s) found from ROHM BD71815 power management IC. The IC > > has two > > GPO pins but only one is properly documented in data-sheet. The > > driver > >

Re: [PATCH v4 09/16] gpio: support ROHM BD71815 GPOs

2021-03-25 Thread Linus Walleij
On Wed, Mar 24, 2021 at 8:29 AM Matti Vaittinen wrote: > Support GPO(s) found from ROHM BD71815 power management IC. The IC has two > GPO pins but only one is properly documented in data-sheet. The driver > exposes by default only the documented GPO. The second GPO is connected to > E5 pin and

[PATCH v4 09/16] gpio: support ROHM BD71815 GPOs

2021-03-24 Thread Matti Vaittinen
Support GPO(s) found from ROHM BD71815 power management IC. The IC has two GPO pins but only one is properly documented in data-sheet. The driver exposes by default only the documented GPO. The second GPO is connected to E5 pin and is marked as GND in data-sheet. Control for this undocumented pin