summaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/imx6ul_tsc.c
Commit message (Collapse)AuthorAgeFilesLines
* Input: imx6ul_tsc - generalize the averaging propertyGuy Shapiro2016-12-161-11/+27
| | | | | | | | Make the avarage-samples property a general touchscreen property rather than imx6ul device specific. Signed-off-by: Guy Shapiro <guy.shapiro@mobi-wize.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: imx6ul_tsc - convert int to u32Guy Shapiro2016-12-011-21/+21
| | | | | | | | | | | | | | | | | The code uses of_property_read_u32 and expects positive values. However, the values are stored in signed int variables. Additionally, the registers values are also stored in signed variables without a good reason (readl/writel expect u32). The only time this caused a real bug was in the new average-samples property, in which the property is numerically compared and implicitly expected to be positive. I believe it's better to change all the properties and registers to u32, for consistency and warnings reduction. Signed-off-by: Guy Shapiro <guy.shapiro@mobi-wize.com> Reported-by: Bjørn Forsman <bjorn.forsman@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: imx6ul_tsc - add mask when set REG_ADC_CFGHaibo Chen2016-12-011-1/+10
| | | | | | | | | Add mask of each function bits of REG_ADC_CFG, and clear these function bits first, otherwise use '|=' operation may get the wrong setting which depends on the original value of REG_ADC_CFG. Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Reviewed-by: Guy Shapiro <guy.shapiro@mobi-wize.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: imx6ul_tsc - add support for sample averagingGuy Shapiro2016-11-281-0/+18
| | | | | | | | | | | | The i.MX6UL internal touchscreen controller contains an option to average upon samples. This feature reduces noise from the produced touch locations. This patch adds sample averaging support to the imx6ul_tsc device driver. Signed-off-by: Guy Shapiro <guy.shapiro@mobi-wize.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: imx6ul_tsc - fix controller nameFabio Estevam2015-09-191-1/+1
| | | | | | We should better write "Touchscreen". Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: imx6ul_tsc - use the preferred method for kzalloc()Fabio Estevam2015-09-191-1/+1
| | | | | | | | | | | | According to Documentation/CodingStyle: "The preferred form for passing a size of a struct is the following: p = kmalloc(sizeof(*p), ...);" so do as suggested. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: imx6ul_tsc - check for negative return valueFabio Estevam2015-09-191-1/+1
| | | | | | We should check for negative values returned by platform_get_irq(). Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: imx6ul_tsc - propagate the errorsFabio Estevam2015-09-191-9/+19
| | | | | | | | imx6ul_adc_init() may fail in two cases, so we should better propagate the errors and make sure that the callers of this function also check and propagate the errors accordingly. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: touchscreen - add imx6ul_tsc driver supportHaibo Chen2015-09-051-0/+523
Freescale i.MX6UL contains a internal touchscreen controller, this patch add a driver to support this controller. Signed-off-by: Haibo Chen <haibo.chen@freescale.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>