lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86f7a107-cf69-40d2-9f96-e2025e28eaa7@gmail.com>
Date: Wed, 3 Sep 2025 11:17:28 +0300
From: Matti Vaittinen <mazziesaccount@...il.com>
To: Linus Walleij <linus.walleij@...aro.org>,
 Michael Walle <mwalle@...nel.org>
Cc: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>,
 Jonathan Cameron <jic23@...nel.org>, David Lechner <dlechner@...libre.com>,
 Nuno Sá <nuno.sa@...log.com>,
 Andy Shevchenko <andy@...nel.org>, Rob Herring <robh@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
 <conor+dt@...nel.org>, Bartosz Golaszewski <brgl@...ev.pl>,
 Marcelo Schmitt <marcelo.schmitt@...log.com>,
 Javier Carrasco <javier.carrasco.cruz@...il.com>,
 Tobias Sperling <tobias.sperling@...ting.com>,
 Antoniu Miclaus <antoniu.miclaus@...log.com>,
 Trevor Gamblin <tgamblin@...libre.com>, Esteban Blanc <eblanc@...libre.com>,
 Ramona Alexandra Nechita <ramona.nechita@...log.com>,
 Thomas Bonnefille <thomas.bonnefille@...tlin.com>,
 Hans de Goede <hansg@...nel.org>, linux-iio@...r.kernel.org,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-gpio@...r.kernel.org
Subject: Re: [PATCH 2/3] iio: adc: Support ROHM BD79112 ADC/GPIO

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@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