Re: [PATCH 1/2] iio: adc: Kconfig: exynos_adc depends on CONFIG_OF

2013-03-17 Thread Jonathan Cameron
On 03/15/2013 06:09 PM, Doug Anderson wrote: > Naveen, > > On Fri, Mar 15, 2013 at 9:23 AM, Naveen Krishna Chatradhi > wrote: >> As the exynos_adc driver only supports device tree registration. >> Making driver depend on CONFIG_OF solves possible errors during probe. >> >> Signed-off-by: Naveen K

Re: [PATCH] staging/iio: iio_hwmon: Use device tree node name for hwmon name attribute

2013-03-20 Thread Jonathan Cameron
On 03/20/2013 03:52 PM, Guenter Roeck wrote: > So far, all instances of iio_hwmon set their hwmon name attribute > to "iio_hwmon", which is not very descriptive. Set it to the device tree > node name if available, and only revert to iio_hwmon otherwise. > > Signed-off-by: Guenter Roeck > --- > >

Re: [PATCH 1/3] spi: Add helper functions for setting up transfers

2013-02-06 Thread Jonathan Cameron
On 02/05/2013 02:07 PM, Grant Likely wrote: > On Sun, 27 Jan 2013 03:33:59 +, Mark Brown > wrote: >> On Wed, Jan 09, 2013 at 06:31:09PM +0100, Lars-Peter Clausen wrote: >> >>> The second function spi_sync_transfer() takes a SPI device and an array of >>> spi_transfers. It will allocate a new

Re: [PATCH v5] iio: Add OF support

2013-02-08 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 1/3] spi: Add helper functions for setting up transfers

2013-02-09 Thread Jonathan Cameron
On 02/05/2013 02:07 PM, Grant Likely wrote: > On Sun, 27 Jan 2013 03:33:59 +, Mark Brown > wrote: >> On Wed, Jan 09, 2013 at 06:31:09PM +0100, Lars-Peter Clausen wrote: >> >>> The second function spi_sync_transfer() takes a SPI device and an array of >>> spi_transfers. It will allocate a new

Re: [PATCH 1/3] spi: Add helper functions for setting up transfers

2013-02-09 Thread Jonathan Cameron
On 02/06/2013 07:20 PM, Jonathan Cameron wrote: > On 02/05/2013 02:07 PM, Grant Likely wrote: >> On Sun, 27 Jan 2013 03:33:59 +, Mark Brown >> wrote: >>> On Wed, Jan 09, 2013 at 06:31:09PM +0100, Lars-Peter Clausen wrote: >>> >>>> The second fu

Re: linux-next: Tree for Jan 23 (mtd/ubi and iio and crypto/crc32[c])

2013-01-26 Thread Jonathan Cameron
On 01/23/2013 11:41 PM, Randy Dunlap wrote: > On 01/23/13 15:23, Herbert Xu wrote: >> On Wed, Jan 23, 2013 at 03:10:01PM -0800, Randy Dunlap wrote: >>> On 01/22/13 22:43, Stephen Rothwell wrote: Hi all, Changes since 20130122: >>> >>> >>> on i386: >>> >>> ERROR: "crc32_le" [driv

Re: [PATCH] iio: adc: add exynos5 adc driver under iio framwork

2013-01-26 Thread Jonathan Cameron
On 01/24/2013 04:58 AM, Naveen Krishna Chatradhi wrote: > This patch adds driver for ADC IP found on EXYNOS5250 and EXYNOS5410 > from Samsung. Also adds the Documentation for device tree bindings. > > Signed-off-by: Naveen Krishna Chatradhi Just a quick general comment on patch formatting. For la

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-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-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-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 v2 4/5] IIO : ADC: tiadc: Add support of TI's ADC driver

2012-08-30 Thread Jonathan Cameron
On 08/30/2012 08:38 AM, Patil, Rachna wrote: > This patch adds support for TI's ADC driver. > This is a multifunctional device. > Analog input lines are provided on which > voltage measurements can be carried out. > You can have upto 8 input lines. > Nice concise driver. A few comments and questio

Re: [PATCH v3 4/5] IIO : ADC: tiadc: Add support of TI's ADC driver

2012-09-13 Thread Jonathan Cameron
eing named after a particular part number (any one it support would do) to avoid a clash in future with a new touch screen adc from TI. Bit late for that though I guess ;) Jonathan --- Changes in v2: Addressed review comments from Matthias Kaehlcke Changes in v3: Addressed re

Re: [PATCH v5] iio: adc: add new lp8788 adc driver

2012-09-13 Thread Jonathan Cameron
Couple of nitpicks in line to add to Lars-Peter's ones. TI LP8788 PMU provides regulators, battery charger, ADC, RTC, backlight driver and current sinks. This patch enables the LP8788 ADC functions. The LP8788 ADC has 13 ADC input selection and supports 12-bit resolution. Internal op

Re: [PATCH] [RFC]power: battery: Generic battery driver using IIO

2012-09-13 Thread Jonathan Cameron
Thanks Lars, all of your comments are valid and I will accordingly update. I am waiting for some more review comments if there is any and will send the updated code. Beware of that strategy as I for one am guilty of the old approach of 'oh look someone else has commented, I'll wait for the ne

Re: [PATCH] iio: Documentation change for inkern interface.

2012-09-13 Thread Jonathan Cameron
On 09/08/2012 08:42 PM, anish kumar wrote: > From: anish kumar > > This commit- 314be14bb renamed the _st_ functions to loose the bit > that was meant for staging version but forgot to change > the documentation which still have _st_ sprinkled in some of the > places. > > Signed-off-by: anish ku

Re: [PATCH] power: battery: Generic battery driver using IIO

2012-09-13 Thread Jonathan Cameron
On 09/13/2012 05:16 PM, anish kumar wrote: > From: anish kumar > > In this version: > Addressed concerns raised by lars: > a. made the adc_bat per device. > b. get the IIO channel using hardcoded channel names. Couple of bits related to this inline.. > c. Minor issues related to gpio_is_valid and

Re: [PATCH v3 4/5] IIO : ADC: tiadc: Add support of TI's ADC driver

2012-09-14 Thread Jonathan Cameron
On 14/09/12 07:00, Patil, Rachna wrote: On Thu, Sep 13, 2012 at 17:43:30, Jonathan Cameron wrote: On 13/09/12 11:40, Patil, Rachna wrote: This patch adds support for TI's ADC driver. This is a multifunctional device. Analog input lines are provided on which voltage measurements can be ca

Re: [PATCH 2/2] iio: inkern: add error case in iio_channel_get()

2012-09-14 Thread Jonathan Cameron
On 14/09/12 01:59, Kim, Milo wrote: On 10/09/12 09:02, Kim, Milo wrote: The datasheet name is defined in the IIO driver. On the other hand, the adc_channel_label is configured in the platform machine side. If the datasheet name is not matched with any adc_channel_label, the iio_ch

Re: [PATCH] iio: hid-sensors: convert HID_SENSOR_ENUM_BASE_QUIRKS to bool

2012-10-31 Thread Jonathan Cameron
On 10/22/2012 08:57 AM, Kirill A. Shutemov wrote: > From: "Kirill A. Shutemov" > > It's non-sense to use tristate for the option, it's bool. > Good point. Applied to fixes-togreg branch of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git Thanks, Jonathan > Signed-off-by: Kirill A

Re: [PATCH] staging: iio: adc: ad7280a.c: fixed macro coding style

2012-11-02 Thread Jonathan Cameron
On 11/02/2012 07:28 AM, Kumar Amit Mehta wrote: > remove unnecessary semicolon from the macro definition > > Signed-off-by: Kumar Amit Mehta Thanks, added to togreg branch of iio.git > --- > drivers/staging/iio/adc/ad7280a.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff -

Re: [PATCH 2/3] ti_tscadc: Match mfd sub devices to regmap interface

2012-11-02 Thread Jonathan Cameron
On 11/01/2012 03:24 PM, Pantelis Antoniou wrote: > The MFD parent device now uses a regmap, instead of direct > memory access. Use the same method in the sub devices to avoid > nasty surprises. > > Please not that this driver can't really deal with the case of the regmap > call failing in anyway.

Re: [PATCH 5/5] drivers/iio/industrialio-event.c: eliminate possible double free

2012-11-02 Thread Jonathan Cameron
On 10/21/2012 11:52 AM, Julia Lawall wrote: > From: Julia Lawall > > The function __iio_add_event_config_attrs is only called once, by the > function iio_device_register_eventset. If the call fails, > iio_device_register_eventset calls __iio_remove_event_config_attrs. There > is thus no need fo

Re: [PATCH] iio: isl29018: Support suspend and resume.

2012-11-02 Thread Jonathan Cameron
On 10/25/2012 12:39 AM, Bryan Freed wrote: > The driver leaves the device in power-down state anyway, > so there is nothing to do on suspend. > On resume, we just have to make sure the range and ADC > values are updated in the device since it may have been > powered down in suspend. > > Signed-off

Re: [PATCH] iio: hid-sensor: Use __devexit annotation for remove()

2012-11-02 Thread Jonathan Cameron
On 10/27/2012 03:48 PM, Axel Lin wrote: > Use __devexit rather than __devinit annotation for remove(). > Also adds __devexit_p around remove callback. > > Signed-off-by: Axel Lin Added to fixes-togreg branch of iio.git oops on this one. Should have picked that up in review. Thanks Axel! > --- >

Re: [PATCH] iio: hid-sensor: Return proper error if kmemdup fails

2012-11-02 Thread Jonathan Cameron
On 10/27/2012 04:03 PM, Axel Lin wrote: > Return -ENOMEM instead of 0 if kmemdup fails. > > Signed-off-by: Axel Lin Added to fixes-togreg branch of iio.git Thanks > --- > drivers/iio/accel/hid-sensor-accel-3d.c |6 +++--- > drivers/iio/gyro/hid-sensor-gyro-3d.c |6 +++--- >

Re: [PATCH v2 3/3] lp8788-charger: fix wrong ADC conversion

2012-11-02 Thread Jonathan Cameron
od to me, fwiw: > > Reviewed-by Lars-Peter Clausen On this stuff as far as I'm concerned Lars' approval is fine but for what it's worth this all looks fine to me. Acked-by: Jonathan Cameron > > But there is one issue, but this is not necessarily related to this patch,

Re: [PATCH v3 5/5] iio: adc: add viperboard adc driver

