From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>,
Michael Walle <mwalle@kernel.org>
Cc: "Matti Vaittinen" <matti.vaittinen@fi.rohmeurope.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Bartosz Golaszewski" <brgl@bgdev.pl>,
"Marcelo Schmitt" <marcelo.schmitt@analog.com>,
"Javier Carrasco" <javier.carrasco.cruz@gmail.com>,
"Tobias Sperling" <tobias.sperling@softing.com>,
"Antoniu Miclaus" <antoniu.miclaus@analog.com>,
"Trevor Gamblin" <tgamblin@baylibre.com>,
"Esteban Blanc" <eblanc@baylibre.com>,
"Ramona Alexandra Nechita" <ramona.nechita@analog.com>,
"Thomas Bonnefille" <thomas.bonnefille@bootlin.com>,
"Hans de Goede" <hansg@kernel.org>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org
Subject: Re: [PATCH 2/3] iio: adc: Support ROHM BD79112 ADC/GPIO
Date: Wed, 3 Sep 2025 11:17:28 +0300 [thread overview]
Message-ID: <86f7a107-cf69-40d2-9f96-e2025e28eaa7@gmail.com> (raw)
In-Reply-To: <9f69e164-5e63-44c1-9354-90b8de2ca27c@gmail.com>
On 03/09/2025 10:17, Matti Vaittinen wrote:
> On 03/09/2025 09:47, Linus Walleij wrote:
>> On Wed, Sep 3, 2025 at 7:23 AM Matti Vaittinen
>> <mazziesaccount@gmail.com> wrote:
>>
>>> Anyways, fast-forward to this day, I don't see it handling valid_mask. I
>>> think it is a must for this device/driver, where pins can be either
>>> GPIOs or ADC inputs.
>>
>> Why not just add a .init_valid_mask() to
>> struct gpio_regmap_config so it can just pass that
>> down to its gpio_chip?
>
> Sigh. I suppose that would technically make sense. (So would allowing
> other IC-specific callbacks... ;) ).
>
>> OK I don't want to load you with too much extra work for
>> the driver, but it seems such a small thing for a blocker,
>> and Michael who wrote the library is really helpful
>> with extending the code, so consider it!
>
> I suppose I can see how that works out. I am not a fan of maintaining
> the extra code. Thanks for the suggestion.
After more thorough look, I don't think the gpio-regmap is flexible
enough for this IC (either). The BD79112 direction setting requires
accessing two registers (one for input, other for output), and I don't
see how this could be done with the current gpio-regmap.
...If only I was able to override the direction setting callback with IC
specific one, then I could use the regular gpio-regmap for all the rest...
Yours,
-- Matti
next prev parent reply other threads:[~2025-09-03 8:17 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-02 12:23 [PATCH 0/3] Support ROHM BD79112 ADC Matti Vaittinen
2025-09-02 12:23 ` [PATCH 1/3] dt-bindings: iio: adc: ROHM BD79112 ADC/GPIO Matti Vaittinen
2025-09-02 17:57 ` Rob Herring (Arm)
2025-09-02 12:24 ` [PATCH 2/3] iio: adc: Support " Matti Vaittinen
2025-09-02 14:15 ` Andy Shevchenko
2025-09-03 6:52 ` Matti Vaittinen
2025-09-03 11:23 ` Andy Shevchenko
2025-09-03 12:14 ` Matti Vaittinen
2025-09-03 13:29 ` Andy Shevchenko
2025-09-04 12:35 ` Matti Vaittinen
2025-09-04 13:04 ` Andy Shevchenko
2025-09-05 5:47 ` Matti Vaittinen
2025-09-02 15:14 ` David Lechner
2025-09-03 7:03 ` Matti Vaittinen
2025-09-02 22:34 ` Linus Walleij
2025-09-03 5:23 ` Matti Vaittinen
2025-09-03 6:47 ` Linus Walleij
2025-09-03 7:17 ` Matti Vaittinen
2025-09-03 7:17 ` Matti Vaittinen
2025-09-03 8:17 ` Matti Vaittinen [this message]
2025-09-03 11:02 ` Nuno Sá
2025-09-03 11:27 ` Andy Shevchenko
2025-09-04 14:02 ` kernel test robot
2025-09-02 12:30 ` [PATCH 3/3] MAINTAINERS: Support ROHM BD79112 ADC Matti Vaittinen
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=86f7a107-cf69-40d2-9f96-e2025e28eaa7@gmail.com \
--to=mazziesaccount@gmail.com \
--cc=andy@kernel.org \
--cc=antoniu.miclaus@analog.com \
--cc=brgl@bgdev.pl \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=eblanc@baylibre.com \
--cc=hansg@kernel.org \
--cc=javier.carrasco.cruz@gmail.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.schmitt@analog.com \
--cc=matti.vaittinen@fi.rohmeurope.com \
--cc=mwalle@kernel.org \
--cc=nuno.sa@analog.com \
--cc=ramona.nechita@analog.com \
--cc=robh@kernel.org \
--cc=tgamblin@baylibre.com \
--cc=thomas.bonnefille@bootlin.com \
--cc=tobias.sperling@softing.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;
as well as URLs for NNTP newsgroup(s).