iio: pressure: bmp280: support supply regulators
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 30 Jun 2016 01:48:48 +0000 (03:48 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 3 Jul 2016 10:26:24 +0000 (11:26 +0100)
commitbd525e6c7521c45785c87d6ecade4e047634cd3c
tree99a9cc2f0befc90d1fc5b5a077239fe52b2a851b
parent60b1addba2de4267bfd07ce7e769b30e9f074c2a
iio: pressure: bmp280: support supply regulators

The BMP085/BMP180/BMP280 is supplied with two power sources:
VDDA (analog power) and VDDD (digital power). As these may come
from regulators (as on the APQ8060 Dragonboard) we need the driver
to attempt to fetch and enable these regulators.

We FAIL if we cannot: boards should either define:
- Proper regulators if present
- Define fixed regulators if power is hardwired to the component
- Rely on dummy regulators (will be present on all DT systems and
  any boardfile system that calls regulator_has_full_constraints().

Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/pressure/bmp280.c