iio: adc: axp20x_adc: make it possible to probe from DT

To prepare for a future patch that will add a DT node for the ADC, make
axp20x_adc able to probe from DT and get the per-variant data from
of_device_id.data since platform_device_id.driver_data won't be set when
probing by DT.

Leave the ability to probe via platform for driver compatibility with
old DTs.

Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Quentin Schulz 2018-01-15 11:33:37 +01:00 • committed by Jonathan Cameron
commit 359163d786