From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Levente Révész" <levente.revesz@eilabs.com>
Cc: Martyn Welch <martyn.welch@collabora.com>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Haibo Chen <haibo.chen@nxp.com>, Puyou Lu <puyou.lu@gmail.com>,
Justin Chen <justinpopo6@gmail.com>,
Andrey Gusakov <andrey.gusakov@cogentembedded.com>,
Nate Drude <nate.d@variscite.com>,
linux-gpio@vger.kernel.org, Peter Robinson <pbrobinson@gmail.com>
Subject: Re: [RFC PATCH 0/3] gpio: pca953x: Redesign handling of chip types
Date: Thu, 2 Feb 2023 17:14:09 +0200 [thread overview]
Message-ID: <Y9vTQQlmMd+ZXO4/@smile.fi.intel.com> (raw)
In-Reply-To: <Y9vS1dsuMm5XxkdD@smile.fi.intel.com>
On Thu, Feb 02, 2023 at 05:12:22PM +0200, Andy Shevchenko wrote:
> On Mon, Jan 30, 2023 at 09:59:30PM +0100, Levente Révész wrote:
> > Hi All,
> >
> > The pca953x driver supports many chips. These all have the basic 4
> > registers: input, output, invert and direction. Most of them have
> > additional registers for various functions, like pull-up and
> > pull-down control, interrupt status and mask, hardware debounce.
> >
> > Different chip types have various register layouts. These layouts differ
> > even in the basic 4 registers.
> >
> > This patch series
> >
> > 1. Cleans up chip type handling, and
> > 2. Replaces register address calculations. The proposed scheme
> > works with every register of every chip type.
> >
> > These changes make it possible to add support for extended functions for
> > more chip types, including:
> >
> > * Interrupt mask for PCA950X, PCA9698, PCA957X and XRA120X
> > * Interrupt status for PCA957X and XRA120X
> > * Bias for PCA957X and XRA120X
> > * Debounce for PCAL65XX and XRA120X
> >
> > References:
> > 1. Previous discussion about the chip types
> > https://lore.kernel.org/linux-gpio/Y1q52efyv93%2Fz8BC@smile.fi.intel.com/
> > 2. An overview of pca953x chip types
> > https://lore.kernel.org/linux-gpio/67bba210-09ac-32fb-bb97-8bfc40c2c200@eilabs.com/
>
> Now as I'm thinking more of your nice job, it may be less effort to everybody
> if you start from moving the driver to be a real pin control driver united with
> GPIO handling.
>
> That said, start drivers/pinctrl/pinctrl-pca953x.c from scratch with all your
> ideas in it. To make it better for review and testing, split by series in which
> you add the main chip family, i.e. PCA953x one (without interrupt?) and then
> adding each type one-by-one.
>
> Also prepare some documentation file in Documentation/...gpio.../pca953x or
> start a brand new pinctrl folder (we do not have it yet) where you describe
> all your research.
>
> Note, this will be quite useful to enable PWM support later on for some chips.
And to avoid messing up with the existing driver, add Kconfig part at last.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2023-02-02 15:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-30 20:59 [RFC PATCH 0/3] gpio: pca953x: Redesign handling of chip types Levente Révész
2023-01-30 21:32 ` Andy Shevchenko
2023-02-02 15:12 ` Andy Shevchenko
2023-02-02 15:14 ` Andy Shevchenko [this message]
2023-02-03 10:40 ` Levente Révész
2023-02-03 11:32 ` Andy Shevchenko
2023-02-03 12:30 ` Linus Walleij
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=Y9vTQQlmMd+ZXO4/@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=andrey.gusakov@cogentembedded.com \
--cc=brgl@bgdev.pl \
--cc=haibo.chen@nxp.com \
--cc=justinpopo6@gmail.com \
--cc=levente.revesz@eilabs.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=martyn.welch@collabora.com \
--cc=nate.d@variscite.com \
--cc=pbrobinson@gmail.com \
--cc=puyou.lu@gmail.com \
/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