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] [day] [month] [year] [list]
Message-ID: <67d177ef5fa41e597459f88159fd289354f7dde3.camel@gmail.com>
Date: Wed, 19 Nov 2025 09:38:49 +0000
From: Nuno Sá <noname.nuno@...il.com>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Antoniu Miclaus <antoniu.miclaus@...log.com>, Bartosz Golaszewski
	 <brgl@...ev.pl>, Rob Herring <robh@...nel.org>, Krzysztof Kozlowski
	 <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, 
	linux-gpio@...r.kernel.org, devicetree@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] gpio: adg1712: add driver support

On Tue, 2025-11-18 at 23:54 +0100, Linus Walleij wrote:
> On Tue, Nov 11, 2025 at 5:01 PM Nuno Sá <noname.nuno@...il.com> wrote:
> 
> [Me]
> > > - Implement .set_config() and implement the generic pin
> > >   control property PIN_CONFIG_OUTPUT_ENABLE as 1
> > >   to switch "on" and 0 for switch "off".
> > >   See include/linux/pinctrl/pinconf-generic.h
> 
> > The above makes sense to me. I'll let Antoniu take it from here and check if
> > the above fits the usecases he is aware of. Not sure if it makes sense for a piece
> > of HW like this but if the usecase is for userspace to control the on/off states,
> > then I guess we would need .get() and .set(). Or some kind of "frontend" driver
> > making use of the consumer helpers.
> 
> There is already GPIO_V2_LINE_SET_CONFIG_IOCTL
> in <uapi/linux/gpio.h> so setting configs from userspace is no issue,
> just use the character device.
> 
> You will need to add I think two new config flags for userspace:
> GPIO_V2_LINE_FLAG_OUTPUT_ENABLE
> GPIO_V2_LINE_FLAG_OUTPUT_DISABLE
> 
> And update gpio_v2_line_config_flags_to_desc_flags() in
> drivers/gpio/gpiolib-cdev.c accordingly.
> 
> Then you probably want some tests or examples in libgpiod to make
> sure userspace is fine. Bartosz knows all about how to do this.
> 

It seems there's no need for userspace control. If you look at v3, it seems
we don't really need it to be a gpiochip (at least, I think). Maybe take a look,
you might have some good pointers :)


Thx!
- Nuno Sá

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