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

Kristian Evensen kristian.evensen at gmail.com
Fri Aug 23 08:19:29 EDT 2019


Hi,

On Fri, Aug 23, 2019 at 1:40 PM Birger Koblitz <mail at birger-koblitz.de> wrote:
>
> ramips: use gpio_hog instead of gpio-export
>
> The `gpio-export` functionality is a hack for
> missing kernel functionality, which was rejected in upstream kernel long
> time
> ago, for details see this email
> http://lists.infradead.org/pipermail/openwrt-devel/2019-February/015772.html,
> discussion in PR#1366 or
> https://github.com/openwrt/openwrt/pull/1814#issuecomment-462942022.
>
> This patch converts all ramips .dts(i) files which were
> using export-gpio for powering USB/SATA ports to using gpio_hog instead

While clean-ups are nice, the patch in its current form will break a
lot of functionality that users depend on. By changing for example the
D240 power_mpcieX nodes to gpio-hog, it is no longer possible to
power-cycle the devices inserted in these slots. Power-cycling is for
example convenient when recovering LTE-modems that have crashed/hung
due to firmware bugs. While I am not familiar with some of the other
devices, I suspect a lot of the nodes names "power_usb" or similar
have the same functionality.

I would start by moving the GPIOs used for power-control of USB to
03_gpio_switches and then take a look at the GPIOs that are left. This
probably requires going through the commits adding support for the
different devices.

BR,
Kristian

BR,
Kristian

_______________________________________________
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