OSDN Git Service

iio: st_sensors: core and lsm9ds0 switch to devm_regulator_bulk_get_enable()
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 16 Oct 2022 16:34:02 +0000 (17:34 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 23 Nov 2022 19:44:01 +0000 (19:44 +0000)
commit9e855d77b1ec57704d23e25761a97e6e64abed66
tree69039ea29ac6669090f57cd5e3a2e035c6742a96
parent72ce527c7bb599ac1d64ec5393f66a673b75de6b
iio: st_sensors: core and lsm9ds0 switch to devm_regulator_bulk_get_enable()

These drivers only turns the power on at probe and off via a custom
devm_add_action_or_reset() callback. The two regulators were handled
separately so also switch to bulk registration.
The new devm_regulator_bulk_get_enable() replaces all this boilerplate
code.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20221016163409.320197-8-jic23@kernel.org
drivers/iio/common/st_sensors/st_sensors_core.c
drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_core.c
include/linux/iio/common/st_sensors.h