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

mail at adrianschmutzler.de mail at adrianschmutzler.de
Tue Nov 5 16:19:02 EST 2019


Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of Adrian Schmutzler
> Sent: Dienstag, 5. November 2019 16:12
> To: openwrt-devel at lists.openwrt.org
> Cc: Birger Koblitz <mail at birger-koblitz.de>
> Subject: [OpenWrt-Devel] [PATCH v2] ath79: use gpio_hog instead of gpio-
> export
> 
> From: Birger Koblitz <mail at birger-koblitz.de>
> 
> 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 DTS files with settings that normally do not need user
> interaction, e.g. power for external USB ports, to gpio_hog. The only
> remaining gpio-export will be in qca9558_openmesh_om5p-ac-v2.dts
> 

I've just had a look at the openmesh_om5p-ac-v2, and it seems as if the gpio-exports there are just voltage changes for a power amplifier. To me this looks like those can be dealt with by a gpio-hog, too:

	/* power amplifier high power, 4.2V at RFFM4203/4503 instead of 3.3 */
	ath79_gpio_function_enable(QCA955X_GPIO_FUNC_JTAG_DISABLE);
	ath79_gpio_output_select(OM5PACV2_GPIO_PA_DCDC, QCA955X_GPIO_OUT_GPIO);
	ath79_gpio_output_select(OM5PACV2_GPIO_PA_HIGH, QCA955X_GPIO_OUT_GPIO);
	gpio_request_one(OM5PACV2_GPIO_PA_DCDC, GPIOF_OUT_INIT_HIGH,
			 "PA DC/DC");
	gpio_request_one(OM5PACV2_GPIO_PA_HIGH, GPIOF_OUT_INIT_HIGH, "PA HIGH");

https://github.com/openwrt/openwrt/blob/master/target/linux/ar71xx/files/arch/mips/ath79/mach-om5pacv2.c

Thus, I will also convert that device without an explicit resend of the patch unless there is protest about it.

Best

Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191105/c65d2a3d/attachment.sig>
-------------- next part --------------
_______________________________________________
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