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

2020-07-09 Thread Sungbo Eo
NXP PCA9570 is a 4-bit I2C GPO expander without interrupt functionality. Its ports are controlled only by a data byte without register address. Datasheet: https://www.nxp.com/docs/en/data-sheet/PCA9570.pdf Signed-off-by: Sungbo Eo --- v6: * removed client * re-added mutex * removed template_chip

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

2020-07-08 Thread Sungbo Eo
Thanks, it made me think about it deeper... On 20. 7. 8. 오전 12:07, Andy Shevchenko wrote: On Tue, Jul 7, 2020 at 5:03 PM Sungbo Eo wrote: On 20. 7. 6. 오후 9:00, Andy Shevchenko wrote: ... But I don't really understand what mutex does here. The driver does not need consecutive command

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

2020-07-07 Thread Sungbo Eo
On 20. 7. 6. 오후 9:00, Andy Shevchenko wrote: On Mon, Jul 6, 2020 at 2:21 PM Bartosz Golaszewski wrote:> On Sun, Jul 5, 2020 at 3:31 PM Sungbo Eo wrote: NXP PCA9570 is a 4-bit I2C GPO expander without interrupt functionality. Its ports are controlled only by a data byte without regis

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

2020-07-05 Thread Sungbo Eo
NXP PCA9570 is a 4-bit I2C GPO expander without interrupt functionality. Its ports are controlled only by a data byte without register address. Datasheet: https://www.nxp.com/docs/en/data-sheet/PCA9570.pdf Signed-off-by: Sungbo Eo --- v5: * amended the commit message * removed unnecessary

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

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

2020-07-02 Thread Sungbo Eo
NXP PCA9570 is 4-bit I2C GPO expander without interrupt functionality. 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 introduced here. Signed-off-by: Sungbo Eo --- v4: * removed

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

2020-07-02 Thread Sungbo Eo
On 2020-07-01 06:30, Andy Shevchenko wrote: On Tue, Jun 30, 2020 at 7:08 PM Sungbo Eo wrote: NXP PCA9570 is 4-bit I2C GPO expander without interrupt functionality. Its ports are controlled only by a data byte without register address. As there is no other driver similar enough to be adapted

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

2020-06-30 Thread Sungbo Eo
evchenko wrote: On Tue, Jun 30, 2020 at 12:28 PM Bartosz Golaszewski wrote: On Thu, Jun 25, 2020 at 9:58 AM Sungbo Eo wrote: +static const struct of_device_id pca9570_of_match_table[] = { + { .compatible = "nxp,pca9570" }, + { /* sentinel */ } +}; +MODULE_DEVICE_TAB

[PATCH v3 2/2] dt-bindings: gpio: Add bindings for NXP PCA9570

2020-06-30 Thread Sungbo Eo
This patch adds device tree bindings for the NXP PCA9570, a 4-bit I2C GPO expander. Signed-off-by: Sungbo Eo --- v3: * fixed dt_binding_check error v2: I don't feel I can really maintain this driver, but it seems all yaml docs have a maintainers field so I just added it... --- .../bin

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

2020-06-30 Thread Sungbo Eo
NXP PCA9570 is 4-bit I2C GPO expander without interrupt functionality. 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 introduced here. Signed-off-by: Sungbo Eo --- v3: * remove mutex

Re: [PATCH v2 2/2] dt-bindings: gpio: Add bindings for NXP PCA9570

2020-06-30 Thread Sungbo Eo
On 2020-06-30 07:01, Rob Herring wrote: On Thu, 25 Jun 2020 16:59:57 +0900, Sungbo Eo wrote: This patch adds device tree bindings for the NXP PCA9570, a 4-bit I2C GPO expander. Signed-off-by: Sungbo Eo --- I don't feel I can really maintain this driver, but it seems all yaml docs h

[PATCH v2 2/2] dt-bindings: gpio: Add bindings for NXP PCA9570

2020-06-25 Thread Sungbo Eo
This patch adds device tree bindings for the NXP PCA9570, a 4-bit I2C GPO expander. Signed-off-by: Sungbo Eo --- I don't feel I can really maintain this driver, but it seems all yaml docs have a maintainers field so I just added it... --- .../bindings/gpio/gpio-pca9570.yaml

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

2020-06-25 Thread Sungbo Eo
NXP PCA9570 is 4-bit I2C GPO expander without interrupt functionality. 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 introduced here. Signed-off-by: Sungbo Eo --- v2: * move the direction

Re: [PATCH] gpio: add GPO driver for PCA9570

2020-06-25 Thread Sungbo Eo
On 2020-06-24 22:01, Andy Shevchenko wrote: On Tue, Jun 23, 2020 at 9:06 AM Sungbo Eo wrote: This patch adds support for the PCA9570 I2C GPO expander. Tested in kernel 5.4 on an ipq40xx platform. This is my first time submitting a whole driver patch, and I'm not really familiar with

Re: [PATCH] gpio: add GPO driver for PCA9570

2020-06-23 Thread Sungbo Eo
Hi Michael, On 2020-06-23 17:31, Michael Walle wrote: Hi Sungbo, Am 2020-06-23 08:05, schrieb Sungbo Eo: This patch adds support for the PCA9570 I2C GPO expander. Signed-off-by: Sungbo Eo --- Tested in kernel 5.4 on an ipq40xx platform. This is my first time submitting a whole driver patch

[PATCH] gpio: add GPO driver for PCA9570

2020-06-22 Thread Sungbo Eo
This patch adds support for the PCA9570 I2C GPO expander. Signed-off-by: Sungbo Eo --- Tested in kernel 5.4 on an ipq40xx platform. This is my first time submitting a whole driver patch, and I'm not really familiar with this PCA expander series. Please let me know how I can improve this