[OpenWrt-Devel] [PATCH] ramips: use gpio_hog instead of gpio-export

Birger Koblitz mail at birger-koblitz.de
Sun Aug 11 15:29:01 EDT 2019


Dear Martin and Enrico,

thanks for your comments.

On 11.08.19 13:38, Martin Blumenstingl wrote:
> On Sun, Aug 11, 2019 at 1:00 PM Birger Koblitz <mail at birger-koblitz.de> wrote:
>> I'll go through the patches and remove anything that sounds like it
>> might need user space configuration (i.e. not power the USB bus or the
>> like).
> upstream GPIO maintainers prefer dedicated properties instead of a GPIO hog.
>
> some USB controller drivers support a "vbus-supply" property, which
> can be used together with a GPIO regulator
> in case of the VBUS supply it means the GPIO will be turned off if the
> USB port is "disabled" (for example by unloading the kernel USB
> controller driver).
>
> I'm not saying that you have to switch over to something other than GPIO hogs.
> switching to an upstream solution is a good starting point!
> just be aware that this may not be the final solution

this is understood. gpio-hog is only the second best solution, where
gpio-export is only the third best solution for the general case but in
some cases at the moment the only reasonable one.


>
>> Is anyone working on converting the use-cases which require user space
>> switching to libgpiod or any other solution?
> how do you identify the "use-cases which require use space switching"?

I believe this discussion has happened already, e.g. here:

https://github.com/openwrt/openwrt/pull/1366

and I don't think you need a final answer to this question in order to
start migrating to gpio_hog where it is easily possible.

@Enrico: It is clear that in some cases definitely we need to have a
possibility to manipulate gpios from user-space.


Cheers

   Birger



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list