Re: [PATCH v4 3/8] mfd: stmpe: preparations for STMPE ADC driver

From: Lee Jones
Date: Fri Dec 21 2018 - 05:42:57 EST


On Wed, 12 Dec 2018, Philippe Schenker wrote:

> This prepares the MFD for the STMPE ADC driver. This commit introduces
> devicetree settings that are used by the ADC and adds an init function.
> Common ADC settings that are shared with the touchscreen driver can now
> reside in the overlying MFD.
>
> Signed-off-by: Stefan Agner <stefan@xxxxxxxx>
> Signed-off-by: Max Krummenacher <max.krummenacher@xxxxxxxxxxx>
> Signed-off-by: Philippe Schenker <philippe.schenker@xxxxxxxxxxx>
> ---
>
> I moved now all enables back to the subdevices. The disable of ADC
> block is now done at remove of mfd. I know this is not particularly
> right, the right way to do this would be with a refcounter.
>
> But I don't know how to implement this in this driver. If someone does
> not agree to disable adc in remove of mfd, please give me some advice
> in how to do it with refcounter.
>
> Changes in v4:
> - New patch: split mfd changes into this precursor patch
> - Export the added stmpe811_adc_commmon_init function
> - Disabling adc when mfd is removed
>
> Changes in v3: None
> Changes in v2:
> - Move code to setup ADC to MFD device, as it is used by both drivers
> adc and touchscreen
>
> drivers/mfd/Kconfig | 3 +-
> drivers/mfd/stmpe.c | 68 +++++++++++++++++++++++++++++++++++++++
> include/linux/mfd/stmpe.h | 10 ++++++
> 3 files changed, 80 insertions(+), 1 deletion(-)

For my own reference:
Acked-for-MFD-by: Lee Jones <lee.jones@xxxxxxxxxx>

--
Lee Jones [æçæ]
Linaro Services Technical Lead
Linaro.org â Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog