Commit df6e7125 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Jonathan Cameron

iio: pressure: bmp280: Explicitly mark GPIO optional

Show by using a corresponding API call that GPIO is optional.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 6085102c
...@@ -1066,9 +1066,9 @@ int bmp280_common_probe(struct device *dev, ...@@ -1066,9 +1066,9 @@ int bmp280_common_probe(struct device *dev,
usleep_range(data->start_up_time, data->start_up_time + 100); usleep_range(data->start_up_time, data->start_up_time + 100);
/* Bring chip out of reset if there is an assigned GPIO line */ /* Bring chip out of reset if there is an assigned GPIO line */
gpiod = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); gpiod = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
/* Deassert the signal */ /* Deassert the signal */
if (!IS_ERR(gpiod)) { if (gpiod) {
dev_info(dev, "release reset\n"); dev_info(dev, "release reset\n");
gpiod_set_value(gpiod, 0); gpiod_set_value(gpiod, 0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment