All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Révész, Levente" <levente.revesz@eilabs.com>
Cc: Martyn Welch <martyn.welch@collabora.com>,
	Nate Drude <nate.d@variscite.com>,
	Haibo Chen <haibo.chen@nxp.com>, Puyou Lu <puyou.lu@gmail.com>,
	Justin Chen <justinpopo6@gmail.com>,
	Andrey Gusakov <andrey.gusakov@cogentembedded.com>,
	Peter Robinson <pbrobinson@gmail.com>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH 0/2] gpio: pca953x: Add interrupt mask support for pca953x chips
Date: Wed, 19 Oct 2022 14:28:58 +0300	[thread overview]
Message-ID: <Y0/feqFujcGKS0pf@smile.fi.intel.com> (raw)
In-Reply-To: <VI1P194MB06553A18E489E4F456B0EBE1E32B9@VI1P194MB0655.EURP194.PROD.OUTLOOK.COM>

On Wed, Oct 19, 2022 at 10:15:01AM +0000, Révész, Levente wrote:
> On Monday, October 17, 2022 7:31 PM, Andy Shevchenko wrote:
> > At first glance I think this needs two prerequisite patches:
> >
> > 1) convert _TYPE from bits to plain numbers, so we will have room
> >    for up to 16 types;
> >
> > 2) Introducing PCAL953X_TYPE.
> >
> > After this is done, the current series will be neater.
> 
> Thanks for the suggestions!
> 
> I have started implementing this change:
> 
>     * Convert _TYPE from bits to 4 bit integer
> 
>     * Define 4 chip types: PCA953X_TYPE, PCAL953X_TYPE,
>                            PCAL653X_TYPE, PCA957X_TYPE
> 
> The PCA_PCAL bit is redundant, we know which chip is PCAL from their
> chip type. Remove the PCA_PCAL bit and the PCA_LATCH_INT mask.

Sounds good.

> The now modified bits were also used in the acpi_device_id
> initialization:
> 
>     static const struct acpi_device_id pca953x_acpi_ids[] = {
>         { "INT3491", 16 | PCA953X_TYPE | PCA_LATCH_INT, },
>         { }
>     };
>     MODULE_DEVICE_TABLE(acpi, pca953x_acpi_ids);

I do not see any modifications in the above.

> I do not understand what is happening in this snippet.
> What should be the id?

INT3491 is the ID. The chip behind is (usually) PCAL9555. In the cases
when it's not, there is no associated interrupt line in the ACPI tables,
so it won't hurt, however it's not the best solution made that time.

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2022-10-19 11:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-10 13:20 [PATCH 0/2] gpio: pca953x: Add interrupt mask support for pca953x chips Levente Révész
2022-10-10 13:20 ` [PATCH 1/2] gpio: pca953x: Generalize interrupt mask register handling Levente Révész
2022-10-24 16:58   ` Martyn Welch
2022-10-10 13:20 ` [PATCH 2/2] gpio: pca953x: Add interrupt mask support for chips with the standard register set Levente Révész
2022-10-17 10:02 ` [PATCH 0/2] gpio: pca953x: Add interrupt mask support for pca953x chips Linus Walleij
2022-10-17 17:31   ` Andy Shevchenko
2022-10-19 10:15     ` Révész, Levente
2022-10-19 11:28       ` Andy Shevchenko [this message]

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=Y0/feqFujcGKS0pf@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.