Commit Graph

400556 Commits

Author SHA1 Message Date
Juergen Beisert
e9c88fb5cf Staging/iio/adc/touchscreen/MXS: provide devicetree adaption
This is an RFC for the new touchscreen properties.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Tested-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
CC: linux-arm-kernel@lists.infradead.org
CC: linux-input@vger.kernel.org
CC: devel@driverdev.osuosl.org
CC: Marek Vasut <marex@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
CC: devicetree@vger.kernel.org
2013-10-01 16:19:17 +01:00
Juergen Beisert
cd6c558652 Staging/iio/adc/touchscreen/MXS: remove old touchscreen detection implementation
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Tested-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>

CC: linux-arm-kernel@lists.infradead.org
CC: linux-input@vger.kernel.org
CC: devel@driverdev.osuosl.org
CC: Marek Vasut <marex@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
2013-10-01 16:19:17 +01:00
Juergen Beisert
dee05308f6 Staging/iio/adc/touchscreen/MXS: add interrupt driven touch detection
For battery driven systems it is a very bad idea to collect the touchscreen
data within a kernel busy loop.

This change uses the features of the hardware to delay and accumulate samples in
hardware to avoid a high interrupt and CPU load.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Tested-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>

CC: linux-arm-kernel@lists.infradead.org
CC: linux-input@vger.kernel.org
CC: devel@driverdev.osuosl.org
CC: Marek Vasut <marex@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: linux-input@vger.kernel.org
2013-10-01 16:19:17 +01:00
Juergen Beisert
8c06f71444 Staging/iio/adc/touchscreen/MXS: add i.MX23 support to the LRADC touchscreen driver
Distinguish i.MX23 and i.MX28 at runtime and do the same for both SoC at least
for the 4 wire touchscreen.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Tested-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Teseted-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>

CC: linux-arm-kernel@lists.infradead.org
CC: linux-input@vger.kernel.org
CC: devel@driverdev.osuosl.org
CC: Marek Vasut <marex@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
2013-10-01 16:19:16 +01:00
Juergen Beisert
f0b83cc846 Staging/iio/adc/touchscreen/MXS: simplify register access
Replace the individual register access by a few shared access function to make the
code easier to read and in order to add the i.MX23 SoC in the next step.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Tested-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>

CC: linux-arm-kernel@lists.infradead.org
CC: linux-input@vger.kernel.org
CC: devel@driverdev.osuosl.org
CC: Marek Vasut <marex@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
2013-10-01 16:19:16 +01:00
Juergen Beisert
7e4d4a6fdb Staging/iio/adc/touchscreen/MXS: separate i.MX28 specific register bits
In order to support i.MX23 and i.MX28 within one driver we need to separate the
register definitions which differ in both SoC variants.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Tested-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>

CC: linux-arm-kernel@lists.infradead.org
CC: linux-input@vger.kernel.org
CC: devel@driverdev.osuosl.org
CC: Marek Vasut <marex@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
2013-10-01 16:19:16 +01:00
Juergen Beisert
ccff529763 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 <jbe@pengutronix.de>
Tested-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>

CC: linux-arm-kernel@lists.infradead.org
CC: linux-input@vger.kernel.org
CC: devel@driverdev.osuosl.org
CC: Fabio Estevam <fabio.estevam@freescale.com>
CC: Jonathan Cameron <jic23@cam.ac.uk>
2013-10-01 16:19:16 +01:00
Juergen Beisert
18da755de5 Staging/iio/adc/touchscreen/MXS: add proper clock handling
The delay units inside the LRADC depend on the presence of a 2 kHz clock.
This change enables the clock to be able to use the delay unit for the
touchscreen part of the driver.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Tested-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:15 +01:00
Peter Meerwald
dd28e48278 staging:iio:hmc5843: Introduce helper functions to show/check list of int pairs
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:15 +01:00
Peter Meerwald
9728fe3f8f staging:iio:hmc5843: Tighten comments
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:15 +01:00
Peter Meerwald
511c81e64a staging:iio:hmc5843: Remove unused LSB register #defines
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:14 +01:00
Peter Meerwald
d4dc0a349e staging:iio:hmc5843: Use INFO_SAMP_FREQ
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:14 +01:00
Peter Meerwald
8e2e2971b0 staging:iio:hmc5843: Rewrite init function
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:14 +01:00
Peter Meerwald
8a5c191324 staging:iio:hmc5843: Add pointer to i2c client to data struct
and use it to simplify code

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:14 +01:00
Lars-Peter Clausen
c2b2db7101 iio: Update unit of the voltage scale in the documentation
The documentation says that the result of raw * scale should be in microvolts,
but in reallity all drivers actually report the scale so that the result is in
millivolts. So update the documentation to match reallity.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:14 +01:00
Lars-Peter Clausen
bfbab2bcf9 staging:iio:spear_adc: Report scale as fractional value
Move the complexity of calculating the fixed point scale to the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:13 +01:00
Lars-Peter Clausen
4f9be98586 staging:iio:ad7746: Report scale as fractional value
Move the complexity of calculating the fixed point scale to the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:13 +01:00
Lars-Peter Clausen
b740f48a3d staging:iio:ad799x: Report scale as fractional value
Move the complexity of calculating the fixed point scale to the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:13 +01:00
Lars-Peter Clausen
c0d014122d staging:iio:ad7780: Report scale as fractional value
Move the complexity of calculating the fixed point scale to the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:13 +01:00
Lars-Peter Clausen
9324131b5a staging:iio:ad7606: Report scale as fractional value
Move the complexity of calculating the fixed point scale to the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:13 +01:00
Lars-Peter Clausen
d6570b33a1 staging:iio:ad7280a: Report scale as fractional value
Move the complexity of calculating the fixed point scale to the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:13 +01:00
Lars-Peter Clausen
b2171677cb iio:max1363: Report scale as fractional value
Move the complexity of calculating the fixed point scale to the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:12 +01:00
Lars-Peter Clausen
c45e561ee8 iio:at91: Report scale as fractional value
Move the complexity of calculating the fixed point scale to the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:12 +01:00
Lars-Peter Clausen
488a21827a iio:ad7791: Report scale as fractional value
Move the complexity of calculating the fixed point scale to the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:12 +01:00
Lars-Peter Clausen
d88c89db9a iio:ad7476: Report scale as fractional value
Move the complexity of calculating the fixed point scale to the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:12 +01:00
Lars-Peter Clausen
2ebc39c0bb iio:ad7266: Report scale as fractional value
Move the complexity of calculating the fixed point scale to the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:12 +01:00
Lars-Peter Clausen
b117f96f49 iio:mcp4725: Report scale as fractional value
Move the complexity of calculating the fixed point scale to the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:11 +01:00
Lars-Peter Clausen
998f129c76 iio:max517: Report scale as fractional value
Move the complexity of calculating the fixed point scale to the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:11 +01:00
Lars-Peter Clausen
213983cd32 iio:ad5791: Report scale as fractional value
Move the complexity of calculating the fixed point scale to the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:11 +01:00
Lars-Peter Clausen
3f83dae884 iio:ad5764: Report scale as fractional value
Move the complexity of calculating the fixed point scale to the core.

