]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit - drivers/iio/adc/sun4i-gpadc-iio.c
iio: adc: sun4i-gpadc-iio: move code used in MFD probing to new function
authorQuentin Schulz <quentin.schulz@free-electrons.com>
Wed, 5 Apr 2017 09:06:29 +0000 (11:06 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sat, 8 Apr 2017 16:34:03 +0000 (17:34 +0100)
commite3f6e7263b823c9a43ec5a24be68adad54897666
treec43e4f7c14e12fef7f5cfd2e7bcabc0c8f17b317
parent69780a3bbc0b1e7e234aa03626037e0b7571b6ac
iio: adc: sun4i-gpadc-iio: move code used in MFD probing to new function

This moves code used in MFD probing to a new sun4i_gpadc_probe_mfd
function.

This driver was initially written for A10, A13 and A31 SoCs which
already had a DT binding for this IP, thus we needed to use an MFD to
probe the different drivers without changing the DT binding of these
SoCs.

For SoCs that will require to create a DT binding for this IP, we can
avoid using an MFD, thus we need two separate functions: one for probing
via MFD and one for probing without MFD.

This split the code specific to MFD probing in a function separated from
the driver probe function.

Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/sun4i-gpadc-iio.c