static int ad8366_probe(struct spi_device *spi)
{
struct device *dev = &spi->dev;
+ struct gpio_desc *enable_gpio;
struct reset_control *rstc;
struct iio_dev *indio_dev;
struct ad8366_state *st;
st->spi = spi;
st->info = spi_get_device_match_data(spi);
+ enable_gpio = devm_gpiod_get_optional(dev, "enable", GPIOD_OUT_HIGH);
+ if (IS_ERR(enable_gpio))
+ return dev_err_probe(dev, PTR_ERR(enable_gpio),
+ "Failed to get enable GPIO\n");
+
rstc = devm_reset_control_get_optional_exclusive_deasserted(dev, NULL);
if (IS_ERR(rstc))
return dev_err_probe(dev, PTR_ERR(rstc),