]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: light: vcnl4000: move power enablement from init to probe
authorErikas Bitovtas <xerikasxx@gmail.com>
Fri, 20 Mar 2026 16:45:38 +0000 (18:45 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 21 Mar 2026 12:40:29 +0000 (12:40 +0000)
commit1c9cb53572ee67d19c43191fe02eb937173ee9a7
tree08eb4548d8baeac3d8f0a972c4a0f11d091e5e52
parent7e1d6b37c8b560d7ecf3c6f63a8d64a585b8ec62
iio: light: vcnl4000: move power enablement from init to probe

Given both vcnl4000_init() and vcnl4200_init() end with
dev->chip_spec->set_power_state(), they can be called once from the
probe to enable the sensors. Move the set_power_state function from init
and call it after init function in probe.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/vcnl4000.c