[OpenWrt-Devel] [PATCH 1/3] ath79: enable i2c-gpio and spi-gpio in generic subtarget

Piotr Dymacz pepe2k at gmail.com
Mon Feb 3 13:21:17 EST 2020


Hi Daniel,

On 02.02.2020 17:40, Daniel Golle wrote:
> For devices having LEDs or buttons connected via I2C or SPI connected
> GPIO chips it is desireable to access these busses early during boot
> in order to signal progress and failsafe-mode. Hence have support for
> i2c-gpio and spi-gpio built-into the kernel on generic (ie. non-tiny)
> systems.

For I2C two other configs should be also auto-selected:
+CONFIG_I2C=y
+CONFIG_I2C_ALGOBIT=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_GPIO=y

And in case of CONFIG_SPI_GPIO, it's already selected in top-level 
target config:
https://github.com/openwrt/openwrt/blob/master/target/linux/ath79/config-4.19#L216
https://github.com/openwrt/openwrt/blob/master/target/linux/ath79/config-4.14#L223

'make kernel_menuconfig CONFIG_TARGET=subtarget' will solve that.

> Signed-off-by: Daniel Golle <daniel at makrotopia.org>

Acked-by: Piotr Dymacz <pepe2k at gmail.com>

-- 
Cheers,
Piotr

> ---
>   target/linux/ath79/generic/config-default | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/target/linux/ath79/generic/config-default b/target/linux/ath79/generic/config-default
> index 2d8f7f20c2..8c3ed13fb5 100644
> --- a/target/linux/ath79/generic/config-default
> +++ b/target/linux/ath79/generic/config-default
> @@ -1,6 +1,8 @@
>   CONFIG_AT803X_PHY=y
>   CONFIG_GPIO_WATCHDOG=y
>   CONFIG_GPIO_WATCHDOG_ARCH_INITCALL=y
> +CONFIG_I2C=y
> +CONFIG_I2C_GPIO=y
>   CONFIG_INTEL_XWAY_PHY=y
>   CONFIG_IP17XX_PHY=y
>   CONFIG_LEDS_RESET=y
> @@ -18,5 +20,6 @@ CONFIG_RTL8366RB_PHY=y
>   CONFIG_RTL8366S_PHY=y
>   CONFIG_RTL8366_SMI=y
>   CONFIG_RTL8367_PHY=y
> +CONFIG_SPI_GPIO=y
>   CONFIG_VITESSE_PHY=y
>   CONFIG_WATCHDOG_CORE=y
> 


_______________________________________________
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