]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
iio: adc: meson-saradc: add Meson8b SoC compatibility
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Sat, 6 May 2017 13:49:29 +0000 (15:49 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 7 May 2017 11:30:45 +0000 (12:30 +0100)
commit6c76ed31cd05add11f89d017a8de956935083d3b
tree023218f57523d0c52fa67878e6117af90f2f2926
parent400fd3a13310a7128d86ff99ec121c915f8f10bc
iio: adc: meson-saradc: add Meson8b SoC compatibility

Meson GX SoCs however use some magic bits to prevent simultaneous (=
conflicting, because only consumer should use the FIFO buffer with the
ADC results) usage by the Linux kernel and the bootloader (the BL30
bootloader uses the SAR ADC to read the CPU temperature).
This patch changes guards all BL30 functionality so it is skipped on
SoCs which don't have it. Since the hardware itself doesn't know whether
BL30 is available the internal meson_sar_adc_data is extended so this
information can be provided per of_device_id.data inside the driver.

Additionally the clocks "adc_clk" and "adc_sel" are not provided by the
clock-controller itself. "adc_sel" is not available at all. "adc_clk"
is provided by the SAR ADC IP block itself on Meson8b (and earlier).
This is already supported by the meson_saradc driver.

Finally this introduces new of_device_ids for the Meson8 and Meson8b
SoCs so the driver can be wired up in the corresponding DT.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/meson_saradc.c