Skip to content

Commit

Permalink
iio: pressure: bmp280: Explicitly mark GPIO optional
Browse files Browse the repository at this point in the history
Show by using a corresponding API call that GPIO is optional.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  • Loading branch information
Andy Shevchenko authored and Jonathan Cameron committed Apr 19, 2020
1 parent 6085102 commit df6e712
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/iio/pressure/bmp280-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1066,9 +1066,9 @@ int bmp280_common_probe(struct device *dev,
usleep_range(data->start_up_time, data->start_up_time + 100);

/* 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 */
if (!IS_ERR(gpiod)) {
if (gpiod) {
dev_info(dev, "release reset\n");
gpiod_set_value(gpiod, 0);
}
Expand Down

0 comments on commit df6e712

Please sign in to comment.