Commit graph

389608 commits

Author SHA1 Message Date
Lidza Louina 5ba5b89ab6 staging: dgnc: neo.c: removes trailing whitespace
This patch removes trailing whitespace in
the dgnc_neo.c file.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 09:43:53 -07:00
Lidza Louina 0986cda11e staging: dgnc: mgmt.c: removes trailing whitespace
This patch removes trailing whitespace in
the dgnc_mgmt.c file.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 09:43:53 -07:00
Lidza Louina 013c951d54 staging: dgnc: kcompat.h: removes trailing whitespace
This patch removes trailing whitespace in
the kcompat.h file.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 09:43:53 -07:00
Lidza Louina 4c1c56e62c staging: dgnc: driver.h: removes trailing whitespace
This patch removes trailing whitespace in
the driver.h file.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 09:43:53 -07:00
Lidza Louina 817b784716 staging: dgnc: driver.c: removes trailing whitespace
This patch removes trailing whitespace in
the dgnc_driver.c file.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 09:43:53 -07:00
Lidza Louina 1ef56a42e9 staging: dgnc: cls.h: removes trailing whitespace
This patch removes trailing whitespace in
the dgnc_cls.h file.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 09:43:53 -07:00
Lidza Louina 5ca46fd4c8 staging: dgnc: cls.c: removes trailing whitespace
This patch removes trailing whitespace in
the dgnc_cls.c file.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 09:43:52 -07:00
Lidza Louina 53c55fa228 staging: dgnc: add driver to kernel build
This patch adds the dgnc driver to the kernel build process.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 09:40:51 -07:00
Lidza Louina 62a86e50e7 staging: dgnc: removes ifdef HAVE_UNLOCKED_IOCTL conditionals
This patch removes the HAVE_UNLOCKED_IOCTL conditional
statements from driver.c, mgmt.c and mgmt.h. This was
used to support older kernels. It isn't needed now.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-20 16:28:40 -07:00
Lidza Louina f1900e78cf staging: dgnc: driver.c: fixes warning about assigning pointer
This patch fixes a warning associated with assigining
a pointer in the dgnc_mbuf function.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-20 16:28:40 -07:00
Malcolm Priestley 1da4ee2050 staging: vt6656: desc.h remove typedef tagSTxDataHead_a_FB to new structure in rxtx.h
To new structure.
typedef struct tagSTxDataHead_a_FB -> struct vnt_tx_datahead_a_fb

This is only needed by rxtc.c so moved to rxtx.h visible to
vnt_rts* structures which it will eventually form part of
their structure.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:39:19 -07:00
Malcolm Priestley 558becf188 staging: vt6656: desc.h remove typedef tagSTxDataHead_ab to new structure in rxtx.h
To new structure.
typedef struct tagSTxDataHead_ab -> struct vnt_tx_datahead_ab

This is only needed by rxtc.c so moved to rxtx.h visible to
vnt_rts* structures which it will eventually form part of
their structure.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:39:19 -07:00
Malcolm Priestley 7c05c5451d staging: vt6656: desc.h remove typedef tagSTxDataHead_g_FB to new structure in rxtx.h
To new structure.
typedef struct tagSTxDataHead_g_FB -> struct vnt_tx_datahead_g_fb

This is only needed by rxtc.c so moved to rxtx.h visible to
vnt_rts*/vnt_cts* structures which it will eventually form part of
their structure.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:39:19 -07:00
Malcolm Priestley 7e60a3de27 staging: vt6656: desc.h: remove typedef struct tagSTxDataHead_g to new structure in rxtx.h
To new structure.
typedef struct tagSTxDataHead_g -> struct vnt_tx_datahead_g

This is only needed by rxtc.c so moved to rxtx.h visible to
vnt_rts*/vnt_cts* structures which it will eventually form part of
their structure.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:39:19 -07:00
Malcolm Priestley 57107d4364 staging: vt6656: desc.h remove dead code typedef struct tagSRrvTime_atim.
Remove dead structure tagSRrvTime_atim.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:39:19 -07:00
Malcolm Priestley 976467d3cb staging: vt6656: desc.h remove typedef SRrvTime_ab to new structure.
To new structure.
typedef struct tagSRrvTime_ab -> struct vnt_rrv_time_ab

