Re: [PATCH 3/3] iio: add APDS9300 ambilent light sensor driver

2013-07-21 Thread Jonathan Cameron
On 07/18/2013 11:19 AM, Oleksandr Kravchenko wrote: > From: Oleksandr Kravchenko > > This patch adds IIO driver for APDS9300 ambient light sensor (ALS). > http://www.avagotech.com/docs/AV02-1077EN > > The driver allows to read raw data from ADC registers or calculate > lux value. It also can handl

Re: [PATCH 1/3] iio: core: implement devm_iio_device_alloc/devm_iio_device_free

2013-07-21 Thread Jonathan Cameron
On 07/20/2013 02:05 PM, Lars-Peter Clausen wrote: > On 07/18/2013 12:19 PM, Oleksandr Kravchenko wrote: >> From: Grygorii Strashko >> >> Add a resource managed devm_iio_device_alloc()/devm_iio_device_free() >> to automatically clean up any allocations made by IIO drivers, >> thus leading to simpli

Re: [PATCH v6 2/2] iio: twl6030-gpadc: TWL6030, TWL6032 GPADC driver

2013-07-20 Thread Jonathan Cameron
On 07/19/2013 10:27 AM, Oleksandr Kozaruk wrote: > 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 > measur

Re: [PATCH v2 5/5] iio: mxs-lradc: add write_raw function to modify scale

2013-07-19 Thread Jonathan Cameron
On 07/19/2013 04:31 PM, Hector Palacios wrote: > Dear Marek, > > On 07/19/2013 04:39 PM, Marek Vasut wrote: >> Dear Hector Palacios, >> >>> Added write_raw function to manipulate the optional divider_by_two >>> through the scaling attribute out of the available scales. >>> >>> Signed-off-by: Hecto

Re: [PATCH v2 5/5] iio: mxs-lradc: add write_raw function to modify scale

2013-07-19 Thread Jonathan Cameron
On 07/19/2013 05:22 PM, Hector Palacios wrote: > Dear Marek, > > On 07/19/2013 06:17 PM, Marek Vasut wrote: >>> Here you have three entries per channel: >>> in_voltageX_raw-> the sample raw value >>> in_voltageX_scale-> the scale to multiply the raw value to get the >> voltage >>> in m

Re: [PATCH 2/2] iio: twl6030-gpadc: TWL6030, TWL6032 GPADC driver

2013-07-17 Thread Jonathan Cameron
Oleksandr Kozaruk wrote: >Hello Jonathan, > > >Two very quick comments based on quick glance as it may be a while >before I can do a full review. > > >We still have channels that are only usable for temperature being >output to user space as voltage channels? Is the conversion so very >hard? >

Re: [PATCH 2/5] iio: at91: Use different prescal, startup mask in MR for different IP

2013-07-16 Thread Jonathan Cameron
On 07/16/2013 12:30 PM, Thomas Petazzoni wrote: > Dear Nicolas Ferre, > > On Tue, 16 Jul 2013 10:46:28 +0200, Nicolas Ferre wrote: > >>> Ok, that make sense. I will use compatible names for the capabilities in >>> next version. Thanks. >> >> Hold on a little bit Josh, I know that Jean-Christophe

Re: [PATCH v3 2/2] iio: twl6030-gpadc: TWL6030, TWL6032 GPADC driver

2013-07-12 Thread Jonathan Cameron
On 07/12/2013 08:18 AM, Oleksandr Kozaruk wrote: > 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 measur

Re: [PATCHv3 1/3] iio: Add Nuvoton NAU7802 ADC driver

2013-07-09 Thread Jonathan Cameron
Sorry, looks like I forgot to push the tree out. Anyhow should be there shortly. On 07/09/2013 03:04 PM, Alexandre Belloni wrote: > Hi Jonathan, > > I don't actually see it in iio.git on kernel.org, am I doing something > wrong ? > > On 06/07/2013 12:24, Jonathan Cameron

Re: [PATCHv3 2/3] ARM: mxs: cfa10049: Switch bus i2c1 to bitbanging

2013-07-06 Thread Jonathan Cameron
On 06/24/2013 06:24 PM, Alexandre Belloni wrote: > From: Maxime Ripard > > The ADCs connected to this bus have been experiencing some timeout > issues when using the iMX28 i2c controller. Switching back to bitbanging > solves this. > > Signed-off-by: Maxime Ripard > Signed-off-by: Alexandre Bel

Re: [PATCHv3 1/3] iio: Add Nuvoton NAU7802 ADC driver

2013-07-06 Thread Jonathan Cameron
On 07/04/2013 10:08 AM, Lars-Peter Clausen wrote: > On 06/24/2013 07:24 PM, Alexandre Belloni wrote: >> The Nuvoton NAU7802 ADC is a 24-bit 2-channels I2C ADC, with adjustable >> gain and sampling rates. >> >> Signed-off-by: Alexandre Belloni >> Signed-off-by: Maxime Ripard > > Reviewed-by: Lars

Re: [PATCHv2 1/3] iio: Add Nuvoton NAU7802 ADC driver

2013-06-23 Thread Jonathan Cameron
On 06/23/2013 02:54 PM, Lars-Peter Clausen wrote: > On 06/22/2013 03:28 PM, Alexandre Belloni wrote: >> On 22/06/2013 15:20, Lars-Peter Clausen wrote: >>> On 06/22/2013 03:07 PM, Alexandre Belloni wrote: >>>> On 22/06/2013 14:02, Lars-Peter Clausen wrote: >>

Re: [PATCHv2 1/3] iio: Add Nuvoton NAU7802 ADC driver

2013-06-22 Thread Jonathan Cameron
On 06/20/2013 07:57 PM, Alexandre Belloni wrote: > The Nuvoton NAU7802 ADC is a 24-bit 2-channels I2C ADC, with adjustable > gain and sampling rates. > Sorry, somewhat low on time today so only a quick review. 1) Missing userspace ABI documentation. Also, perhaps min_conversions is a little va

Re: [PATCH 0/2 V2] iio: magnetometer: ak8975: Add support for DT and interrupt handling

2013-05-11 Thread Jonathan Cameron
lowing improvements: > > - replaced NULL with 'data' in the second argument of the free_irq calls, > which fixes problem on the module removal > - changed the order of checking for the platform_data and added > checking for the -EPROBE_DEFER as spotted by Lars-Peter Cla

Re: [PATCH 1/3] iio: Add Nuvoton NAU7802 ADC driver

2013-04-22 Thread Jonathan Cameron
On 20/04/13 16:38, Alexandre Belloni wrote: Hi Jonathan, Thanks for your review, On 20/04/2013 11:52, Jonathan Cameron wrote: A few bits and pieces inline. Ouch, that interrupt handling is annoyingly complex. Pesky hardware designers... Right, even worse is that on the board we are using

Re: [PATCH 1/3] iio: Add Nuvoton NAU7802 ADC driver

2013-04-20 Thread Jonathan Cameron
On 04/18/2013 04:38 PM, Alexandre Belloni wrote: > The Nuvoton NAU7802 ADC is a 24-bit 2-channels I2C ADC, with adjustable > gain and sampling rates. > > Signed-off-by: Alexandre Belloni > Signed-off-by: Maxime Ripard A few bits and pieces inline. Ouch, that interrupt handling is annoyingly com

Re: [PATCH v2 1/4] iio: adc: Document the regulator/clocks for exynos-adc

2013-03-29 Thread Jonathan Cameron
On 03/27/2013 06:46 PM, Doug Anderson wrote: > Hi, > > On Wed, Mar 27, 2013 at 11:40 AM, Lars-Peter Clausen wrote: >> On 03/27/2013 07:35 PM, Naveen Krishna Ch wrote: >>> On 13 March 2013 13:39, Doug Anderson wrote: The exynos ADC won't work without a regulator called "vdd" and a clock

Re: [PATCH 1/1] iio: exynos-adc: Fix typo in DT documentation

2013-03-29 Thread Jonathan Cameron
On 03/27/2013 12:41 AM, Naveen Krishna Ch wrote: > On 26 March 2013 17:19, Nobuhiro Iwamatsu wrote: >> On Wed, Mar 27, 2013 at 8:55 AM, Naveen Krishna Ch >> wrote: >>> On 26 March 2013 04:52, Sachin Kamat wrote: Fixes some typos in the documentation of exynos-adc.txt. Signed-off-b

Re: [PATCH v2 1/4] iio: adc: Document the regulator/clocks for exynos-adc

2013-03-27 Thread Jonathan Cameron
Doug Anderson wrote: >Hi, > >On Wed, Mar 27, 2013 at 11:40 AM, Lars-Peter Clausen >wrote: >> On 03/27/2013 07:35 PM, Naveen Krishna Ch wrote: >>> On 13 March 2013 13:39, Doug Anderson wrote: The exynos ADC won't work without a regulator called "vdd" and a >clock called "adc". Docum

Re: [PATCH v5] iio: Add OF support

2013-03-02 Thread Jonathan Cameron
On 02/07/2013 05:09 PM, Guenter Roeck wrote: > Provide bindings and parse OF data during initialization. > > Signed-off-by: Guenter Roeck Applied to the togreg branch of iio.git with a small edit wrt to removing the WIP line in the binding documenation. I thought about putting something about su

Re: [PATCH v5] iio: Add OF support

2013-02-21 Thread Jonathan Cameron
On 02/21/2013 02:50 PM, Rob Herring wrote: > On 02/20/2013 01:24 PM, Guenter Roeck wrote: >> On Wed, Feb 20, 2013 at 06:51:08PM +, Jonathan Cameron wrote: >>> >>> >>> Guenter Roeck wrote: >>> >>>> On Wed, Feb 20, 2013 at 11:38:22

Re: [PATCH v5] iio: Add OF support

2013-02-21 Thread Jonathan Cameron
On 02/20/2013 07:24 PM, Guenter Roeck wrote: > On Wed, Feb 20, 2013 at 06:51:08PM +0000, Jonathan Cameron wrote: >> >> >> Guenter Roeck wrote: >> >>> On Wed, Feb 20, 2013 at 11:38:22AM -0600, Rob Herring wrote: >>>> On 02/07/2013 11:09 AM, Guenter

Re: [PATCH v5] iio: Add OF support

2013-02-20 Thread Jonathan Cameron
Guenter Roeck wrote: >On Wed, Feb 20, 2013 at 11:38:22AM -0600, Rob Herring wrote: >> On 02/07/2013 11:09 AM, Guenter Roeck wrote: >> > Provide bindings and parse OF data during initialization. >> > >> > Signed-off-by: Guenter Roeck >> > --- >> > v5: >> > - Updated examples in bindings. >> >

Re: [PATCH v5] iio: Add OF support

2013-02-20 Thread Jonathan Cameron
Guenter Roeck wrote: >On Fri, Feb 08, 2013 at 08:30:48AM +0000, Jonathan Cameron wrote: >> On 07/02/13 17:09, Guenter Roeck wrote: >> >Provide bindings and parse OF data during initialization. >> > >> >Signed-off-by: Guenter Roeck >> Looks fine to me.

Re: [PATCH v5] iio: Add OF support

2013-02-11 Thread Jonathan Cameron
On 07/02/13 17:09, Guenter Roeck wrote: Provide bindings and parse OF data during initialization. Signed-off-by: Guenter Roeck Looks fine to me. Will give it a few more days to see what others have to say. Thanks Guenter --- v5: - Updated examples in bindings. v4: - Fixed wrong parameter to

Re: [PATCH v4 2/2] iio: Add OF support

2013-02-11 Thread Jonathan Cameron
On 07/02/13 01:53, Guenter Roeck wrote: On Wed, Feb 06, 2013 at 07:37:37PM +, Jonathan Cameron wrote: On 02/06/2013 06:29 PM, Guenter Roeck wrote: Provide bindings and parse OF data during initialization. Signed-off-by: Guenter Roeck looks good to me. Couple of little queries inline

Re: [PATCH v4 2/2] iio: Add OF support

2013-02-06 Thread Jonathan Cameron
On 02/06/2013 06:29 PM, Guenter Roeck wrote: > Provide bindings and parse OF data during initialization. > > Signed-off-by: Guenter Roeck looks good to me. Couple of little queries inline. > --- > v4: > - Fixed wrong parameter to dummy of_iio_channel_get_by_name if CONFIG_OF is > undefined, a

Re: [PATCH 1/2] iio: Update iio_channel_get API to use consumer device pointer as argument

2013-02-06 Thread Jonathan Cameron
On 02/04/2013 11:57 PM, Chanwoo Choi wrote: > On 02/05/2013 05:26 AM, Guenter Roeck wrote: >> For iio_channel_get to work with OF based configurations, it needs the >> consumer device pointer instead of the consumer device name as argument. >> >> Signed-off-by: Guenter Roeck Applied to togreg bran

Re: [PATCH v2 4/4] iio: Add OF support

2013-02-03 Thread Jonathan Cameron
On 02/03/2013 06:55 PM, Lars-Peter Clausen wrote: > On 02/03/2013 06:30 PM, Tomasz Figa wrote: >> On Sunday 03 of February 2013 09:01:07 Guenter Roeck wrote: >>> On Sun, Feb 03, 2013 at 12:52:40PM +0100, Tomasz Figa wrote: On Sunday 03 of February 2013 12:29:23 Lars-Peter Clausen wrote: >

Re: [PATCH 1/4] iio: max1363: Use devm_ functions whereever possible to allocate resources

2013-02-03 Thread Jonathan Cameron
On 02/03/2013 05:18 PM, Guenter Roeck wrote: > On Sun, Feb 03, 2013 at 12:10:32PM +0000, Jonathan Cameron wrote: >> On 02/03/2013 12:59 AM, Guenter Roeck wrote: >>> Signed-off-by: Guenter Roeck >> Applied to togreg branch of iio.git. >> >> Note I'll pr

Re: [PATCH v2 2/4] iio/adc: (max1363) Add support for external reference voltage

2013-02-03 Thread Jonathan Cameron
On 02/03/2013 12:59 AM, Guenter Roeck wrote: > Implement external reference voltage as regulator named "vref". > > Signed-off-by: Guenter Roeck Applied to togreg branch of iio.git. Thanks, The remaining two patches will have sit a while. Patch 3 effects stuff outside IIO so I'll wait to see if a

Re: [PATCH 1/4] iio: max1363: Use devm_ functions whereever possible to allocate resources

2013-02-03 Thread Jonathan Cameron
On 02/03/2013 12:59 AM, Guenter Roeck wrote: > Signed-off-by: Guenter Roeck Applied to togreg branch of iio.git. Note I'll probably rebase the togreg branch if / when Greg has pulled last pull request (sent a few mins ago) so as to get a directly applied fix for this driver. > --- > drivers/iio

Re: [RFC 10/11] iio: Add OF support

2013-02-03 Thread Jonathan Cameron
On 02/03/2013 11:52 AM, Lars-Peter Clausen wrote: > On 02/03/2013 12:47 PM, Lars-Peter Clausen wrote: >> On 02/03/2013 12:39 PM, Jonathan Cameron wrote: >>> On 02/02/2013 04:10 PM, Guenter Roeck wrote: >>>> On Sat, Feb 02, 2013 at 10:29:02AM +, Jonathan Cameron wr

Re: [RFC 10/11] iio: Add OF support

2013-02-03 Thread Jonathan Cameron
On 02/02/2013 04:10 PM, Guenter Roeck wrote: > On Sat, Feb 02, 2013 at 10:29:02AM +0000, Jonathan Cameron wrote: >> On 01/31/2013 09:43 PM, Guenter Roeck wrote: >>> Provide bindings, new API access functions, and parse OF data >>> during initialization. >>> &

Re: [RFC 11/11] iio/adc: (max1363) Add basic OF bindings and external vref support

2013-02-02 Thread Jonathan Cameron
On 01/31/2013 09:43 PM, Guenter Roeck wrote: > Signed-off-by: Guenter Roeck Mostly fine. Comments below are on the fact I'd prefer a reference voltage coming from a regulator than being a bit of platform data. > --- > Documentation/devicetree/bindings/iio/max1363.txt | 54 > ++

Re: [RFC 10/11] iio: Add OF support

2013-02-02 Thread Jonathan Cameron
On 01/31/2013 09:43 PM, Guenter Roeck wrote: > Provide bindings, new API access functions, and parse OF data > during initialization. > Firstly thanks for working on this Guenter, it's been a big hole for a while largely because non of our largest developers were actually using development platfor

Re: [RFC 09/11] iio: Simplify iio_map_array_unregister API

2013-02-02 Thread Jonathan Cameron
On 01/31/2013 09:43 PM, Guenter Roeck wrote: > Instead of requiring the map to unregister, simply unregister all map entries > associated with the given iio device. This simplifies map removal and also > works > for maps generated through devicetree. > > Signed-off-by: Guenter Roeck Sensible cha

Re: [RFC 08/11] iio: Update iio_channel_get_all and iio_channel_get_all_cb API

2013-02-02 Thread Jonathan Cameron
On 01/31/2013 09:43 PM, Guenter Roeck wrote: > Pass device pointer instead of device name as parameter to iio_channel_get_all > and iio_channel_get_all_cb. This will enable us to use OF information to > retrieve consumer channel information. > > Signed-off-by: Guenter Roeck Applied with unused 'l

Re: [PATCH 07/11] iio/adc: (max1363) Fix data conversion problems

