iio: adc: meson: fix core clock enable/disable moment
authorGeorge Stark <gnstark@sberdevices.ru>
Fri, 21 Jul 2023 10:23:08 +0000 (13:23 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 22 Jul 2023 17:12:53 +0000 (18:12 +0100)
commit09738ccbc4148c62d6c8c4644ff4a099d57f49ad
treec5684c6acd48c045675665ec884be63d38c19884
parentb2a69969908fcaf68596dfc04369af0fe2e1d2f7
iio: adc: meson: fix core clock enable/disable moment

Enable core clock at probe stage and disable it at remove stage.
Core clock is responsible for turning on/off the entire SoC module so
it should be on before the first module register is touched and be off
at very last moment.

Fixes: 3adbf3427330 ("iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs")
Signed-off-by: George Stark <gnstark@sberdevices.ru>
Link: https://lore.kernel.org/r/20230721102413.255726-2-gnstark@sberdevices.ru
Cc: <stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/meson_saradc.c