This is only needed by rxtc.c so moved to rxtx.h and
will eventually form part of the structure of
struct vnt_tx_buffer.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:39:18 -07:00
Malcolm Priestley 4f990057bc staging: vt6656: desc.h: Move typedef struct tagSRrvTime_gCTS to new structure in rxtx.h
To new structure.
typedef struct tagSRrvTime_gCTS -> struct vnt_rrv_time_cts

This is only needed by rxtc.c so moved to rxtx.h and
will eventually form part of the structure of
struct vnt_tx_buffer.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:39:18 -07:00
Malcolm Priestley 6398a59bec staging: vt6656: desc.h: Move typedef tagSRrvTime_gRTS to new structure in rxtx.h
To new structure.
typedef struct tagSRrvTime_gRTS -> struct vnt_rrv_time_rts

This is only needed by rxtc.c so moved to rxtx.h and
will eventually form part of the structure of
struct vnt_tx_buffer.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:39:18 -07:00
Fabio Estevam ce9c1cef9b imx-drm: ipuv3-crtc: Add MODULE_ALIAS()
Add MODULE_ALIAS, so that auto module loading can work.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:38:03 -07:00
Fabio Estevam b2da05ff47 imx-drm: parallel-display: Add MODULE_ALIAS()
Add MODULE_ALIAS, so that auto module loading can work.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:38:03 -07:00
Fabio Estevam 52db752c3d imx-drm: imx-tve: Add MODULE_ALIAS()
Add MODULE_ALIAS, so that auto module loading can work.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:38:03 -07:00
Fabio Estevam bc627387a9 imx-drm: imx-ldb: Add MODULE_ALIAS()
Add MODULE_ALIAS, so that auto module loading can work.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:38:03 -07:00
Fabio Estevam 85d0b7809b imx-drm: ipu-di: Check the return value from clk_prepare_enable()
clk_prepare_enable() may fail, so let's check its return value and propagate it
in the case of error.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:38:02 -07:00
Masanari Iida 9379fd547e staging: xillybus: Fix typo in comment
Correct spelling typo in comments.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:31:58 -07:00
navin patidar ecc837acca staging: dgrp: add __init/__exit macros
add __init/__exit macros to related init/cleanup functions.

Signed-off-by: navin patidar <navinp@cdac.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:31:58 -07:00
Won Kang bf0373f1c6 staging: gdm7240: a TTY rewrite according to the latest TTY APIs
Fixed mis-use of mutex for gdm_table. gdm_table is refered to only
inside tty_install and port destrcut, and usb callbacks use internal
reference which was saved during urb submission

Signed-off-by: Won Kang <wonkang@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:30:59 -07:00
Won Kang 7ee4c1b949 staging: gdm7240: a TTY rewrite according to the latest TTY APIs
Removed the old style reference countings and termios.
Renamed variables to meaninful ones.

Signed-off-by: Won Kang <wonkang@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:30:59 -07:00
Jens Frederich 7d5b640dfa Staging: olpc_dcon: Already completed TODO entry removed
The TODO entry - drop global variables, use a proper olpc_dcon_priv
struct - is already finished. The driver has no global variables.
It uses the private structure 'dcon_priv'.

Signed-off-by: Jens Frederich <jfrederich@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:29:23 -07:00
Jens Frederich 9467d11b0d Staging: olpc_dcon: fix typo in olpc_dcon.h
The backlight brightness register (DCON_REG_BRIGHT) address is 0xa.