Also fix a off by one error in the comment describing the transfer function.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:11 +01:00
Lars-Peter Clausen
ae76751f67 iio:ad5755: Report scale as fractional value
Move the complexity of calculating the fixed point scale to the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:10 +01:00
Lars-Peter Clausen
ecc7e948bc iio:ad5686: Report scale as fractional value
Move the complexity of calculating the fixed point scale to the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:10 +01:00
Lars-Peter Clausen
14229e87a9 iio:ad5624r: Report scale as fractional value
Move the complexity of calculating the fixed point scale to the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:10 +01:00
Lars-Peter Clausen
54ea14339d iio:ad5504: Report scale as fractional value
Move the complexity of calculating the fixed point scale to the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:09 +01:00
Lars-Peter Clausen
0a99b60143 iio:ad5446: Report scale as fractional value
Move the complexity of calculating the fixed point scale to the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:09 +01:00
Lars-Peter Clausen
bc7c49bc77 iio:ad5421: Report scale as fractional value
Move the complexity of calculating the fixed point scale to the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:09 +01:00
Lars-Peter Clausen
4f2c188597 iio:ad5380: Report scale as fractional value
Move the complexity of calculating the fixed point scale to the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:09 +01:00
Lars-Peter Clausen
ca3bc8b626 iio:ad5360: Report scale as fractional value
Move the complexity of calculating the fixed point scale to the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:08 +01:00
Lars-Peter Clausen
25682ae5e4 iio:ad5064: Report scale as fractional value
Move the complexity of calculating the fixed point scale to the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:08 +01:00
Srinivas Pandruvada
7d3c192df0 IIO: call sensor hub open close function
Call hid_sensor_hub_device_open when user space opens device and call
hid_sensor_hub_device_close when device is closed. This helps in
saving power.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:08 +01:00
Srinivas Pandruvada
1df3a40115 HID: Delay opening HID device
Don't call hid_open_device till there is actually an user. This saves
power by not opening underlying transport for HID. Also close device
if there are no active mfd client using HID sensor hub.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01 16:19:08 +01:00
Greg Kroah-Hartman
de40d12098 staging: lustre: fix bug with LL_MRF_RETURN in loop_make_request
Turns out that LL_MRF_RETURN is "void" so loop_make_request() would fall
through to the error path for a successful call.  Either this never
matters, or the error path really doesn't do anything.

Fix it up to do what the code is written to look like it is doing, if
that really is what it should be doing is another story...

Cc: Peng Tao <tao.peng@emc.com>
Cc: Zhao Hongjiang <zhaohongjiang@huawei.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-30 20:46:36 -07:00
Greg Kroah-Hartman
3ec65cb350 staging: lustre: remove ll_mrf_ret
It's just 'void' and only used in one place, so just remove it, it's
useless.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Zhao Hongjiang <zhaohongjiang@huawei.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-30 20:14:42 -07:00
Sachin Kamat
bcf7bea44e staging: cxt1e1: linux.c: Return negative error codes
Return negative error codes as is followed in the rest of the
kernel.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-30 18:48:41 -07:00
Sachin Kamat
8654cda06c staging: cxt1e1: hwprobe.c: Return negative error codes
Return negative error codes as is followed in the rest of the
kernel.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-30 18:48:41 -07:00
Sachin Kamat
b6689c225e staging: cxt1e1: musycc.c: Return negative error codes
Return negative error codes as is followed in the rest of the
kernel.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-30 18:48:40 -07:00
Sachin Kamat
360d26e420 staging: cxt1e1: pmcc4_drv.c: Use NULL instead of 0
Pointers should be assigned NULL instead of 0.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-30 18:48:40 -07:00
Sachin Kamat
c11afaae49 staging: cxt1e1: sbecrc.c: Use NULL instead of 0
Pointers should be assigned NULL instead of 0.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-30 18:48:40 -07:00
Sachin Kamat
bb0a9747b4 staging: cxt1e1: hwprobe.c: Use NULL instead of 0
Pointers should be assigned NULL instead of 0.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-30 18:48:40 -07:00
Sachin Kamat
95f5632d87 staging: cxt1e1: sbeproc.c: Use NULL instead of 0
Pointers should be assigned NULL instead of 0.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-30 18:48:40 -07:00