From: Juergen Beisert Date: Mon, 23 Sep 2013 14:36:00 +0000 (+0100) Subject: Staging/iio/adc/touchscreen/MXS: distinguish i.MX23's and i.MX28's LRADC X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ccff52976383c7aff13588e81f23eddaac1dcd05;p=linux-beck.git Staging/iio/adc/touchscreen/MXS: distinguish i.MX23's and i.MX28's LRADC The LRADC units in i.MX23 and i.MX28 differ and we need to distinguish both SoC variants in order to make the touchscreen work on i.MX23 Signed-off-by: Juergen Beisert Tested-by: Marek Vasut Acked-by: Marek Vasut Tested-by: Lothar Waßmann Signed-off-by: Jonathan Cameron CC: linux-arm-kernel@lists.infradead.org CC: linux-input@vger.kernel.org CC: devel@driverdev.osuosl.org CC: Fabio Estevam CC: Jonathan Cameron --- diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c index 93b25ca433cb..1a1219b82233 100644 --- a/drivers/staging/iio/adc/mxs-lradc.c +++ b/drivers/staging/iio/adc/mxs-lradc.c @@ -177,6 +177,8 @@ struct mxs_lradc { struct input_dev *ts_input; struct work_struct ts_work; + + enum mxs_lradc_id soc; }; #define LRADC_CTRL0 0x00 @@ -917,6 +919,7 @@ static int mxs_lradc_probe(struct platform_device *pdev) } lradc = iio_priv(iio); + lradc->soc = (enum mxs_lradc_id)of_id->data; /* Grab the memory area */ iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);