linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sungbo Eo <mans0n@gorani.run>
To: Michael Walle <michael@walle.cc>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org
Subject: Re: [PATCH] gpio: add GPO driver for PCA9570
Date: Tue, 23 Jun 2020 21:22:32 +0900	[thread overview]
Message-ID: <2291c01d-30df-518e-a952-644bd955f1f3@gorani.run> (raw)
In-Reply-To: <80bbca9a625b2a0feb9b816906549b7c@walle.cc>

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 <mans0n@gorani.run>
>> ---
>> 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 patch further. (Do I also
>> need to document the DT compatible string?)
> 
> Did you have a look at drivers/gpio/gpio-regmap.c ? Your driver seems
> to be simple enough to be easily integrated with that. If you need a
> blueprint; because at the moment there is no driver in the kernel
> using that, you could have a look at:
> https://lore.kernel.org/linux-gpio/20200604211039.12689-7-michael@walle.cc/

Thanks for your advice. I didn't really know what regmap is for...
It seems gpio-regmap is for gpio controllers having val/dir registers. 
But pca9570 does not use port registers. The master only sends a data 
byte without reg address. I'm not sure how to apply gpio-regmap or 
regmap-i2c here.
I'll try to investigate if setting reg_size or reg_bits to zero is possible.

Please correct me if I'm in the wrong direction.

Thanks.

> 
> -michael

  reply	other threads:[~2020-06-23 12:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-23  6:05 [PATCH] gpio: add GPO driver for PCA9570 Sungbo Eo
2020-06-23  8:31 ` Michael Walle
2020-06-23 12:22   ` Sungbo Eo [this message]
2020-06-23 12:47     ` Michael Walle
2020-06-24 13:33       ` Andy Shevchenko
2020-06-24 13:46         ` Michael Walle
2020-06-24 14:52           ` Andy Shevchenko
2020-06-27 16:58             ` Michael Walle
2020-06-24 12:29 ` Bartosz Golaszewski
2020-06-24 13:01 ` Andy Shevchenko
2020-06-25  7:34   ` Sungbo Eo

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=2291c01d-30df-518e-a952-644bd955f1f3@gorani.run \
    --to=mans0n@gorani.run \
    --cc=bgolaszewski@baylibre.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael@walle.cc \
    /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;
as well as URLs for NNTP newsgroup(s).