lkml.org 
[lkml]   [2023]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] gpiolib: Avoid side effects in gpio_is_visible()
On Mon, May 15, 2023 at 12:27 AM Chris Packham
<Chris.Packham@alliedtelesis.co.nz> wrote:

> In my original case which is a kernel module that exports a GPIO for
> userspace using gpiod_export()

We should not add new users for that API as it increase the usage
of the sysfs ABI but if it's an existing in-tree usecase I buy it.

> The crux of the problem is that the irq_desc is created when it hasn't
> been requested.

The right solution to me seems to be to not use gpiod_export()
and not use sysfs TBH.

> In some cases we know the GPIO pin is an output so we
> could avoid it, in others we could delay the creation until an interrupt
> is actually requested (which is what I'm attempting to do).

Yeah I guess. If we wanna keep papering over issues created
by the sysfs ABI.

Yours,
Linus Walleij

\
 
 \ /
  Last update: 2023-05-16 15:59    [W:0.082 / U:26.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site