diff --git a/drivers/iio/adc/ad_pulsar.c b/drivers/iio/adc/ad_pulsar.c index 37d7ba65e48ae..d925f95749895 100644 --- a/drivers/iio/adc/ad_pulsar.c +++ b/drivers/iio/adc/ad_pulsar.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -327,6 +328,7 @@ struct ad_pulsar_adc { const struct ad_pulsar_chip_info *info; struct iio_chan_spec *channels; struct spi_transfer *seq_xfer; + struct gpio_desc *turbo_gpio; unsigned int cfg; unsigned long ref_clk_rate; struct pwm_device *cnv; @@ -911,6 +913,13 @@ static int ad_pulsar_probe(struct spi_device *spi) if (ret) return ret; + /* REVISIT: for now, turbo mode is always enabled */ + adc->turbo_gpio = devm_gpiod_get_optional(&spi->dev, "turbo", + GPIOD_OUT_HIGH); + if (IS_ERR(adc->turbo_gpio)) + return dev_err_probe(&spi->dev, PTR_ERR(adc->turbo_gpio), + "Failed to get turbo GPIO\n"); + return devm_iio_device_register(&spi->dev, indio_dev); }