]> git.baikalelectronics.ru Git - kernel.git/commit
iio: adc: ti-ads1015: Convert to OF match data
authorMarek Vasut <marex@denx.de>
Mon, 28 Mar 2022 19:47:23 +0000 (21:47 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 4 Apr 2022 08:11:26 +0000 (09:11 +0100)
commitac6beafef2f361387756b94f657b2b2568a94794
tree47768979cd61d586af157a5c2ff787ced099e098
parent002bfeb5b5e0af7b965bc2a8eb76e469d3541f07
iio: adc: ti-ads1015: Convert to OF match data

Replace chip type enumeration in match data with pointer to static constant
structure which contains all the different chip properties in one place, and
then replace handling of chip type in probe() with simple copy of fields in
the new match data structure into struct iio_dev.

This reduces code and increases static data.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Cc: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20220328194725.149150-8-marex@denx.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ti-ads1015.c