Re: [PATCH v4 1/2] gpio: add GPO driver for PCA9570

2020-07-04 Thread Andy Shevchenko
On Fri, Jul 3, 2020 at 3:13 AM Sungbo Eo wrote: > On 2020-07-02 21:36, Andy Shevchenko wrote: > >> + gpio->chip.ngpio = i2c_match_id(pca9570_id_table, > >> client)->driver_data; > > > > Oh, avoid direct access to the table like this. And you may simply use > > device_get_match_data(). > > I

Re: [PATCH v4 1/2] gpio: add GPO driver for PCA9570

2020-07-02 Thread Sungbo Eo
On 2020-07-02 21:36, Andy Shevchenko wrote: + gpio->chip.ngpio = i2c_match_id(pca9570_id_table, client)->driver_data; Oh, avoid direct access to the table like this. And you may simply use device_get_match_data(). I'm not sure if it really does the same thing, but I'll try following yo

Re: [PATCH v4 1/2] gpio: add GPO driver for PCA9570

2020-07-02 Thread Andy Shevchenko
On Thu, Jul 2, 2020 at 3:36 PM Andy Shevchenko wrote: > On Thu, Jul 2, 2020 at 3:18 PM Sungbo Eo wrote: > > + s32 ret; And why not simple int ret; ? -- With Best Regards, Andy Shevchenko

Re: [PATCH v4 1/2] gpio: add GPO driver for PCA9570

2020-07-02 Thread Andy Shevchenko
On Thu, Jul 2, 2020 at 3:18 PM Sungbo Eo wrote: > > NXP PCA9570 is 4-bit I2C GPO expander without interrupt functionality. is a 4-bit > Its ports are controlled only by a data byte without register address. > > As there is no other driver similar enough to be adapted for it, a new > driver is in