[OpenWrt-Devel] [PATCH v2] ath79: use gpio_hog instead of gpio-export
Jeff Kletsky
lede at allycomm.com
Tue Nov 5 18:52:15 EST 2019
On 11/5/19 11:01 AM, Bjørn Mork wrote:
> "Adrian Schmutzler" <mail at adrianschmutzler.de> writes:
>
>> But, based on the discussion here, the opposite has been identified as
>> superior solution (discussing nand subtarget):
>> https://github.com/openwrt/openwrt/pull/2184#discussion_r342136635
> That's missing the point. Regulators are superior if there is
> controlling driver. E.g.
> https://www.kernel.org/doc/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt
>
> See arch/arm/boot/dts/armada-385-linksys.dtsi for a nice, OpenWrt
> relevant, example using this with a fixed regulator.
>
> If you don't link anything to the regulator, then I agree that you might
> as well use gpio-hog. But I still don't see how you can call that a
> superior solution. It doesn't suck more or less. I thought the ath79
> conversion was all about using devicetree to document the boards ;-)
>
I agree that if the driver can control the regulator and do something
useful with it (such as dropping it to hard-reset the USB devices),
there are advantages.
However, my recent work on the ath79-nand kernel shows that adding
CONFIG_REGULATOR=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
results in an increase in kernel size of ~14 kB:
1,952,020 with regulator-fixed
1,937,164 with gpio-hog
At least for the ath79-nand target, things are getting tight for a
2 MB kernel limit, with only a handful of boards and their "unique"
hardware aspects accounted for yet.
Jeff
_______________________________________________
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