Re: [RFC] gpio: expose pull-up/pull-down line flags to userspace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Oct 05, 2019 at 07:02:58PM +0200, Linus Walleij wrote:
> On Fri, Oct 4, 2019 at 9:22 AM Bartosz Golaszewski <brgl@xxxxxxxx> wrote:
> 
> > The config ioctl (or
> > something similar) you're mentioning may appear sooner actually -
> > users of libgpiod have been requesting a way of changing the direction
> > of a line without releasing it - something that's possible in the
> > kernel, but not from user-space at the moment. I'll submit something
> > that allows to change the configuration of a requested line soon.
> 
> Hm! I guess I assumed that userspace users would be using the lines
> for either input or output, not complex use cases like that, reversing
> direction and what not.
> 
> What kind of usecase is this? I certainly hope nothing like doing
> userspace drivers for complex hardware ... those should be in
> the kernel... the current ABI is a bit oriented around industrial
> automation and prototyping use cases.
> 
I'm not the only one asking for this, and I can't speak to others' use
cases, but in my case I'm prototyping and bit bashing a SPI driver for
an ADC where the MOSI/MISO lines can be tied to save a pin. I need to
be able to switch line direction without glitching the line and that
can't be guaranteed with the current UAPI.

Would you consider that "complex hardware"?

Kent.



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux