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 kirill.shute...@linux.intel.com 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

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 gmate.a...@gmail.com Thanks, added to togreg branch of iio.git --- drivers/staging/iio/adc/ad7280a.c |2 +- 1 file changed, 1 insertion(+), 1

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. So

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 julia.law...@lip6.fr 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

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-by:

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 axel@ingics.com Added to fixes-togreg branch of iio.git oops on this one. Should have picked that up in review.

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 axel@ingics.com 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 |

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

2012-11-02 Thread Jonathan Cameron
this all looks fine to me. Acked-by: Jonathan Cameron ji...@kernel.org But there is one issue, but this is not necessarily related to this patch, more inline. --- drivers/power/lp8788-charger.c | 26 +++--- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git

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

2012-10-06 Thread Jonathan Cameron
-by: Jonathan Cameron ji...@kernel.org I'll take this patch as soon as I know the mfd part has been accepted (just in case any interfaces change!) --- Changes in v2: Addressed review comments from Matthias Kaehlcke Changes in v3: Addressed review comments from Jonathan Cameron

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

2012-11-05 Thread Jonathan Cameron
Acked-by: Jonathan Cameron ji...@kernel.org As there is a clear dependence on the mfd elements here this should probably go though Samuel's tree once people are happy with the other elements. --- drivers/iio/adc/Kconfig |7 ++ drivers/iio/adc/Makefile |1 + drivers/iio

Re: [PATCH 1/3] lp8788-charger: use consumer device name on setting IIO channels

2012-10-19 Thread Jonathan Cameron
(). Signed-off-by: Milo(Woogyom) Kim milo@ti.com Acked-by: Jonathan Cameron ji...@kernel.org --- drivers/power/lp8788-charger.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/power/lp8788-charger.c b/drivers/power/lp8788-charger.c index e852d12..614e6aa

Re: [PATCH 2/3] lp8788-charger: fix ADC channel names

2012-10-19 Thread Jonathan Cameron
On 10/18/2012 07:11 AM, Kim, Milo wrote: LP8788 IIO ADC driver and platform data have specific naming convention for ADC channels. That is using prefix 'lp8788_'. To keep this rule, ADC channel names are changed. It's a little unusual to name the consumer side of the map so specifically.

Re: [PATCH 07/12] staging/iio/lis3l02dq: fix building without irq_to_gpio

2012-10-13 Thread Jonathan Cameron
On 09/29/2012 04:03 PM, Arnd Bergmann wrote: On Saturday 29 September 2012, Jonathan Cameron wrote: On 09/28/2012 10:36 PM, Arnd Bergmann wrote: The driver has not been building for some time after the irq_to_gpio function has been removed from the kernel. The only board in the upstream

Re: linux-next: build failure after merge of the final tree (staging tree related)

2012-11-13 Thread Jonathan Cameron
On 13/11/12 05:51, Stephen Rothwell wrote: Hi all, After merging the final tree, today's linux-next build (powerpc allyesconfig) failed like this: In file included from drivers/power/lp8788-charger.c:15:0: include/linux/iio/consumer.h:76:21: error: unknown type name 'u8'

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 alexandre.bell...@free-electrons.com Signed-off-by: Maxime Ripard maxime.rip...@free-electrons.com A few bits and

Re: [PATCH] staging/adt7316 Fix some 'interesting' string operations

2013-04-09 Thread Jonathan Cameron
On 04/08/2013 06:54 PM, Luck, Tony wrote: I think it is a good idea to switch directly to strtobool. But anyway, if you don't want to respin the patch it is fine as it is. I didn't know that strtobool() existed ... but now that I do I agree that it would be better to use it here. But ...

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 l...@metafoo.de wrote: On 03/27/2013 07:35 PM, Naveen Krishna Ch wrote: On 13 March 2013 13:39, Doug Anderson diand...@chromium.org wrote: The exynos ADC won't work without a regulator

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 ch.nav...@samsung.com wrote: As the exynos_adc driver only supports device tree registration. Making driver depend on CONFIG_OF solves possible errors during probe.

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 v2 1/4] iio: adc: Document the regulator/clocks for exynos-adc