2013-02-02 Thread Jonathan Cameron
On 01/31/2013 09:43 PM, Guenter Roeck wrote: > For chips with more than 8 bit ADC resolution, received data was always > masked against 0xfff, ie with a 12 bit mask. This can result in bad data > for chips with 10 bit resolution if those chips have higher bits set > (seen with MAX1139). > > The re

Re: [PATCH 06/11] iio/adc: (max1363) Remove duplicate code

2013-02-02 Thread Jonathan Cameron
On 01/31/2013 09:43 PM, Guenter Roeck wrote: > Signed-off-by: Guenter Roeck Applied to togreg branch of iio.git > --- > drivers/iio/adc/max1363.c |2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/iio/adc/max1363.c b/drivers/iio/adc/max1363.c > index ca8bbc1..2c773b4 100644 > -

Re: [PATCH 05/11] iio/adc: (max1363) Provide OF node information to iio device

2013-02-02 Thread Jonathan Cameron
On 01/31/2013 09:43 PM, Guenter Roeck wrote: > Signed-off-by: Guenter Roeck Applied to togreg branch of iio.git A previous merge seems to have gone wrong in this driver and some removed functions have reappeared. I'll post a patch for that in a few mins. > --- > drivers/iio/adc/max1363.c |

Re: [PATCH 03/11] staging/iio: (iio_hwmon) Basic devicetree support

2013-02-02 Thread Jonathan Cameron
On 01/31/2013 09:43 PM, Guenter Roeck wrote: > Add 'iio-hwmon' OF compatibility table entry to enable OF matches. > > Signed-off-by: Guenter Roeck Applied to togreg branch of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git Thanks, > --- > drivers/staging/iio/iio_hwmon.c |6 +

Re: [PATCH 01/11] staging/iio: (iio_hwmon) Use devm_kzalloc

2013-02-02 Thread Jonathan Cameron
On 01/31/2013 09:42 PM, Guenter Roeck wrote: > Signed-off-by: Guenter Roeck This crossed with a little fix patch that changes one of the kzallocs below. The same trivial fix applies here so I've applied this with the obvious change. Thanks, > --- > drivers/staging/iio/iio_hwmon.c | 70 > +++

Re: [PATCH 02/11] staging/iio: (iio_hwmon) Add support for sysfs name attribute

2013-02-02 Thread Jonathan Cameron
On 01/31/2013 09:42 PM, Guenter Roeck wrote: > The 'name' attribute is mandatory for hwmon devices. > > Signed-off-by: Guenter Roeck Wow, that one character patch these crossed with manages to effect this one as well. Applied with the obvious tiny fix. Thanks, > --- > drivers/staging/iio/iio_h

Re: [PATCH 04/11] iio/adc: (lp8788) Provide OF node information to iio device

2013-02-02 Thread Jonathan Cameron
On 01/31/2013 09:43 PM, Guenter Roeck wrote: > Signed-off-by: Guenter Roeck applied to togreg branch of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git > --- > drivers/iio/adc/lp8788_adc.c |1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/iio/adc/lp8788_adc.c b/dri

Re: [PATCH -next] iio: isl29018: fix to return error or 0 in isl29018_write_raw()

2012-11-17 Thread Jonathan Cameron
On 11/08/2012 09:05 AM, Wei Yongjun wrote: > From: Wei Yongjun > > We had assigned the return value to 'ret' but ignored it when > return from isl29018_write_raw(), it's better to return 'ret' > instead of 0. > > dpatch engine is used to auto generate this patch. > (https://github.com/weiyj/dpat

Re: [PATCH] staging:iio: ak8975: add of_match table for device-tree probing

2012-01-12 Thread Jonathan Cameron
ne by me but a confirmation from someone more device tree oriented would be great as well. > > Signed-off-by: Olof Johansson Acked-by: Jonathan Cameron > --- > drivers/staging/iio/magnetometer/ak8975.c |8 > 1 files changed, 8 insertions(+), 0 deletions(-) > &g

Re: [PATCH] staging:iio: isl29018: add of_match table for device-tree probing

2012-01-12 Thread Jonathan Cameron
> Signed-off-by: Olof Johansson Acked-by: Jonathan Cameron > --- > drivers/staging/iio/light/isl29018.c |7 +++ > 1 files changed, 7 insertions(+), 0 deletions(-) > > diff --git a/drivers/staging/iio/light/isl29018.c > b/drivers/staging/iio/light/isl29018.c > in