RE: [PATCH 2/2] gpio: 74x164: handling enable-gpios

2017-08-07 Thread Peng Fan
> > + chip->enable_gpio = devm_gpiod_get(&spi->dev, "enable", > GPIOD_OUT_LOW); > > + if (IS_ERR(chip->enable_gpio)) { > > + dev_dbg(&spi->dev, "No enable-gpios property\n"); > > + chip->enable_gpio = NULL; > > Also, the error handling here is not correct as

Re: [PATCH 2/2] gpio: 74x164: handling enable-gpios

2017-08-07 Thread Fabio Estevam
On Mon, Aug 7, 2017 at 9:27 AM, Peng Fan wrote: > + chip->enable_gpio = devm_gpiod_get(&spi->dev, "enable", > GPIOD_OUT_LOW); > + if (IS_ERR(chip->enable_gpio)) { > + dev_dbg(&spi->dev, "No enable-gpios property\n"); > + chip->enable_gpio = NULL; Also, th

Re: [PATCH 2/2] gpio: 74x164: handling enable-gpios

2017-08-07 Thread Fabio Estevam
Hi Peng, On Mon, Aug 7, 2017 at 9:27 AM, Peng Fan wrote: > To 74hc595 and 74lv595, there is an OE(low active) input pin. > To some boards, this pin is controller by GPIO, so handling > this pin in driver. When driver probe, use GPIOD_OUT_LOW flag > when requesting the gpio, so OE is set to low wh