2012-11-05 Thread Jonathan Cameron
On 11/05/2012 02:48 PM, Lars Poeschel wrote: > From: Lars Poeschel > > This adds the mfd cell to use the adc part of the Nano River Technologies > viperboard. > One utter nitpick inline (nice to clean up but totally trivial) > Signed-off-by: Lars Poeschel Acked-by: Jonathan

Re: [PATCH 1/2] iio: inkern: put the IIO device when it fails to allocate memory

2012-09-22 Thread Jonathan Cameron
On 09/18/2012 05:55 AM, Kim, Milo wrote: > The reference count of the IIO device is increased if the IIO map has > matched consumer name. > After then, it tries to allocate the iio_channel which is used by the > consumer. > If it fails to allocate memory, the reference count should be decrease

Re: [PATCH 2/2] iio: inkern: clean up error return code

2012-09-22 Thread Jonathan Cameron
On 09/18/2012 05:56 AM, Kim, Milo wrote: > When the IIO consumer tries to get specific IIO channel, > few error cases can be happened. > (a) Memory allocation failure > (b) No matched ADC channel error > (c) Invalid input arguments > This patch enables cleaning up error handling in case of (a

Re: [PATCH v6] iio: adc: add new lp8788 adc driver

2012-09-22 Thread Jonathan Cameron
On 09/18/2012 09:18 PM, Jonathan Cameron wrote: > On 09/18/2012 09:19 AM, Lars-Peter Clausen wrote: >> On 09/17/2012 11:35 AM, Kim, Milo wrote: >>> TI LP8788 PMU provides regulators, battery charger, ADC, >>> RTC, backlight driver and current sinks. >>> &g

Re: [PATCH] [V3]power: battery: Generic battery driver using IIO

2012-09-22 Thread Jonathan Cameron
On 09/21/2012 11:52 PM, Anton Vorontsov wrote: > On Fri, Sep 21, 2012 at 09:40:14PM +0530, anish kumar wrote: >> From: anish kumar >> >> In last version: >> Addressed concerns raised by lars: >> a. made the adc_bat per device. >> b. get the IIO channel using hardcoded channel names. >> c. Minor is

Re: OOPS/panic in iio_dummy (v3.6-rc6-176-gabef3bd)

2012-09-22 Thread Jonathan Cameron
On 09/22/2012 09:10 AM, Lars-Peter Clausen wrote: > On 09/22/2012 04:13 AM, Peter Hüwe wrote: >> Hi, >> >> loading iio_dummy results in kernel panic as the call to >> iio_buffer_register in iio_dummy_probe is performed with indio_dev->buffer >> == >> NULL and thus the access to indio_dev->buffer

Re: [PATCH] Staging: iio: gyro: Add STMicroelectronics L3GD20 gyroscope device driver

2012-09-22 Thread Jonathan Cameron
On 09/18/2012 08:19 PM, Swapnil TIWARI wrote: > Add STMicroelectronics L3GD20 gyroscope device driver > > > > Signed-off-by: Swapnil Tiwari > Hi, couple of standard bits first. 1) Make sure your code passes checkpatch.pl with no warnings (only exception to this is o

Re: [PATCH v5 1/2] staging: iio: Documentation sysfs-bus-iio add power_mode

2013-08-28 Thread Jonathan Cameron
On 28/08/13 16:08, Srinivas Pandruvada wrote: On 08/28/2013 04:01 AM, Oleksandr Kravchenko wrote: Add description about in_accelX_power_mode and in_accel_power_mode_available. Signed-off-by: Oleksandr Kravchenko --- Documentation/ABI/testing/sysfs-bus-iio | 10 ++ 1 file changed,

Re: [PATCH v5 2/2] iio: add Bosch BMA180 acceleration sensor driver

2013-08-28 Thread Jonathan Cameron
On 08/28/13 14:17, Mark Rutland wrote: > On Wed, Aug 28, 2013 at 12:01:18PM +0100, Oleksandr Kravchenko wrote: >> This patch adds IIO driver for Bosch BMA180 triaxial >> acceleration sensor. >> http://dlnmh9ip6v2uc.cloudfront.net/datasheets/ >> Sensors/Accelerometers/BST-BMA180-DS00

Re: [PATCH v5 1/2] staging: iio: Documentation sysfs-bus-iio add power_mode

2013-08-28 Thread Jonathan Cameron
On 08/28/13 16:10, Jonathan Cameron wrote: > On 28/08/13 16:08, Srinivas Pandruvada wrote: >> On 08/28/2013 04:01 AM, Oleksandr Kravchenko wrote: >>> Add description about in_accelX_power_mode and >>> in_accel_power_mode_available. >>> >>> Signed-off-

Re: [PATCH 07/20] Documentation: dt: iio: Add binding for LPS001WP

2013-10-01 Thread Jonathan Cameron
On 09/16/13 17:02, Lee Jones wrote: > LPS001WP is a Pressure and Temperature sensor. > > Cc: devicet...@vger.kernel.org > Signed-off-by: Lee Jones Hi Lee, I'm planning to drop this set of bindings in favour of the unified ones proposed by Lukasz Czerwinski. Could you take a look at those and pe

Re: [PATCH 07/20] Documentation: dt: iio: Add binding for LPS001WP

2013-10-01 Thread Jonathan Cameron
On 10/01/13 22:09, Jonathan Cameron wrote: > On 09/16/13 17:02, Lee Jones wrote: >> LPS001WP is a Pressure and Temperature sensor. >> >> Cc: devicet...@vger.kernel.org >> Signed-off-by: Lee Jones > Hi Lee, > > I'm planning to drop this set of bindings in

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: [PATCH 0/4] iio: hid-sensor: add module alias for autoload

2013-07-12 Thread Jonathan Cameron
On 07/12/2013 08:21 AM, Alexander Holler wrote: > Am 11.07.2013 19:27, schrieb Srinivas Pandruvada: >> >> >> On 07/10/2013 08:58 AM, Alexander Holler wrote: >>> Am 10.07.2013 17:27, schrieb Srinivas Pandruvada: Hi, There was no intention to prevent auto loading. Did you get chance to

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: [PATCH 0/4] iio: hid-sensor: add module alias for autoload

2013-07-13 Thread Jonathan Cameron
Thanks, All 4 applied to the togreg branch of iio.git Jonathan On 07/12/2013 10:46 PM, Pandruvada, Srinivas wrote: > Tested and ready to go. > > Thanks, > Srinivas > > > -Original Message----- > From: Jonathan Cameron [mailto:ji...@kernel.org] > Sent: Friday,

Re: [PATCH 10/38] Documentation: dt: iio: Add binding for LPS001WP

2013-09-14 Thread Jonathan Cameron
added devicetree list cc. On 09/10/13 13:49, Lee Jones wrote: > LPS001WP is a Pressure and Temperature sensor. > > Signed-off-by: Lee Jones > --- > .../devicetree/bindings/iio/pressure/lps001wp.txt | 21 > + > 1 file changed, 21 insertions(+) > create mode 100644 > Docum

Re: [PATCH 11/38] Documentation: dt: iio: Add binding for LSM303DLH

2013-09-14 Thread Jonathan Cameron
add devicetree list cc On 09/10/13 13:49, Lee Jones wrote: > LSM303DLH is a Accelerometer Sensor > > Signed-off-by: Lee Jones > --- > .../devicetree/bindings/iio/accel/lsm303dlh.txt | 21 > + > 1 file changed, 21 insertions(+) > create mode 100644 Documentation/devicet

Re: [PATCH 13/38] Documentation: dt: iio: Add binding for LSM303DLH

2013-09-14 Thread Jonathan Cameron
Add devicetree list cc. On 09/10/13 13:49, Lee Jones wrote: > LSM303DLH is a Magnetometer Sensor > > Signed-off-by: Lee Jones > --- > .../bindings/iio/magnetometer/lsm303dlh.txt | 21 > + > 1 file changed, 21 insertions(+) > create mode 100644 > Documentation/devic

Re: [PATCH 12/38] Documentation: dt: iio: Add binding for L3G4200D

2013-09-14 Thread Jonathan Cameron
Add devicetree list cc On 09/10/13 13:49, Lee Jones wrote: > L3G4200D is a Gyroscope Sensor > > Signed-off-by: Lee Jones > --- > .../devicetree/bindings/iio/gyro/l3g4200d.txt | 21 > + > 1 file changed, 21 insertions(+) > create mode 100644 Documentation/devicetree/bi

Re: [PATCH 14/38] iio: accel: st: Append _accel to accelerator sensor device names

2013-09-14 Thread Jonathan Cameron
On 09/10/13 13:49, Lee Jones wrote: > Some of ST's sensors are appended with their sensor type and some > are not. For consistency we're extending the same naming convention > throughout. > > Signed-off-by: Lee Jones Honestly I don't care either way on these, but consistency would definitely be g

Re: [PATCH 14/38] iio: accel: st: Append _accel to accelerator sensor device names

2013-09-14 Thread Jonathan Cameron
On 09/14/13 13:14, Jonathan Cameron wrote: > On 09/10/13 13:49, Lee Jones wrote: >> Some of ST's sensors are appended with their sensor type and some >> are not. For consistency we're extending the same naming convention >> throughout. >> >> Signed-off-by

Re: [PATCH 18/38] iio: sensors-core: st: Allow full-scale to be an optional feature

2013-09-14 Thread Jonathan Cameron
On 09/10/13 13:49, Lee Jones wrote: > Some chips either don't support it or fail to provide adequate documentation, > so sometimes it's impossible to enable the feature even if it is supported. > > Signed-off-by: Lee Jones Applied to the togreg branch of iio.git Thanks > --- > drivers/iio/commo

Re: [PATCH 19/38] iio: sensors-core: st: Support sensors which don't have a Data Ready pin

2013-09-14 Thread Jonathan Cameron
On 09/10/13 13:49, Lee Jones wrote: > Not all ST's sensors support data ready, so let's make the declaration > of one conditional. > > Signed-off-by: Lee Jones Hi Lee, This one doesn't actually build: CC [M] drivers/iio/common/st_sensors/st_sensors_core.o drivers/iio/common/st_sensors/st_se

Re: [PATCH 20/38] iio: sensors-core: st: Clean-up error handling in st_sensors_init_sensor()

2013-09-14 Thread Jonathan Cameron
On 09/10/13 13:49, Lee Jones wrote: > Strip out all those unnecessary gotos and just return the error right away. > > Aids to simplicity and reduces code. > > Signed-off-by: Lee Jones This is fine except in that it is intertwined with the previous patch. > --- > drivers/iio/common/st_sensors/s

Re: [PATCH 21/38] iio: sensors-core: st: Clean-up error handling in st_sensors_read_axis_data()

2013-09-14 Thread Jonathan Cameron
On 09/10/13 13:49, Lee Jones wrote: > Gets rid of those unnecessary gotos. Unfortunately it introduced a bug whilst it is at it. Sometimes those gotos are necessary and the 'right' way to do things. > > Signed-off-by: Lee Jones > --- > drivers/iio/common/st_sensors/st_sensors_core.c | 17 +

Re: [PATCH 22/38] iio: sensors-core: st: Clean-up error handling in st_sensors_read_info_raw()

2013-09-14 Thread Jonathan Cameron
On 09/10/13 13:49, Lee Jones wrote: > Saving a few lines of code. > > Signed-off-by: Lee Jones Applied to the togreg branch of iio.git. To my mind the key thing here is that the error paths were previous inconsistent in that all but the last one went via a separate cleanup path whereas the last

Re: [PATCH 18/38] iio: sensors-core: st: Allow full-scale to be an optional feature

2013-09-14 Thread Jonathan Cameron
On 09/14/13 17:45, Jonathan Cameron wrote: > On 09/10/13 13:49, Lee Jones wrote: >> Some chips either don't support it or fail to provide adequate documentation, >> so sometimes it's impossible to enable the feature even if it is supported. >> >> Signed-off-b

Re: [PATCH 23/38] iio: pressure-core: st: Describe LPS331AP defines by name

2013-09-14 Thread Jonathan Cameron
On 09/10/13 13:49, Lee Jones wrote: > They're currently named *_1_*, for 'Sensor 1', but the code will be much > more readable if we use the naming convention *_LPS331AP_* instead. > > Signed-off-by: Lee Jones Very happy to see this patch. The _1_ stuff should never have gotten through the initi

Re: [PATCH 24/38] iio: pressure-core: st: Expand and rename LPS331AP's channel descriptor

2013-09-14 Thread Jonathan Cameron
On 09/10/13 13:49, Lee Jones wrote: > Due to the MACRO used, the task of reading, understanding and maintaining > the LPS331AP's channel descriptor is substantially difficult. This patch > is based on the view that it's better to have easy to read, maintainable > code than to save a few lines here

Re: [PATCH 25/38] iio: pressure-core: st: Allow for number of channels to vary

2013-09-14 Thread Jonathan Cameron
On 09/10/13 13:49, Lee Jones wrote: > At the moment the number of channels specified is dictated by the first > sensor supported by the driver. As we add support for more sensors this > is likely to vary. Instead of using the ARRAY_SIZE() of the LPS331AP's > channel specifier we'll use a new adapta

Re: [PATCH 26/38] iio: pressure-core: st: Clean-up probe() function

2013-09-14 Thread Jonathan Cameron
On 09/11/13 08:19, Lee Jones wrote: >>> err = st_sensors_init_sensor(indio_dev, plat_data); >>> if (err < 0) >>> - goto st_press_common_probe_error; >>> + return err; >>> >>> - if (pdata->get_irq_data_ready(indio_dev) > 0) { >>> + if (irq > 0) { >>> err =

Re: [PATCH 28/38] iio: pressure: st: Add support for new LPS001WP pressure sensor

2013-09-14 Thread Jonathan Cameron
On 09/10/13 13:49, Lee Jones wrote: > Here we use existing practices to introduce support for another > pressure/temperature sensor, the LPS001WP. > > Signed-off-by: Lee Jones Looks fine to me, will pick this up when the precursors are all sorted. > --- > drivers/iio/pressure/st_pressure.h

Re: [PATCH 29/38] iio: pressure-core: st: Provide support for the Vdd power supply

2013-09-14 Thread Jonathan Cameron
On 09/10/13 13:49, Lee Jones wrote: > The power to some of the sensors are controlled by regulators. In most > cases these are 'always on', but if not they will fail to work until > the regulator is enabled using the relevant APIs. This patch allows for > the Vdd power supply to be specified by eit

Re: [PATCH 31/38] iio: accel-core: st: Clean up error handling in probe()

2013-09-14 Thread Jonathan Cameron
On 09/10/13 13:49, Lee Jones wrote: > Reduce the amount of those unnecessary goto calls, as in most cases > we can simply return immediately. We also only call for the IRQ number > once and use that value throughout. > > Signed-off-by: Lee Jones ... > - if (adata->get_irq_data_ready(indio_dev

Re: [PATCH 32/38] iio: accel-core: st: Move LSM303DLH into correct group

2013-09-14 Thread Jonathan Cameron
On 09/10/13 13:49, Lee Jones wrote: > The LSM303DLH's WAI (WhoAmI) is 0x33, meaning it should be enabled by > Accel Sensor group one. For the device to probe without error, we'll > need to ensure it's registered with the correct WAI. > > Signed-off-by: Lee Jones You clearly have a better datashee

Re: [PATCH 38/38] iio: magn-core: st: Provide support for the LSM303DLH

2013-09-14 Thread Jonathan Cameron
On 09/10/13 13:49, Lee Jones wrote: > Trivial patch adding the LSM303DLH to the list of already supported > Magnetometer Sensors. > > Signed-off-by: Lee Jones err. > index 12e7e79..b2e2917 100644 > --- a/drivers/iio/magnetometer/st_magn_core.c > +++ b/drivers/iio/magnetometer/st_magn_core.c > @@

Re: [PATCH 2/2] iio: ti_am335x_adc: Take touchscreen channels into account for conversion timeout

2013-09-15 Thread Jonathan Cameron
On 09/10/13 22:02, Matthias Kaehlcke wrote: > The calculation of the old conversion timeout value was based on the number of > channels used by this driver. This doesn't take into account that other > channels > can be used by the touchscreen driver. Adjust the timeout value to the maximum > if th

Re: [PATCH v3 8/8] industrialio: use anon_inode_getfd() with O_CLOEXEC flag

2013-09-15 Thread Jonathan Cameron
On 09/06/13 11:39, Yann Droneaud wrote: > IIO uses anon_inode_get() to allocate file descriptors as part > of its ioctls. But those ioctls are lacking a flag argument > allowing userspace to choose options for the newly opened file > descriptor. > > In such case it's advised to use O_CLOEXEC by de

Re: [PATCH 2/2] iio: ti_am335x_adc: Take touchscreen channels into account for conversion timeout

2013-09-15 Thread Jonathan Cameron
On 09/15/13 17:17, Jonathan Cameron wrote: > On 09/10/13 22:02, Matthias Kaehlcke wrote: >> The calculation of the old conversion timeout value was based on the number >> of >> channels used by this driver. This doesn't take into account that other >> channels &

Re: [PATCH 25/38] iio: pressure-core: st: Allow for number of channels to vary

2013-09-16 Thread Jonathan Cameron
Lee Jones wrote: >On Sat, 14 Sep 2013, Jonathan Cameron wrote: > >> On 09/10/13 13:49, Lee Jones wrote: >> > At the moment the number of channels specified is dictated by the >first >> > sensor supported by the driver. As we add support for more sensors >thi

Re: [PATCH 14/38] iio: accel: st: Append _accel to accelerator sensor device names

2013-09-16 Thread Jonathan Cameron
On 09/16/13 13:03, Lars-Peter Clausen wrote: > On 09/16/2013 11:21 AM, Denis CIOCCA wrote: >> Hi Lars, >>> On 09/14/2013 02:27 PM, Jonathan Cameron wrote: >>>> On 09/14/13 13:14, Jonathan Cameron wrote: >>>>> On 09/10/13 13:49, Lee Jones wrote: >&g

Re: [PATCH 14/38] iio: accel: st: Append _accel to accelerator sensor device names

2013-09-16 Thread Jonathan Cameron
On 09/16/13 14:43, Lars-Peter Clausen wrote: > On 09/16/2013 03:31 PM, Lee Jones wrote: >>> Honestly I don't care either way on these, but consistency would definitely >>> be good so applied to the togreg branch of iio.git >> >> For clarification, is togreg due for the v3.12 merge window or will be

Re: [PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling support

2013-09-18 Thread Jonathan Cameron
"Zubair Lutfullah :" wrote: >On Tue, Sep 17, 2013 at 09:27:27PM -0700, Dmitry Torokhov wrote: >> Hi Zubair, >> >> On Tue, Sep 17, 2013 at 09:44:07AM +0500, Zubair Lutfullah wrote: >> > + >> > + ret = devm_request_threaded_irq(indio_dev->dev.parent, >> > + irq, >> > +

Re: [PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling support

2013-09-18 Thread Jonathan Cameron
On 18/09/13 12:23, Zubair Lutfullah wrote: Previously the driver had only one-shot reading functionality. This patch adds continuous sampling support to the driver. Continuous sampling starts when buffer is enabled. HW IRQ wakes worker thread that pushes samples to userspace. Sampling stops when

Re: [PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling support

2013-09-18 Thread Jonathan Cameron
Dmitry Torokhov wrote: >On Wed, Sep 18, 2013 at 10:39:42AM +0100, Jonathan Cameron wrote: >> >> >> "Zubair Lutfullah :" wrote: >> >On Tue, Sep 17, 2013 at 09:27:27PM -0700, Dmitry Torokhov wrote: >> >> Hi Zubair, >> >> >&g

Re: [PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling support

2013-09-18 Thread Jonathan Cameron
Dmitry Torokhov wrote: >On Wed, Sep 18, 2013 at 05:12:02PM +0100, Jonathan Cameron wrote: >> >> >> Dmitry Torokhov wrote: >> >On Wed, Sep 18, 2013 at 10:39:42AM +0100, Jonathan Cameron wrote: >> >> >> >> >> >> "Zuba

Re: [PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling support

2013-09-18 Thread Jonathan Cameron
"Zubair Lutfullah :" wrote: >On Wed, Sep 18, 2013 at 06:05:12PM +0100, Jonathan Cameron wrote: >> >> >> >However in this case such conversion us dangerous. With all but >IRQ >> >> >resource managed by the traditional methods they will be rel

Re: [PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling support

2013-09-18 Thread Jonathan Cameron
"Zubair Lutfullah :" wrote: >On Wed, Sep 18, 2013 at 02:58:47PM +0100, Jonathan Cameron wrote: >> On 18/09/13 12:23, Zubair Lutfullah wrote: >> >Previously the driver had only one-shot reading functionality. >> >This patch adds continuous sampling support

Re: [PATCH 3/10] iio: at91_adc: Cocci spatch "noderef"

2013-09-20 Thread Jonathan Cameron
On 09/20/13 08:26, Nicolas Ferre wrote: > On 19/09/2013 23:42, Thomas Meyer : >> sizeof when applied to a pointer typed expression gives the size of the >> pointer. >> Found by coccinelle spatch "misc/noderef.cocci" >> >> Signed-off-by: Thomas Meyer > > Acked-by: Nicolas Ferre Applied to the fix

Re: [PATCH 3/10] iio: at91_adc: Cocci spatch "noderef"

2013-09-20 Thread Jonathan Cameron
On 09/20/13 19:36, Jonathan Cameron wrote: > On 09/20/13 08:26, Nicolas Ferre wrote: >> On 19/09/2013 23:42, Thomas Meyer : >>> sizeof when applied to a pointer typed expression gives the size of the >>> pointer. >>> Found by coccinelle spatch "misc/nod

Re: [PATCH 04/11] iio: pressure-i2c: st: Simplify error checking in probe()

2013-09-04 Thread Jonathan Cameron
Hi Lee. This won't apply as this driver has already been cleaned up using devm_iio_device_alloc. Guessing you are basing on an old tree? Always use at least staging-next for IIO patches. I think this one will hit mainline in next few days. Jonathan Lee Jones wrote: >Strip out all the unneces

Re: [PATCH 09/11] iio: pressure-core: st: Clean-up error handling in probe function

2013-09-04 Thread Jonathan Cameron
Lee Jones wrote: >This patch contains some pretty basic clean-ups in probe() pertaining >to >the simplification of error handling and a couple of readability >adaptions. > >Signed-off-by: Lee Jones Hi Lee Most of this series look fine but I am not that keen on some of this one. The white spa

Re: [PATCH 1/5] iio: adc: remove unnecessary work pending test

2013-09-07 Thread Jonathan Cameron
ccing Michael Hennerich and Lars-Peter Clausen, On 09/06/13 16:20, Tejun Heo wrote: > On Fri, Sep 06, 2013 at 07:02:34PM +0800, Xie XiuQi wrote: >> Remove unnecessary work pending test before calling schedule_work(). >> It has been tested in queue_work_on() already. No functional changed. >> >> Si

Re: [PATCH 1/2] input: ti_am335x_tsc: Enable shared IRQ for TSC

2013-09-08 Thread Jonathan Cameron
On 09/01/13 12:17, Zubair Lutfullah wrote: > Enable shared IRQ to allow ADC to share IRQ line from > parent MFD core. Only FIFO0 IRQs are for TSC and handled > on the TSC side. > > Step mask would be updated from cached variable only previously. > In rare cases when both TSC and ADC are used, the

Re: [PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling support

2013-09-08 Thread Jonathan Cameron
On 09/01/13 12:17, Zubair Lutfullah wrote: > Previously the driver had only one-shot reading functionality. > This patch adds triggered buffer support to the driver. > > Continuous sampling starts when buffer is enabled. > And samples are pushed to userpace by the trigger which > triggers automatic

Re: [PATCH] iio: isl29018: Fix uninitialized value

2013-09-08 Thread Jonathan Cameron
On 08/29/13 21:14, Derek Basehore wrote: > The lux_uscale value is not initialized at probe. The value will be > uninitialized unless a value is written to it through the iio channel > interface. > This fixes that. > > Signed-off-by: Derek Basehore > Reviewed-on: https://gerrit.chromium.org/gerr

Re: [PATCH 1/5] iio: adc: remove unnecessary work pending test

2013-09-09 Thread Jonathan Cameron
On 09/09/13 16:23, Michael Hennerich wrote: > On 09/07/2013 10:44 PM, Jonathan Cameron wrote: >> ccing Michael Hennerich and Lars-Peter Clausen, > > Looks good to me! > > /Acked-by/: /Michael Hennerich/ Applied to the togreg branch of iio.git. Thanks > >> >>

Re: [PATCH 26/38] iio: pressure-core: st: Clean-up probe() function

2013-09-10 Thread Jonathan Cameron
Lee Jones wrote: >This patch contains some pretty basic clean-ups in probe() pertaining >to >the simplification of error handling and a couple of readability >adaptions. > >Signed-off-by: Lee Jones >--- >drivers/iio/pressure/st_pressure_core.c | 32 > > 1 file cha

Re: [PATCH 27/38] iio: pressure-core: st: Give some indication if device probing was successful

2013-09-10 Thread Jonathan Cameron
Lee Jones wrote: >At the moment the driver is silent in some error cases and if >successful. >Prior to this patch there was no clear way to know if the driver >succeeded >or not without looking deep into sysfs. > >Signed-off-by: Lee Jones >--- > drivers/iio/pressure/st_pressure_core.c | 3 +++ >

Re: [PATCH 27/38] iio: pressure-core: st: Give some indication if device probing was successful

2013-09-11 Thread Jonathan Cameron
On 09/11/13 08:18, Lars-Peter Clausen wrote: > On 09/11/2013 09:10 AM, Lee Jones wrote: >> On Tue, 10 Sep 2013, Jonathan Cameron wrote: >>> Lee Jones wrote: >>>> At the moment the driver is silent in some error cases and if >>>> successful. >>>&

Re: [PATCH 3/3] staging:iio:ade7753/ade7754/ade7759: Use spi_w8r16be() instead of spi_w8r16()

2013-09-28 Thread Jonathan Cameron
; drivers/staging/iio/meter/ade7759.c:97:29:got unsigned short > [usertype] *val > > Signed-off-by: Lars-Peter Clausen Acked-by: Jonathan Cameron I'm also fine with the various alternative suggestions elsewhere in this thread. > --- > drivers/staging/iio/meter/ade7753.c |

Re: [PATCH V11 0/3] iio: input: ti_am335x_adc: Add continuous sampling support

2013-09-21 Thread Jonathan Cameron
Hi Zubair, Thanks for persevering with this patch set. Now this gets to be the example for dealing with hardware buffer equipped devices ;) Applied to the togreg branch of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git On 09/19/13 07:24, Zubair Lutfullah wrote: > Hi, > > These ap

Re: [PATCH v2] iio: ti_am335x_adc: Take touchscreen steps into account for conversion timeout

2013-09-21 Thread Jonathan Cameron
On 09/16/13 22:17, Matthias Kaehlcke wrote: > The calculation of the old conversion timeout value was based on the number of > steps used by this driver. This doesn't take into account that other steps > can be used by the touchscreen driver. Select the timeout value based on the > steps used by bo

Re: [PATCH 13/20] iio: sensors-core: st: Clean-up error handling in st_sensors_read_axis_data()

2013-09-21 Thread Jonathan Cameron
On 09/16/13 17:02, Lee Jones wrote: > Gets rid of those unnecessary gotos. > > Signed-off-by: Lee Jones Applied to the togreg branch of iio.git Thanks Lee. > --- > drivers/iio/common/st_sensors/st_sensors_core.c | 8 +++- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/d

Re: [PATCH 12/20] iio: sensors-core: st: Clean-up error handling in st_sensors_init_sensor()

2013-09-21 Thread Jonathan Cameron
On 09/16/13 17:02, Lee Jones wrote: > Strip out all those unnecessary gotos and just return the error right away. > > Aids to simplicity and reduces code. > > Signed-off-by: Lee Jones Applied to the togreg branch of iio.git Thanks > --- > drivers/iio/common/st_sensors/st_sensors_core.c | 9 +++

Re: [PATCH 11/20] iio: sensors-core: st: Support sensors which don't have a Data Ready pin

2013-09-21 Thread Jonathan Cameron
On 09/16/13 17:02, Lee Jones wrote: > Not all ST's sensors support data ready, so let's make the declaration > of one conditional. > > Signed-off-by: Lee Jones Applied to the togreg branch of iio.git Thanks Lee > --- > drivers/iio/common/st_sensors/st_sensors_core.c | 33 >

Re: [PATCH 14/20] iio: pressure-core: st: Clean-up probe() function

2013-09-21 Thread Jonathan Cameron
On 09/16/13 17:02, Lee Jones wrote: > This patch contains some pretty basic clean-ups in probe() pertaining to > the simplification of error handling and a couple of readability adaptions. > > Signed-off-by: Lee Jones Applied to the togreg branch of iio.git Thanks Lee, > --- > drivers/iio/pres

Re: [PATCH 15/20] iio: pressure: st: Add support for new LPS001WP pressure sensor

2013-09-21 Thread Jonathan Cameron
On 09/16/13 17:02, Lee Jones wrote: > Here we use existing practices to introduce support for another > pressure/temperature sensor, the LPS001WP. > > Signed-off-by: Lee Jones Applied to the togreg branch of iio.git Thanks > --- > drivers/iio/pressure/st_pressure.h | 1 + > drivers/iio/pr

Re: [PATCH 19/20] iio: gyro-core: st: Clean up error handling in probe()

2013-09-21 Thread Jonathan Cameron
On 09/16/13 17:02, Lee Jones wrote: > Reduce the amount of those unnecessary goto calls, as in most cases > we can simply return immediately. We also only call for the IRQ number > once and use that value throughout. > > Signed-off-by: Lee Jones Applied to the togreg branch of iio.git Thanks, >

Re: [PATCH 18/20] iio: accel-core: st: Clean up error handling in probe()

2013-09-21 Thread Jonathan Cameron
On 09/16/13 17:02, Lee Jones wrote: > Reduce the amount of those unnecessary goto calls, as in most cases > we can simply return immediately. We also only call for the IRQ number > once and use that value throughout. > > Signed-off-by: Lee Jones Applied to the togreg branch of iio.git Thanks, >

Re: [PATCH 20/20] iio: magn-core: st: Clean up error handling in probe()

2013-09-21 Thread Jonathan Cameron
On 09/16/13 17:02, Lee Jones wrote: > Reduce the amount of those unnecessary goto calls, as in most cases > we can simply return immediately. We also only call for the IRQ number > once and use that value throughout. > > Signed-off-by: Lee Jones Applied to the togreg branch of iio.git Thanks, >

  1   2   3   4   5   6   7   8   9   10   >