2013-03-28 Thread Jonathan Cameron
Doug Anderson diand...@chromium.org wrote: Hi, On Wed, Mar 27, 2013 at 11:40 AM, Lars-Peter Clausen l...@metafoo.de wrote: On 03/27/2013 07:35 PM, Naveen Krishna Ch wrote: On 13 March 2013 13:39, Doug Anderson diand...@chromium.org wrote: The exynos ADC won't work without a regulator called

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 li...@roeck-us.net 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

Re: [PATCH v3] IIO ADC support for AD7923

2013-03-03 Thread Jonathan Cameron
On 02/13/2013 09:20 AM, Jonathan Cameron wrote: On 13/02/13 09:19, Lars-Peter Clausen wrote: On 02/13/2013 07:47 AM, Christophe Leroy wrote: This patch adds support for Analog Devices AD7923 ADC in the IIO Subsystem. Signed-off-by: Patrick Vasseur patrick.vass...@c-s.fr Signed-off

Re: [PATCH v7] iio: adc: add exynos adc driver under iio framwork

2013-03-03 Thread Jonathan Cameron
On 02/15/2013 01:35 PM, Naveen Krishna Ch wrote: On 15 February 2013 18:56, Lars-Peter Clausen l...@metafoo.de wrote: On 02/15/2013 02:17 PM, Naveen Krishna Ch wrote: On 15 February 2013 18:43, Lars-Peter Clausen l...@metafoo.de wrote: On 02/15/2013 07:56 AM, Naveen Krishna Chatradhi wrote:

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 li...@roeck-us.net 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

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 broo...@opensource.wolfsonmicro.com 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.

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 broo...@opensource.wolfsonmicro.com wrote: On Wed, Jan 09, 2013 at 06:31:09PM +0100, Lars-Peter Clausen wrote: The second function spi_sync_transfer

Re: [PATCH v3] IIO ADC support for AD7923

2013-02-13 Thread Jonathan Cameron
On 13/02/13 09:19, Lars-Peter Clausen wrote: On 02/13/2013 07:47 AM, Christophe Leroy wrote: This patch adds support for Analog Devices AD7923 ADC in the IIO Subsystem. Signed-off-by: Patrick Vasseur patrick.vass...@c-s.fr Signed-off-by: Christophe Leroy christophe.le...@c-s.fr Looks good,

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 broo...@opensource.wolfsonmicro.com 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.

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 [drivers/mtd/ubi/ubi.ko] undefined! ERROR:

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 ch.nav...@samsung.com Just a quick general comment on patch

Re: [PATCH] rtc: hid-sensor-time: Add missing spin_lock_init

2013-01-20 Thread Jonathan Cameron
On 01/17/2013 12:47 PM, Alexander Holler wrote: Am 17.01.2013 02:49, schrieb Axel Lin: Thanks, yes, I missed it the initialization of the spinlock. Below is my ack. Regards, Alexander Signed-off-by: Axel Lin axel@ingics.com Acked-by: Alexander Holler hol...@ahsoftware.de

Re: [PATCH] staging/iio: Use correct argument for sizeof

2013-01-22 Thread Jonathan Cameron
On 01/21/2013 09:14 PM, Peter Huewe wrote: found with coccicheck sizeof when applied to a pointer typed expression gives the size of the pointer The semantic patch that makes this output is available in scripts/coccinelle/misc/noderef.cocci. More information about semantic patching is

Re: [PATCH 11/33] iio: Convert to devm_ioremap_resource()

2013-01-22 Thread Jonathan Cameron
On 01/21/2013 10:09 AM, Thierry Reding wrote: Convert all uses of devm_request_and_ioremap() to the newly introduced devm_ioremap_resource() which provides more consistent error handling. Signed-off-by: Thierry Reding thierry.red...@avionic-design.de Cc: Jonathan Cameron ji...@cam.ac.uk Cc

Re: [PATCH] IIO ADC support for AD7923

2013-01-19 Thread Jonathan Cameron
On 01/18/2013 11:02 PM, Getz, Robin wrote: On Thu 17 Jan 2013 12:36, Lars-Peter Clausen pondered: On 01/17/2013 06:11 PM, Alessandro Rubini wrote: [...] But yes, you are right. I'm working on another I/O subsystem. We are gong to release zio-1.0 in a few days, because the thing is mature

Re: Query related to MSR(Magnetic Stripe Reader) Device Driver