Signed-off-by: Jens Frederich <jfrederich@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:29:23 -07:00
Greg Kroah-Hartman bad4f537ee Second round of new drivers, features and cleanups for IIO in the 3.12 cycle.
New driver:
 
 1) tmp006 IR thermopile driver.  This is an unusual temperature sensor
    and was taken in to IIO with the knowledge and agreement of a hwmon
    maintainer.
    It measures remote temperature using infrared emissions.
    I guess taking this may mean we have to fight off submissions of
    devices much more suited to hwmon but such is life and we end up
    doing this from time to time already.
 
 2) twl6030 adc driver.
 
 Cleanups:
 
 1) More devm_* cleanups following on from the introduction of
    devm_iio_device_alloc.  Mostly an heroic effort from
    Sachin Kamat!
 
 2) Introduce devm_iio_trigger_alloc etc to handle trigger
    allocation and deallocation in a managed fashion.  There
    aren't as many instances of triggers as devices, but this
    will allow futher reduction in error patch complexity in
    some of our most complex drivers making it a very good thing.
 3) Trivial removal of unused defines in adjd_s311
 
 4) Drop some write_raw_get_fmt callbacks where they were only
    returning the default value.
 
 5) Change mxs-lradc realbits to 12.  Whilst an 18bit register
    is used on the device, in its current mode only 12 bits of
    useful data are returned.  For now the packing is unchanged
    in the buffer and this change mainly effects the input support
    in the driver.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.20 (GNU/Linux)
 
 iQIcBAABAgAGBQJSEoZKAAoJEFSFNJnE9BaIqKgP/iuIRt5dzv7utQqoIm+vrE5B
 xVKjAGgTzPwpkr1wzMEfVF0BqtoxEi9Y6hwAQpTI41fo3Kk0Y5TOtTRf0jlJw4pn
 fMUQt3JC1daU/5nruU7slsAh0NcWV9Tdl1TdzSHmntvHwBcnd36kzdWX+9UxS6cP
 o35mz8Fgt4qHt/QsiN/dLqOuAdS2W2FXAuLThW0ze4xiK50sMSGfysVhfkAQQidc
 TH+/aIPfgBKzCyMrxy87E+fKGAb0CeqQNmdTJs92+s1Lr6QU6jRePIgLMCB+FPRJ
 R1BeWwgk49HPxl+Rqw55ZGUmnxYPoCDyYY35D8pPTkbMhB1VrgKF/uMbgpnFZdyR
 g+wnO2g/BfFz7fDK0vdZbcKro0sdbYhBYcvNr7yTz494eeyqTQapzDy+LlQ/nYL0
 2BKNMm7b8SyaJxB9UHNoOUAvnCQZ0+jsE87V5EH8i3slQ9fte84rdkWmFSNrf+S3
 kRrN7seMYUOBaTSmSDJvkCYbnu9NoF+zCuNKXrx2gyyuTt5EAp2yve4KD5mcH7de
 9iLZr3KiTH9a7Bd3JapQids7dAAhWMZm24qxKZ2NqPLyq9zpueoRAePjHloC02TF
 oJUvRRMQEyKjiUO7eoYxtc7fcAXog8pszNCXdVCigO0V9d3DVwA0pt0/G8kkkCeq
 10zoDRlWZI9mJ5J64Ajy
 =285a
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-3.12b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Second round of new drivers, features and cleanups for IIO in the 3.12 cycle.

New driver:

1) tmp006 IR thermopile driver.  This is an unusual temperature sensor
   and was taken in to IIO with the knowledge and agreement of a hwmon
   maintainer.
   It measures remote temperature using infrared emissions.
   I guess taking this may mean we have to fight off submissions of
   devices much more suited to hwmon but such is life and we end up
   doing this from time to time already.

2) twl6030 adc driver.

Cleanups:

1) More devm_* cleanups following on from the introduction of
   devm_iio_device_alloc.  Mostly an heroic effort from
   Sachin Kamat!

2) Introduce devm_iio_trigger_alloc etc to handle trigger
   allocation and deallocation in a managed fashion.  There
   aren't as many instances of triggers as devices, but this
   will allow futher reduction in error patch complexity in
   some of our most complex drivers making it a very good thing.
3) Trivial removal of unused defines in adjd_s311

4) Drop some write_raw_get_fmt callbacks where they were only
   returning the default value.

5) Change mxs-lradc realbits to 12.  Whilst an 18bit register
   is used on the device, in its current mode only 12 bits of
   useful data are returned.  For now the packing is unchanged
   in the buffer and this change mainly effects the input support
   in the driver.
