]> git.baikalelectronics.ru Git - kernel.git/commit
iio: st_sensors: fetch and enable regulators unconditionally
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 25 Aug 2016 22:10:08 +0000 (00:10 +0200)
committerJonathan Cameron <jic23@kernel.org>
Mon, 29 Aug 2016 18:41:09 +0000 (19:41 +0100)
commit22b98de055b502baecf345d5ea94f2694a5978c1
tree5d6dcd79f4f0bd4fac0a9b26b0e1e413e46798eb
parent47259fc11075c068401ef09c517fc9fec30ddc98
iio: st_sensors: fetch and enable regulators unconditionally

These sensors all have Vdd and Vdd_IO lines. This means the
supplies are *not* optional (optional means that the supply is
optional in the electrical sense, not the software sense)
so we need to get the and enable them at all times.

If the device tree or board file does not define suitable
regulators for the component, it will be substituted by a
dummy regulator, or, if regulators are disabled altogether,
by stubs. There is no need to use the IS_ERR_OR_NULL() check
that is considered harmful.

Cc: Giuseppe Barba <giuseppe.barba@st.com>
Cc: Denis Ciocca <denis.ciocca@st.com>
Cc: Crestez Dan Leonard <leonard.crestez@intel.com>
Cc: Gregor Boirie <gregor.boirie@parrot.com>
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/common/st_sensors/st_sensors_core.c