iio: adc: stm32-adc: make safe adc disable
From ADC reference manual the software is allowed to write the control bit ADDIS of the ADC_CR register only if the ADC is enabled. Return immediately from stm32h7_adc_disable() if ADC is already disabled. Signed-off-by: NOlivier Moysan <olivier.moysan@foss.st.com> Reviewed-by: NFabrice Gasnier <fabrice.gasnier@foss.st.com> Link: https://lore.kernel.org/r/20220620154738.801706-2-olivier.moysan@foss.st.comSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
Showing
想要评论请 注册 或 登录