[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VdxwKrqhvKAzZmbh+NsUOi2bsdCj7MdnLEP2gK7sY8PRw@mail.gmail.com>
Date: Mon, 14 Apr 2025 20:24:27 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Marcelo Schmitt <marcelo.schmitt1@...il.com>
Cc: Nuno Sá <noname.nuno@...il.com>,
Marcelo Schmitt <marcelo.schmitt@...log.com>, linux-iio@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, jic23@...nel.org,
lars@...afoo.de, Michael.Hennerich@...log.com, dlechner@...libre.com,
nuno.sa@...log.com, andy@...nel.org, robh@...nel.org, krzk+dt@...nel.org,
conor+dt@...nel.org
Subject: Re: [PATCH v1 7/7] iio: adc: ad4170: Add support for weigh scale and
RTD sensors
On Mon, Apr 14, 2025 at 6:37 PM Marcelo Schmitt
<marcelo.schmitt1@...il.com> wrote:
...
> > I think you could improve this... You're taking an all or nothing approach.
> > IIUC, we can have cases where only two GPIOs are in use which means we could use
> > the other 2? There the gpiochio init_valid_mask() call that you could
> > potentially use.
>
> Isn't gpiochio init_valid_mask() only to distinguish between GPIOs that can
> (or cannot) be used as interrupts? Not sure AD4170 GPIOs can be used for
> interrupts at all (think they can't) so didn't implement init_valid_mask().
There are two masks, one per GPIO, and one per GPIO-as-IRQ. I agree
that it's better to use valid mask and not reinvent a wheel.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists