[PATCH 03/12] hwmon: lis3: Cleanup interrupt handling

2010-10-22 Thread Samu Onkalo
Irqcfg moved to chip data instead of platform data. This simplifies access in interrupt handler little bit. Input device open and close functions set status for interrupt threaded handler once. Unnecessary check for interrupt source removed since it is enough that active interrupt line indicates

[PATCH 02/12] hwmon: lis3: regulator control

2010-10-22 Thread Samu Onkalo
Based on pm_runtime control, turn lis3 regulators on and off. Perform context save and restore on transitions. Feature is optional and must be enabled in platform data. Signed-off-by: Samu Onkalo samu.p.onk...@nokia.com --- drivers/hwmon/lis3lv02d.c | 52

[PATCH 04/12] hwmon: lis3: Update coordinates at polled device open

2010-10-22 Thread Samu Onkalo
Call input device poll function at device open to refresh coordinates immediately. This is needed for the case where poll interval is set to zero and coordinate updates happens purely under interrupt control. Signed-off-by: Samu Onkalo samu.p.onk...@nokia.com --- drivers/hwmon/lis3lv02d.c |5

[PATCH 05/12] hwmon: lis3: Power on corrections

2010-10-22 Thread Samu Onkalo
Sometimes lis3 chip seems to fail to setup factory tuning at boot up. This probably happens if there is some odd power ramp down ramp up sequence for example in device restart. Set boot bit in control2 register to trig boot sequence manually and wait until it is finished. Signed-off-by: Samu

[PATCH 12/12] hwmon: lis3: Release resources is case of failure

2010-10-22 Thread Samu Onkalo
If lis3lv02d_init_device fails, HW resources were not released properly. In case of failure call release_resources if available. Signed-off-by: Samu Onkalo samu.p.onk...@nokia.com --- drivers/hwmon/lis3lv02d_i2c.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git

[PATCH 11/12] hwmon: lis3: Short explanations of platform data fields

2010-10-22 Thread Samu Onkalo
Short documentation at kernel doc format. Signed-off-by: Samu Onkalo samu.p.onk...@nokia.com --- include/linux/lis3lv02d.h | 41 + 1 files changed, 41 insertions(+), 0 deletions(-) diff --git a/include/linux/lis3lv02d.h b/include/linux/lis3lv02d.h index

[PATCH 08/12] hwmon: lis3: Adjust fuzziness for 8 bit device

2010-10-22 Thread Samu Onkalo
Default fuziness is set smaller for 8 device. In 12 bit device LSB is quite close to 1 mg (mg = 1 / 1000 of earth gravity). In 8bit device LSB is about 18 mg. Set fuziness to 1 for 8 bit device. Signed-off-by: Samu Onkalo samu.p.onk...@nokia.com --- drivers/hwmon/lis3lv02d.c | 18

[PATCH 09/12] hwmon: lis3: use block read to access data registers

2010-10-22 Thread Samu Onkalo
Add optional blockread function to interface driver. If available the chip driver uses it for data register access. For 12 bit device it reads 6 bytes to get 3*16bit data. For 8 bit device it reads out 5 bytes since every second byte is dummy. This optimizes bus usage and reduces number of

[PATCH 10/12] hwmon: lis3: Enhance lis3 selftest with IRQ line test

2010-10-22 Thread Samu Onkalo
Configure chip to data ready mode in selftest and count received interrupts to see that interrupt line(s) are working. Signed-off-by: Samu Onkalo samu.p.onk...@nokia.com --- drivers/hwmon/lis3lv02d.c | 87 drivers/hwmon/lis3lv02d.h |3 +- 2

[PATCH 01/12] hwmon: lis3: pm_runtime support

2010-10-22 Thread Samu Onkalo
Add pm_runtime support to lis3 core driver. Add pm_runtime support to lis3 i2c driver. spi and hp_accel drivers are not yet supported. Old always on functionality remains for those. For sysfs there is 5 second delay before turning off the chip to avoid long ramp up delay. Signed-off-by: Samu

[PATCH 00/12] lis3 accelerator feature update

2010-10-22 Thread Samu Onkalo
Changes are tested only with I2C interface using 8bit sensor since I don't have other possibilities. Some features are not enabled by default since I can't test them with all possible configurations. Platform data contains field which controls new features. Description about the changes: 0001:

[PATCH] I2C driver supporting Moorestown and Medfield platform

2010-10-22 Thread Alan Cox
I think this now addresses all the points raised in previous review, as well as adding runtime power management support which is needed for MID platforms. From: Wen Wang wen.w.w...@intel.com Initial release of the driver. Updated and verified on hardware. Cleaned up as follows Alan Cox:

Re: [PATCH 02/12] hwmon: lis3: regulator control

2010-10-22 Thread Jonathan Cameron
On 10/22/10 12:57, Samu Onkalo wrote: Based on pm_runtime control, turn lis3 regulators on and off. Perform context save and restore on transitions. Feature is optional and must be enabled in platform data. Answers all my queries on the previous version Signed-off-by: Samu Onkalo

Re: [PATCH 01/12] hwmon: lis3: pm_runtime support

2010-10-22 Thread Jonathan Cameron
On 10/22/10 12:57, Samu Onkalo wrote: Add pm_runtime support to lis3 core driver. Add pm_runtime support to lis3 i2c driver. spi and hp_accel drivers are not yet supported. Old always on functionality remains for those. For sysfs there is 5 second delay before turning off the chip to

Re: [PATCH 07/12] hwmon: lis3: New parameters to platform data

2010-10-22 Thread Jonathan Cameron
On 10/22/10 12:57, Samu Onkalo wrote: Added default output data rate setting to platform data. If default rate is 0, reset default value is used. Added control for duration via platform data. Added possibility to configure interrupts to trig on both rising and falling edge. The lis3 WU unit

Re: [PATCH 09/12] hwmon: lis3: use block read to access data registers

2010-10-22 Thread Jonathan Cameron
On 10/22/10 12:57, Samu Onkalo wrote: Add optional blockread function to interface driver. If available the chip driver uses it for data register access. For 12 bit device it reads 6 bytes to get 3*16bit data. For 8 bit device it reads out 5 bytes since every second byte is dummy. This

Re: [PATCH 11/12] hwmon: lis3: Short explanations of platform data fields

2010-10-22 Thread Jonathan Cameron
On 10/22/10 12:57, Samu Onkalo wrote: Short documentation at kernel doc format. Please check the use of tabs etc in the alignment of the documentation. It might work out right, but looks a bit random currently. Couple of typos. Otherwise looks fine to me, but I'll only give a reviewed by on

Re: [PATCH 00/12] lis3 accelerator feature update

2010-10-22 Thread Guenter Roeck
On Fri, 2010-10-22 at 07:57 -0400, Samu Onkalo wrote: Changes are tested only with I2C interface using 8bit sensor since I don't have other possibilities. Some features are not enabled by default since I can't test them with all possible configurations. Platform data contains field which

[PATCH] sh: i2c-sh7760: Replase from ctrl_* to __raw_*

2010-10-22 Thread Nobuhiro Iwamatsu
ctrl_* is deprecated. We should to use __raw_*. Signed-off-by: Nobuhiro Iwamatsu iwama...@nigauri.org --- drivers/i2c/busses/i2c-sh7760.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-sh7760.c b/drivers/i2c/busses/i2c-sh7760.c index

Re: [PATCH 00/12] lis3 accelerator feature update

2010-10-22 Thread Éric Piel
Op 22-10-10 22:08, Guenter Roeck schreef: On Fri, 2010-10-22 at 07:57 -0400, Samu Onkalo wrote: Changes are tested only with I2C interface using 8bit sensor since I don't have other possibilities. Some features are not enabled by default since I can't test them with all possible

Re: [PATCH 00/12] lis3 accelerator feature update

2010-10-22 Thread Guenter Roeck
On Fri, Oct 22, 2010 at 07:44:48PM -0400, Éric Piel wrote: Op 22-10-10 22:08, Guenter Roeck schreef: On Fri, 2010-10-22 at 07:57 -0400, Samu Onkalo wrote: Changes are tested only with I2C interface using 8bit sensor since I don't have other possibilities. Some features are not enabled by