iio: adc: axp20x_adc: make it possible to probe from DT
authorQuentin Schulz <quentin.schulz@free-electrons.com>
Mon, 15 Jan 2018 10:33:37 +0000 (11:33 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 30 Jan 2018 18:33:24 +0000 (18:33 +0000)
commit359163d786e2b05f3e3bd2db7f1629d7150d6dd2
tree80f9fa231280054be792dd53c030915132051860
parent22042a6e694db118cdb27e8a9ead21df046458df
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>
drivers/iio/adc/axp20x_adc.c