2013-02-15 Thread Jonathan Cameron
Greg KH gre...@linuxfoundation.org wrote: On Fri, Feb 15, 2013 at 04:48:33PM +0530, Priyaranjan Das wrote: Hi Greg, On Thu, Jan 31, 2013 at 11:09 AM, Priyaranjan Das priyaranjan456...@gmail.com wrote: Hi Greg, On Tue, Jan 29, 2013 at 7:03 PM, Greg KH gre...@linuxfoundation.org wrote:

Re: [PATCH v5] iio: Add OF support

2013-02-20 Thread Jonathan Cameron
Guenter Roeck li...@roeck-us.net wrote: On Fri, Feb 08, 2013 at 08:30:48AM +, 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 li...@roeck-us.net Looks fine to me. Will give it a few

Re: [PATCH v5] iio: Add OF support

2013-02-20 Thread Jonathan Cameron
Guenter Roeck li...@roeck-us.net 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 li...@roeck-us.net --- v5: - Updated examples in

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 +, Jonathan Cameron wrote: Guenter Roeck li...@roeck-us.net 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

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 li...@roeck-us.net wrote: On Wed, Feb 20, 2013 at 11:38:22AM -0600, Rob Herring wrote: On 02/07/2013 11:09 AM, Guenter

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

2012-09-07 Thread Jonathan Cameron
On 02/09/12 16:39, anish kumar wrote: From: anish kumar anish198519851...@gmail.com This patch is to use IIO to write a generic batttery driver. battery There are some inherent assumptions here: 1.User is having both main battery and backup battery. Seems rather like that could be easily

Re: [PATCH] iio: isl29018: Support fractional ALS scaling.

2012-09-08 Thread Jonathan Cameron
On 09/05/2012 08:55 PM, Bryan Freed wrote: The Industrial IO framework supports scaling ADC values by fractions, but most drivers default to using whole numbers. This change turns on fractional scaling in the isl29018 driver. Signed-off-by: Bryan Freed bfr...@chromium.org add to togreg

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

2012-09-08 Thread Jonathan Cameron
On 09/08/2012 08:10 AM, anish kumar wrote: Thanks for your time. On Fri, 2012-09-07 at 08:52 +0100, Jonathan Cameron wrote: On 02/09/12 16:39, anish kumar wrote: From: anish kumar anish198519851...@gmail.com This patch is to use IIO to write a generic batttery driver. battery

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

2012-09-08 Thread Jonathan Cameron
On 09/08/2012 08:30 AM, anish kumar wrote: On Fri, 2012-09-07 at 10:49 +0200, Lars-Peter Clausen wrote: On 09/02/2012 05:39 PM, anish kumar wrote: From: anish kumar anish198519851...@gmail.com This patch is to use IIO to write a generic batttery driver. There are some inherent assumptions

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

2012-09-08 Thread Jonathan Cameron
On 09/07/2012 09:51 AM, Kim, Milo wrote: Mostly looks fine. A small confusion has occured with the consumer interface though and the read_raw needs a bit of reorganizing. Nearly there! TI LP8788 PMU provides regulators, battery charger, ADC, RTC, backlight driver and current sinks. This

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

2012-09-09 Thread Jonathan Cameron
On 09/09/2012 10:46 AM, Lars-Peter Clausen wrote: On 09/09/2012 11:32 AM, anish kumar wrote: +channels = iio_channel_get_all(dev_name(pdev-dev)); I would give these explicit names and get the two individual channels by name. I think it will give you cleaner code. Yes, now it will be

Re: [PATCH 1/2] iio: inkern: clear allocated memory

2012-09-10 Thread Jonathan Cameron
On 10/09/12 09:02, Kim, Milo wrote: Use kzalloc() rathern than kmalloc() for initializing iio_dev and iio_chan_spec. Please state why. I'm sure I can track it down, but it ought to be in the commit comment. Signed-off-by: Milo(Woogyom) Kim milo@ti.com --- drivers/iio/inkern.c |

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

2012-09-10 Thread Jonathan Cameron
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_channel_get() should be returned as error

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

2012-09-17 Thread Jonathan Cameron
On 09/17/2012 09:44 AM, 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 side. If the datasheet name is not matched with any adc_channel_label, the iio_channel_get() should be returned as error for

Re: [PATCH 2/2] iio: inkern: put the IIO device when mem alloc gets failed

