]> git.karo-electronics.de Git - karo-tx-linux.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)
commitaeb55fff3891834e07a3144159a7298a19696af8
tree5d6dcd79f4f0bd4fac0a9b26b0e1e413e46798eb
parent7f270bc9a2d95967c09e759776a28a8d2a345c74
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