Re: [PATCH] net: dsa: ksz: Add reset GPIO handling

2018-12-07 Thread Marek Vasut
On 12/07/2018 08:55 PM, Andrew Lunn wrote: >> +dev->reset_gpio = -1; >> +reset_gpio = of_get_named_gpio_flags(np, "reset-gpios", 0, >> + _gpio_flags); >> +if (reset_gpio >= 0) { >> +flags = (reset_gpio_flags == OF_GPIO_ACTIVE_LOW) ?

Re: [PATCH] net: dsa: ksz: Add reset GPIO handling

2018-12-07 Thread Andrew Lunn
> + dev->reset_gpio = -1; > + reset_gpio = of_get_named_gpio_flags(np, "reset-gpios", 0, > + _gpio_flags); > + if (reset_gpio >= 0) { > + flags = (reset_gpio_flags == OF_GPIO_ACTIVE_LOW) ? > + GPIOF_ACTIVE_LOW :

[PATCH] net: dsa: ksz: Add reset GPIO handling

2018-12-07 Thread Marek Vasut
Add code to handle optional reset GPIO in the KSZ switch driver. The switch has a reset GPIO line which can be controlled by the CPU, so make sure it is configured correctly in such setups. Signed-off-by: Marek Vasut Cc: Vivien Didelot Cc: Woojung Huh Cc: David S. Miller Cc: Tristram Ha ---