Re: [PATCH v2] gpio: Allow hogged gpios to be requested

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

 



Hi,

On Mon, Aug 10, 2015 at 11:26:49AM +0200, Linus Walleij wrote:
> On Tue, Aug 4, 2015 at 11:27 AM, Markus Pargmann <mpa@xxxxxxxxxxxxxx> wrote:
> 
> > It can be useful to claim hogged gpios later, for example from
> > userspace. This allows to set defaults for GPIOs using the hogging
> > mechanism and override the setup later from userspace or a kernel driver.
> >
> > This patch adds a check for hogged gpios to allow requesting them. If
> > the gpio is not hogged but marked as requested, it still fails with
> > -EBUSY.
> >
> > Signed-off-by: Markus Pargmann <mpa@xxxxxxxxxxxxxx>
> 
> To me it feels like a new DT property "gpio-inital-value" or so
> need to be defined in addition to the hogging bindings, and that
> one just sets the GPIO up without setting the FLAG_IS_HOGGED.
> 
> The mechanism needs to be available to non-DT as well
> of course, but it could be a first usecase.
> 
> So instead of:
> 
> line_b {
>            gpio-initval;
>            gpios = <6 0>;
>            output-low;
> };
> 
> Note: no line-name. And it shouldn't be allowed: we don't
> know who will use this in the end.

Sounds good to me. If everyone is okay with this I could go ahead and
implement something like this.

Best Regards,

Markus

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Attachment: signature.asc
Description: Digital signature


[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