devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/5] iio: mxs-lradc: add support to optional divider_by_two
@ 2013-07-22 14:03 Hector Palacios
  2013-07-22 14:03 ` [PATCH v3 1/5] iio: mxs-lradc: change the realbits to 12 Hector Palacios
                   ` (4 more replies)
  0 siblings, 5 replies; 31+ messages in thread
From: Hector Palacios @ 2013-07-22 14:03 UTC (permalink / raw)
  To: linux-iio-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	jic23-DgEjT+Ai2ygdnm+yROfE0A, lars-Qo5EllUWu/uELgA04lAiVw,
	fabio.estevam-KZfg59tc24xl57MIdRCFDg, marex-ynQEQJNshbs,
	hector.palacios-i7dp0qKlBMg

Greetings,

This is v3 of the patchset that adds support to the optional 
divider_by_two of LRADC channels.

Changes in v3:
- Fix merge conflict with previous existing patch.
- Fix ampersand in function callback assignment.
- Removed unused parameters of function to read single sample.
- Ennumeration for two-dimensional array of scale (with divider
  by two disabled or enabled), for improved readability.
- Created struct with integer and nano parts of the scale 
  attribute, for improved readability.

Changes in v2:
- Fix the sample mask passed by the touchscreen driver to the input
  subsytem, to be 12 bits.
- Move the reference voltages to the Device Tree.
- Rebased to avoid conflict with Marek Vasut's prior patch.
- Use IIO_DEVICE_ATTR() macro for adding scale_available property to
  all channels.
- Make 'is_divided' unsigned int.

Notes:
- Other fixes were discussed in v1 but they were not part of this
  patchset changes, and should be handled in a separate patch.
- The 64bit math to calculate the integer and decimal parts of the
  scaling attribute is a bit unreadable but used in other similar
  drivers like ad7791, ad7793, and ad7192. If it is to be changed
  it should be done in parallel with these, in a different patch.

The first patch changes the realbits to 12. The 
second adds the channels reference voltages to the DT.
The following add the scale read operation, scale_available read 
operation, and scale write operation.

This was tested on a custom i.MX28 platform.
Could someone please test on an i.MX23?


Hector Palacios (5):
  iio: mxs-lradc: change the realbits to 12
  ARM: dts: add reference voltage property for MXS LRADC
  iio: mxs-lradc: add scale attribute to channels
  iio: mxs-lradc: add scale_available file to channels
  iio: mxs-lradc: add write_raw function to modify scale

 .../bindings/staging/iio/adc/mxs-lradc.txt         |   9 +-
 arch/arm/boot/dts/imx23.dtsi                       |   4 +
 arch/arm/boot/dts/imx28.dtsi                       |   4 +
 drivers/staging/iio/adc/mxs-lradc.c                | 255 ++++++++++++++++++---
 4 files changed, 242 insertions(+), 30 deletions(-)

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2013-09-23 13:39 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-22 14:03 [PATCH v3 0/5] iio: mxs-lradc: add support to optional divider_by_two Hector Palacios
2013-07-22 14:03 ` [PATCH v3 1/5] iio: mxs-lradc: change the realbits to 12 Hector Palacios
     [not found]   ` <1374501843-19651-2-git-send-email-hector.palacios-i7dp0qKlBMg@public.gmane.org>
2013-08-13 21:24     ` Jonathan Cameron
2013-07-22 14:04 ` [PATCH v3 2/5] ARM: dts: add reference voltage property for MXS LRADC Hector Palacios
     [not found]   ` <1374501843-19651-3-git-send-email-hector.palacios-i7dp0qKlBMg@public.gmane.org>
2013-07-22 18:34     ` Lars-Peter Clausen
     [not found]       ` <51ED7B47.2090104-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2013-07-22 22:06         ` Marek Vasut
     [not found]           ` <201307230006.53434.marex-ynQEQJNshbs@public.gmane.org>
2013-07-26  9:23             ` Alexandre Belloni
2013-08-13 21:23     ` Jonathan Cameron
     [not found]       ` <520AA3CD.1040008-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2013-08-14 14:44         ` Pawel Moll
2013-08-21 22:13           ` Alexandre Belloni
     [not found]             ` <52153B8E.7050309-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2013-08-22  6:17               ` Jonathan Cameron
2013-08-22 16:51                 ` Pawel Moll
2013-08-23 23:00                   ` Jonathan Cameron
     [not found]                     ` <5217E999.7020408-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2013-09-23 12:47                       ` Alexandre Belloni
     [not found]                         ` <52403845.5020002-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2013-09-23 13:39                           ` Hector Palacios
2013-08-22  8:05               ` Hector Palacios
     [not found]                 ` <5215C64D.3040004-i7dp0qKlBMg@public.gmane.org>
2013-08-22 16:50                   ` Pawel Moll
2013-08-22 16:41               ` Pawel Moll
2013-08-22 17:00                 ` Lars-Peter Clausen
2013-07-22 14:04 ` [PATCH v3 3/5] iio: mxs-lradc: add scale attribute to channels Hector Palacios
2013-07-22 14:04 ` [PATCH v3 4/5] iio: mxs-lradc: add scale_available file " Hector Palacios
2013-07-22 22:36   ` Marek Vasut
     [not found]     ` <201307230036.42046.marex-ynQEQJNshbs@public.gmane.org>
2013-07-23  7:00       ` Hector Palacios
     [not found]   ` <1374501843-19651-5-git-send-email-hector.palacios-i7dp0qKlBMg@public.gmane.org>
2013-07-23  8:46     ` Lars-Peter Clausen
     [not found]       ` <51EE4300.7070802-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2013-07-23 13:25         ` Hector Palacios
     [not found]           ` <51EE8445.6070603-i7dp0qKlBMg@public.gmane.org>
2013-07-26 13:17             ` Alexandre Belloni
     [not found]               ` <51F276D8.9090906-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2013-07-26 16:13                 ` Jonathan Cameron
     [not found]                   ` <d838f30e-30ca-49ca-a9f3-ebf4e523c7eb-2ueSQiBKiTY7tOexoI0I+QC/G2K4zDHf@public.gmane.org>
2013-08-07  7:50                     ` Alexandre Belloni
     [not found]                       ` <5201FC55.5080304-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2013-08-13 21:26                         ` Jonathan Cameron
2013-07-22 14:04 ` [PATCH v3 5/5] iio: mxs-lradc: add write_raw function to modify scale Hector Palacios
     [not found]   ` <1374501843-19651-6-git-send-email-hector.palacios-i7dp0qKlBMg@public.gmane.org>
2013-07-22 22:37     ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).