2012-09-17 Thread Jonathan Cameron
On 09/17/2012 10:57 AM, Kim, Milo wrote: drivers/iio/inkern.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c index 13748c0..aff034b 100644 --- a/drivers/iio/inkern.c +++ b/drivers/iio/inkern.c @@ -132,7 +132,7 @@

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

2012-09-18 Thread Jonathan Cameron
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. This patch enables the LP8788 ADC functions. The LP8788 ADC has several ADC input selection and

Re: linux-next: build failure after merge of the staging tree

2012-09-18 Thread Jonathan Cameron
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/12/2012 07:07 AM, Stephen Rothwell wrote: Hi Greg, After merging the staging tree, today's linux-next build (x86_64 allmodconfig) failed like this: drivers/hid/hid-sensor-hub.c: In function 'sensor_hub_probe':

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 decreased.

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) and

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. This patch enables the LP8788 ADC functions

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 anish198519851...@gmail.com In last version: Addressed concerns raised by lars: a. made the adc_bat per device. b. get the IIO channel using hardcoded channel names.

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-attrs results

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 swapnil.tiw...@st.com mailto:swapnil.tiw...@st.com Hi, couple of standard bits first. 1) Make sure your code passes checkpatch.pl with no warnings (only

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

2012-09-13 Thread Jonathan Cameron
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 review comments from Jonathan Cameron

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

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

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 anish198519851...@gmail.com 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.

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 anish198519851...@gmail.com 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

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 carried

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

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

2012-09-15 Thread Jonathan Cameron
On 09/15/2012 01:15 AM, Kim, Milo wrote: The LP8788 has 13 ADC input selection. ADC selection: Battery voltage, general ADC1 and so on. ADC result: Result = MAX_VALUE * (raw + 0.5) / 4095 except ADC is the charger voltage If the ADC input is the charger voltage, Result = MAX_VALUE *

Re: [PATCH RESEND] iio: inkern: allocate zeroed memory

2012-09-15 Thread Jonathan Cameron
On 09/14/2012 02:24 AM, Kim, Milo wrote: Use kzalloc() rather than kmalloc() for initializing the iio_channel structure. This patch enables the iio_dev and iio_chan_spec are set to NULL. This may prevent the page fault problem because the pointer of iio_chan_spec is initialized as NULL.

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 questions

Re: [PATCH] iio: lm3533-als: Fix build warnings

2012-08-14 Thread Jonathan Cameron
On 08/02/2012 11:10 AM, Axel Lin wrote: Fix below build warnings: CC [M] drivers/iio/light/lm3533-als.o drivers/iio/light/lm3533-als.c:667:8: warning: initialization from incompatible pointer type [enabled by default] drivers/iio/light/lm3533-als.c:667:8: warning: (near initialization for

Re: [PATCH] drivers/iio/adc/at91_adc.c: use devm_ functions

2012-08-14 Thread Jonathan Cameron
Lars-Peter, Are you happy with this updated version? Can't immediately find any response from you to it. Jonathan From: Julia Lawall julia.law...@lip6.fr The various devm_ functions allocate memory that is released when a driver detaches. This patch uses these functions for data that is

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

2012-08-14 Thread Jonathan Cameron
On 08/10/2012 08:06 AM, Kim, Milo wrote: Patch v2. (a) Use iio_priv() for private data rather than allocating data (b) Support raw and scale inferface for iio consumer (c) Make inline function for lp8788_adc_read_raw() (d) For better readability, use fixed number for shift and mask

RE: [PATCH v2] iio: adc: add new lp8788 adc driver

2012-08-15 Thread Jonathan Cameron
Kim, Milo milo@ti.com wrote: + switch (mask) { + case IIO_CHAN_INFO_RAW: + *val = result; + return IIO_VAL_INT; + case IIO_CHAN_INFO_SCALE: + *val = adc_const[id] * ((result * 1000 + 500) / 1000); This looks wrong. The IIO_CHAN_INFO_SCALE

Re: [PATCH 1/3] iio: add iio_read_channel_offset() consumer api

2012-08-16 Thread Jonathan Cameron
On 16/08/12 09:19, Lars-Peter Clausen wrote: On 08/16/2012 09:39 AM, Kim, Milo wrote: This allows the iio consumer to get the offset of the channel. The value of offset can be used when calculating the result such as 'result = raw * scale + offset'. result = (raw + offset) * scale Otherwise

Re: [PATCH 1/3] iio: add iio_read_channel_offset() consumer api

2012-08-16 Thread Jonathan Cameron
On 08/16/2012 08:49 AM, Kim, Milo wrote: int iio_read_channel_scale(struct iio_channel *chan, int *val, int *val2); +/** + * iio_read_channel_offset() - read offset from a given channel + * @channel: The channel being queried. the parameter is 'chan',

Re: [PATCH] drivers/iio/adc/at91_adc.c: use devm_ functions

2012-08-16 Thread Jonathan Cameron
On 08/15/2012 10:20 AM, Julia Lawall wrote: devm_request_and_ioremap will already print a error messages on it's own if something goes wrong. So strictly speaking this one is redundant, but I don't think it is necessary to do a resend just for this, maybe you can remove the extra dev_err when

Re: [PATCH 2/3] iio: adc: add new lp8788 adc driver

2012-08-09 Thread Jonathan Cameron
On 08/09/2012 09:22 AM, Kim, Milo wrote: TI LP8788 has ADC function. The result of LP878 ADC is used in the LP8788 power supply driver. (such like getting the battery voltage, temperature and etc) Hi, This is mostly fine though things have gotten a little confused wrt to the handling

Re: [PATCH] [PATCH V4]Extcon: adc_jack: adc-jack driver to support 3.5 pi or simliar devices

2012-08-10 Thread Jonathan Cameron
On 08/08/2012 02:04 AM, anish kumar wrote: From: anish kumar anish198519851...@gmail.com External connector devices that decides connection information based on ADC values may use adc-jack device driver. The user simply needs to provide a table of adc range and connection states. Then, extcon

Re: [PATCH 2/3] iio: use IIO_CHAN_INFO_RAW rather than 0

2012-08-27 Thread Jonathan Cameron
On 08/16/2012 08:39 AM, Kim, Milo wrote: (a) For better readability, replace 0 with IIO_CHAN_INFO_RAW. (b) Make same line-format as other apis() : iio_read_channel_scale() and iio_read_channel_offset() merged. Thanks. Signed-off-by: Milo(Woogyom) Kim milo@ti.com ---

Re: [PATCH 1/13] drivers/staging/iio/adc/spear_adc.c: use clk_prepare_enable and clk_disable_unprepare

2012-08-27 Thread Jonathan Cameron
On 08/27/2012 05:01 AM, viresh kumar wrote: On Sun, Aug 26, 2012 at 9:30 PM, Julia Lawall julia.law...@lip6.fr wrote: From: Julia Lawall julia.law...@lip6.fr Clk_prepare_enable and clk_disable_unprepare combine clk_prepare and clk_enable, and clk_disable and clk_unprepare. They make the code

Re: [PATCH 1/13] drivers/staging/iio/adc/spear_adc.c: use clk_prepare_enable and clk_disable_unprepare

2012-08-27 Thread Jonathan Cameron
On 08/27/2012 09:06 PM, Jonathan Cameron wrote: On 08/27/2012 05:01 AM, viresh kumar wrote: On Sun, Aug 26, 2012 at 9:30 PM, Julia Lawall julia.law...@lip6.fr wrote: From: Julia Lawall julia.law...@lip6.fr Clk_prepare_enable and clk_disable_unprepare combine clk_prepare and clk_enable

Re: [PATCH 6/13] drivers/iio/adc/at91_adc.c: use clk_prepare_enable and clk_disable_unprepare

2012-08-27 Thread Jonathan Cameron
On 08/26/2012 05:00 PM, Julia Lawall wrote: From: Julia Lawall julia.law...@lip6.fr Clk_prepare_enable and clk_disable_unprepare combine clk_prepare and clk_enable, and clk_disable and clk_unprepare. They make the code more concise, and ensure that clk_unprepare is called when clk_enable

Re: [PATCH 6/6] drivers/iio/adc/at91_adc.c: adjust inconsistent IS_ERR and PTR_ERR

2012-08-27 Thread Jonathan Cameron
On 08/25/2012 08:57 PM, Julia Lawall wrote: From: Julia Lawall julia.law...@lip6.fr Change the call to PTR_ERR to access the value just tested by IS_ERR. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @@ expression e,e1; @@ ( if

Re: [PATCH 1/1] staging: iio: Integration gyroscope itg3200

2012-08-17 Thread Jonathan Cameron
On 17/08/12 09:27, Thorsten Nowak wrote: InvenSense ITG3200 Digital 3-Axis Gyroscope I2C driver Mostly fine. A few comments in line. One big process thing: If you are submitting a driver for review, don't leave commented out code blocks there. By all means do that in an early rfc, but this

Re: [PATCH 3/3] IIO: arm: Add LRADC to i.MX28 dts

2012-08-20 Thread Jonathan Cameron
On 19/08/12 16:30, Marek Vasut wrote: Dear Shawn Guo, On 17 August 2012 10:57, Marek Vasut ma...@denx.de wrote: Thanks ... still, is there some key for those tags? Or do you invent them at random and then let people guess what's right? Some git grep on Documentation directory gets me nothing.

Re: [PATCH 3/3] IIO: arm: Add LRADC to i.MX28 dts

2012-08-20 Thread Jonathan Cameron
On 20/08/12 08:52, Shawn Guo wrote: On Mon, Aug 20, 2012 at 08:29:23AM +0100, Jonathan Cameron wrote: Mostly these prefixes are an excuse for grumpy maintainers to moan at people :) Yeah, I have to become grumpy when my comment gets ignored and I have to make it right (for several times

Re: [PATCH] iio: dac: ad5064: fix section mismatch in ad5064_init() in linux-next

2012-07-12 Thread Jonathan Cameron
On 07/11/2012 07:56 AM, Lars-Peter Clausen wrote: On 07/11/2012 06:05 AM, Gerard Snitselaar wrote: ad5064_init() calls ad5064_spi_unregister_driver() which is annotated __exit. Signed-off-by: Gerard Snitselaar d...@snitselaar.org Thanks, Acked-by: Lars-Peter Clausen l...@metafoo.de

Re: [PATCH 1/2] staging/iio: use module_platform_driver macro

2012-07-22 Thread Jonathan Cameron
) -{ - return platform_driver_register(iio_hwmon_driver); -} -module_init(iio_inkern_init); - -static void iio_inkern_exit(void) -{ - platform_driver_unregister(iio_hwmon_driver); -} -module_exit(iio_inkern_exit); +module_platform_driver(iio_hwmon_driver); MODULE_AUTHOR(Jonathan

Re: [PATCH 3/3 v2] iio: add rtc-driver for HID sensors of type time

2012-12-10 Thread Jonathan Cameron
On 12/10/2012 09:39 PM, Lars-Peter Clausen wrote: On 12/10/2012 10:26 PM, Alexander Holler wrote: Am 10.12.2012 21:22, schrieb Lars-Peter Clausen: On 12/10/2012 08:45 PM, Alexander Holler wrote: Am 10.12.2012 18:05, schrieb Lars-Peter Clausen: Looks pretty good now. But there are still some

Re: [PATCH 3/3 v2] iio: add rtc-driver for HID sensors of type time

2012-12-11 Thread Jonathan Cameron
On 10/12/12 22:50, Alexander Holler wrote: Am 10.12.2012 22:42, schrieb Jonathan Cameron: On 12/10/2012 09:39 PM, Lars-Peter Clausen wrote: On 12/10/2012 10:26 PM, Alexander Holler wrote: Am 10.12.2012 21:22, schrieb Lars-Peter Clausen: On 12/10/2012 08:45 PM, Alexander Holler wrote: Am

Re: [PATCH 3/3 v2] iio: add rtc-driver for HID sensors of type time

2012-12-11 Thread Jonathan Cameron
On 11/12/12 12:39, Alexander Holler wrote: Am 11.12.2012 10:40, schrieb Lars-Peter Clausen: Yes, move the header or merge into existing one as makes sense. I'm not pulling this driver into the IIO tree (unless for some reason Alessandro wants me to and I can't think why he would...).

Re: [PATCH v2] iio: adc: Add Texas Instruments ADC081C021/027 support

2012-11-24 Thread Jonathan Cameron
On 11/23/2012 03:13 PM, Thierry Reding wrote: Add support for reading conversion results from the ADC and provide them through a single IIO channel. A proper scaling factor is also exported based on the reference voltage provided by a regulator. Signed-off-by: Thierry Reding

Re: [PATCH v2] iio: adc: Add Texas Instruments ADC081C021/027 support

2012-11-24 Thread Jonathan Cameron
On 11/24/2012 03:54 PM, Lars-Peter Clausen wrote: On 11/24/2012 11:54 AM, Jonathan Cameron wrote: On 11/23/2012 03:13 PM, Thierry Reding wrote: Add support for reading conversion results from the ADC and provide them through a single IIO channel. A proper scaling factor is also exported based

Re: [PATCH v2] iio: dac: ad5446: Don't set error code to voltage_uv

2012-12-18 Thread Jonathan Cameron
On 12/18/2012 03:33 AM, Axel Lin wrote: regulator_get_voltage() may return negative error code. Add error checking to avoid setting error code to voltage_uv. Signed-off-by: Axel Lin axel@ingics.com added to fixes-togreg branch of iio.git --- Sorry. Just found I made the same mistake

Re: [PATCH] iio: (max1363) Fix probe error path

2012-12-27 Thread Jonathan Cameron
On 12/24/2012 06:24 AM, Guenter Roeck wrote: Instantiating the driver with no available regulator results in: [39711.686393] i2c i2c-7: new_device: Instantiated device max1139 at 0x35 [39711.688687] BUG: unable to handle kernel paging request at fe13 [39711.688734] IP:

Re: [PATCH 1/4 v2] iio: hid-sensors: respect CONFIG_IIO_TRIGGER

2012-12-15 Thread Jonathan Cameron
On 12/11/2012 06:21 PM, Alexander Holler wrote: Not much to say, without that change, hid-sensor-trigger will be always compiled if HID_SENSOR_IIO_COMMON is selected which fails if CONFIG_IIO_TRIGGER is not set because CONFIG_IIO_CONSUMERS_PER_TRIGGER will not be defined. Signed-off-by:

Re: [PATCH 2/4 RESEND] iio: Add Usage IDs for HID time sensors.

2012-12-15 Thread Jonathan Cameron
On 12/11/2012 06:21 PM, Alexander Holler wrote: These are Usage IDs for the attributes year, month, day, hour, minute and second, needed to read HID time sensors. Signed-off-by: Alexander Holler hol...@ahsoftware.de This has gotten very messy to follow. Could you resend the patches (without

Re: [PATCH v2 3/6] iio: dac: ad5504: Don't set error code to voltage_uv

2012-12-16 Thread Jonathan Cameron
On 12/14/2012 12:06 PM, Axel Lin wrote: regulator_get_voltage() may return negative error code. Add error checking to avoid setting error code to voltage_uv. Signed-off-by: Axel Lin axel@ingics.com Axel, I would definitely have prefered a resend of the whole series rather than just the

Re: [PATCH v4 0/5] Support for TSC/ADC MFD driver

2012-09-29 Thread Jonathan Cameron
the changes into existing patches. Also added a new patch to support suspend/resume feature. Fixed review comments by Matthias Kaehlcke. Changes in v3: Addressed review comments by Jonathan Cameron. Improved ADC driver with more readable labels, spaces

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

2012-09-29 Thread Jonathan Cameron
-by: Jonathan Cameron ji...@kernel.org Note I cannot build test and it won't apply to staging-next without some merge fixes. I wonder if this driver is a case for a small tree that gets pulled into input/iio/mfd in the next cycle. It's a fiddly merge at best right now as there have been changes

Re: [PATCH v4 5/5] MFD: ti_tscadc: add suspend/resume functionality

2012-09-29 Thread Jonathan Cameron
this merged into patch 4 as it's a simple addition to a driver that should arguably have been there in the first place. Anyhow I don't actually care that much! Regards, Rachna Signed-off-by: Patil, Rachna rac...@ti.com Acked-by: Jonathan Cameron ji...@kernel.org (if someone else is picking

Re: [PATCH 07/12] staging/iio/lis3l02dq: fix building without irq_to_gpio

2012-09-29 Thread Jonathan Cameron
On 09/28/2012 10:36 PM, Arnd Bergmann wrote: The driver has not been building for some time after the irq_to_gpio function has been removed from the kernel. The only board in the upstream kernel that provides this device is the Stargate 2, which is also maintained by Jonathan Cameron

  1   2   3   4   5   6   7   8   9   10   >