2013-08-19 15:23:55 -07:00
Sachin Kamat cc566fd5e5 iio: dac: max517: Use devm_iio_device_alloc
Using devm_iio_device_alloc makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Roland Stigge <stigge@antcom.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19 20:38:50 +01:00
Sachin Kamat 66e670aa08 iio: dac: ad7303: Use devm_* APIs
devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19 20:37:20 +01:00
Sachin Kamat 0d7c04d33f iio: dac: ad5791: Use devm_* APIs
devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19 20:35:35 +01:00
Sachin Kamat 7ff0de3faa iio: dac: ad5764: Use devm_* APIs
devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19 20:35:32 +01:00
Sachin Kamat fd047294e2 iio: dac: ad5755: Use devm_iio_device_alloc
Using devm_iio_device_alloc makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19 20:32:53 +01:00
Sachin Kamat edf3fd4141 iio: dac: ad5686: Use devm_* APIs
devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19 20:31:04 +01:00
Sachin Kamat 75238230cc iio: dac: ad5624r_spi: Use devm_* APIs
devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19 20:29:34 +01:00
Sachin Kamat 8571ebf7fc iio: dac: ad5504: Use devm_* APIs
devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19 20:27:24 +01:00
Sachin Kamat cd5e578541 iio: dac: ad5449: Use devm_* APIs
devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19 20:26:25 +01:00
Sachin Kamat ba7272954e iio: dac: ad5446: Use devm_* APIs
devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19 20:25:43 +01:00
Sachin Kamat 62a308a62d iio: dac: ad5421: Use devm_* APIs
devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19 20:24:52 +01:00
Sachin Kamat c815ad372b iio: dac: ad5380: Use devm_* APIs
devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19 20:23:53 +01:00
Sachin Kamat 400d36e68d iio: dac: ad5360: Use devm_* APIs
devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19 20:22:44 +01:00
Sachin Kamat c367982ad9 iio: dac: ad5064: Use devm_* APIs
devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19 20:20:28 +01:00
Oleksandr Kozaruk fa659a40b8 iio: adc: twl6030-gpadc: Use devm_* API family
Using devm_iio_device_alloc and devm_request_threaded_irq makes
code simpler.

Signed-off-by: Oleksandr Kozaruk <oleksandr.kozaruk@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19 20:15:14 +01:00
Peter Meerwald 4c73029265 iio: adjd_s311: Cleanup unused #defines
using word reads, no need for HI/LO register #defines

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19 20:12:03 +01:00
Peter Meerwald 0c0427acd5 iio: Remove unnecessary _write_raw_get_fmt() in several hid-sensor drivers
IIO_VAL_INT_PLUS_MICRO is the default, no need to return it explicitly

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: srinivas pandruvada <srinivas.pandruvada@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19 20:01:25 +01:00
Jacek Anaszewski d536321df3 iio: trigger: implement devm_iio_trigger_alloc/devm_iio_triger_free
Add a resource managed devm_iio_trigger_alloc()/devm_iio_triger_free()
to automatically clean up triggers allocated by IIO drivers, thus
leading to simplified IIO drivers code.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyunmin Park <kyungmin.park@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-17 19:34:52 +01:00
Oleksandr Kozaruk 1696f36482 iio: twl6030-gpadc: TWL6030, TWL6032 GPADC driver
The GPADC is general purpose ADC found on TWL6030, and TWL6032 PMIC,
known also as Phoenix and PhoenixLite.

The TWL6030 and TWL6032 have GPADC with 17 and 19 channels
respectively. Some channels have current source and are used for
measuring voltage drop on resistive load for detecting battery ID
resistance, or measuring voltage drop on NTC resistors for external
temperature measurements. Some channels measure voltage, (i.e. battery
voltage), and have voltage dividers, thus, capable to scale voltage.
Some channels are dedicated for measuring die temperature.

Some channels are calibrated in 2 points, having offsets from ideal
values kept in trim registers. This is used to correct measurements.

The differences between GPADC in TWL6030 and TWL6032:
- 10 bit vs 12 bit ADC;
- 17 vs 19 channels;
- channels have different purpose(i.e. battery voltage
  channel 8 vs channel 18);
- trim values are interpreted differently.

Based on the driver patched from Balaji TK, Graeme Gregory, Ambresh K,
Girish S Ghongdemath.

Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Oleksandr Kozaruk <oleksandr.kozaruk@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-17 15:50:57 +01:00
Hector Palacios 1eb70a9745 iio: mxs-lradc: change the realbits to 12
The LRADC virtual channels have an 18 bit field to store the sum of up
to 2^5 accumulated samples. The read_raw function however only operates
over a single sample (12 bit resolution).
In order to use this field for scaling operations, we need it to be the
exact resolution value of the LRADC.
Besides, the driver was using an 18 bit mask (LRADC_CH_VALUE_MASK) to
report touch coordinates to userland. A 12 bit mask should be used instead
or else the touch libraries will expect a coordinates range between 0
and 0x3ffff (18 bits), instead of between 0 and 0xfff (12 bits).

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-17 15:50:57 +01:00