Re: [PATCH] DocBook: Add initial documentation for IIO

2015-07-17 Thread Daniel Baluta
On Thu, Jul 16, 2015 at 10:31 PM, Jonathan Cameron wrote: Thanks for your review Jonathan! I will try to address your comments in v2. >>+ The main purpose of the Industrial I/O subsystem (IIO) is to >>provide >>+ support for devices that in some sense are analog to digital >>converts

Re: [PATCH 1/2] iio: magnetometer: mmc35240: Add DT binding

2015-07-17 Thread Daniel Baluta
On Fri, Jul 17, 2015 at 11:34 AM, Jandy Gou wrote: > Signed-off-by: Jandy Gou Acked-by: Daniel Baluta -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.

[PATCH 2/2] iio: magn: bmc150: Introduce SPI support

2016-04-15 Thread Daniel Baluta
Signed-off-by: Daniel Baluta --- drivers/iio/magnetometer/Kconfig | 16 +++ drivers/iio/magnetometer/Makefile | 1 + drivers/iio/magnetometer/bmc150_magn_spi.c | 68 ++ 3 files changed, 85 insertions(+) create mode 100644 drivers/iio

[PATCH 1/2] iio: magn: Split bmc150 driver in common/i2c parts

2016-04-15 Thread Daniel Baluta
This is useful for easily adding SPI support in later patches. Now bmc150_magn exports core functions to be used by I2C/SPI drivers instances. For the moment only I2C driver is supported. Signed-off-by: Daniel Baluta --- drivers/iio/magnetometer/Kconfig | 17 ++-- drivers/iio

[PATCH 0/2] Introduce SPI support for BMC150 chip

2016-04-15 Thread Daniel Baluta
and uses core Daniel Baluta (2): iio: magn: Split bmc150 driver in common/i2c parts iio: magn: bmc150: Introduce SPI support drivers/iio/magnetometer/Kconfig | 31 -- drivers/iio/magnetometer/Makefile | 3 + drivers/iio/magnetometer/bmc150_magn.c | 155

Re: [PATCH v3] iio: imu: Add initial support for Bosch BMI160

2016-04-15 Thread Daniel Baluta
On Sun, Apr 10, 2016 at 5:35 PM, Jonathan Cameron wrote: > On 06/04/16 15:58, Daniel Baluta wrote: >> BMI160 is an Inertial Measurement Unit (IMU) which provides acceleration >> and angular rate measurement. It also offers a secondary I2C interface >> for connecting a magneto

[PATCH v4] iio: imu: Add initial support for Bosch BMI160

2016-04-15 Thread Daniel Baluta
interface using an external trigger (e.g. hrtimer). Data is retrieved from IMU via I2C or SPI interface. Datasheet is at: http://www.mouser.com/ds/2/783/BST-BMI160-DS000-07-786474.pdf Signed-off-by: Daniel Baluta --- Changes since v3: * make sample an __le16 instead of int. Changes

[PATCH 3/3] imu: bmi160: Add avail frequency and scale attributes

2016-04-29 Thread Daniel Baluta
Signed-off-by: Daniel Baluta --- drivers/iio/imu/bmi160/bmi160_core.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/drivers/iio/imu/bmi160/bmi160_core.c b/drivers/iio/imu/bmi160/bmi160_core.c index b8a290e..97928d5 100644 --- a/drivers/iio/imu/bmi160

[PATCH 2/3] iio: bmi160: Fix ODR setting

2016-04-29 Thread Daniel Baluta
mask and val parameters of regmap_update_bits were reveresed. Fixes: 77c4ad2d6a9 ("iio: imu: Add initial support for Bosch BMI160") Signed-off-by: Daniel Baluta --- drivers/iio/imu/bmi160/bmi160_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drive

[PATCH 0/3] Add available sampling frequency and scale attributes

2016-04-29 Thread Daniel Baluta
First two patches are bugfixes related to sampling frequency and the last one is adding support for exporting available sampling frequency and scale. Daniel Baluta (3): iio: bmi160: Fix output data rate for accel iio: bmi160: Fix ODR setting imu: bmi160: Add avail frequency and scale

[PATCH 1/3] iio: bmi160: Fix output data rate for accel

2016-04-29 Thread Daniel Baluta
Format is INT_PLUS_MICRO and micro odr part of ODR should be parts of a micro. Also s/8000/800 this is obviously a typo. Fixes: 77c4ad2d6a9 ("iio: imu: Add initial support for Bosch BMI160") Signed-off-by: Daniel Baluta --- drivers/iio/imu/bmi160/bmi160_core.c | 12 ++-- 1 fi

Re: [PATCH v3] iio: accel: Add support for Freescale MMA7660FC

2016-05-03 Thread Daniel Baluta
On Sun, May 1, 2016 at 9:56 PM, Jonathan Cameron wrote: > On 29/04/16 13:19, Constantin Musca wrote: >> Minimal implementation of an IIO driver for the Freescale >> MMA7660FC 3-axis accelerometer. Datasheet: >> http://www.freescale.com.cn/files/sensors/doc/data_sheet/MMA7660FC.pdf >> >> Includes:

Re: [PATCH v3] iio: accel: Add support for Freescale MMA7660FC

2016-05-03 Thread Daniel Baluta
On Tue, May 3, 2016 at 1:43 PM, Jonathan Cameron wrote: > > > On 3 May 2016 09:29:26 CEST, Daniel Baluta wrote: >>On Sun, May 1, 2016 at 9:56 PM, Jonathan Cameron >>wrote: >>> On 29/04/16 13:19, Constantin Musca wrote: >>>> Minimal impleme

[PATCH] iio: magnetometer: bmc150: Document Bosch supported chips

2016-05-24 Thread Daniel Baluta
bmc150 driver supports also BMC156 and BMM150 chips. Signed-off-by: Daniel Baluta --- drivers/iio/magnetometer/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iio/magnetometer/Kconfig b/drivers/iio/magnetometer/Kconfig index 84e6559..1f842ab 100644 --- a/drivers/iio

[RFC PATCH] tools:iio: Rename generic_buffer

2016-05-24 Thread Daniel Baluta
The new name is in agreement with convention for tools/iio programs. Signed-off-by: Daniel Baluta --- tools/iio/Makefile | 6 +- tools/iio/generic_buffer.c | 581 - tools/iio/iio_generic_buffer.c | 581

[RFC PATCH v2] tools: iio: Rename generic_buffer to iio_generic_buffer

2016-05-24 Thread Daniel Baluta
This makes it clear that generic_buffer is an IIO tool and also complies with filename conventions in tools/iio. Signed-off-by: Daniel Baluta --- Changes since v1: * use -M to detect renames and make the patch easier to review tools/iio/Makefile | 6

Re: [RFT PATCH] iio: magn: Add support for BMM150 magnetometer

2016-05-18 Thread Daniel Baluta
On Wed, May 4, 2016 at 1:26 PM, Jonathan Cameron wrote: > On 27/04/16 15:55, Lucas De Marchi wrote: >> On Tue, Apr 26, 2016 at 9:39 AM, Daniel Baluta >> wrote: >>> BMM150 is register compatible with magnetometer part of >>> BMC156. >>> >>> Data

Re: [PATCH 1/7] iio: adc: ad7266: claim direct mode during sensor read

2016-05-25 Thread Daniel Baluta
On Tue, May 24, 2016 at 10:16 PM, Alison Schofield wrote: > Driver was checking for direct mode but not locking it down. > Use iio_device_claim_direct_mode() to guarantee device stays > in direct mode. > > Signed-off-by: Alison Schofield > Cc: Daniel Baluta Acked

Re: [PATCH 2/7] iio: adc: ad7791: claim direct mode when writing frequency

2016-05-25 Thread Daniel Baluta
ned-off-by: Alison Schofield > Cc: Daniel Baluta Looks good to me. We could use an Acked-by from Lars here. Acked-by: Daniel Baluta > --- > drivers/iio/adc/ad7791.c | 15 --- > 1 file changed, 4 insertions(+), 11 deletions(-) > > diff --git a/drivers/iio/adc

Re: [PATCH 3/7] iio: adc: ad7793: claim direct mode when writing frequency

2016-05-25 Thread Daniel Baluta
ned-off-by: Alison Schofield > Cc: Daniel Baluta Acked-by: Daniel Baluta > --- > drivers/iio/adc/ad7793.c | 13 - > 1 file changed, 4 insertions(+), 9 deletions(-) > > diff --git a/drivers/iio/adc/ad7793.c b/drivers/iio/adc/ad7793.c > index 7b07bb6..3f41cd8

Re: [PATCH 4/7] iio: adc: ad7476: use iio helper function to guarantee direct mode

2016-05-25 Thread Daniel Baluta
On Tue, May 24, 2016 at 10:18 PM, Alison Schofield wrote: > Replace the code that guarantees the device stays in direct mode > with iio_device_claim_direct_mode() which does same. > > Signed-off-by: Alison Schofield > Cc: Daniel Baluta Acked-by: Daniel Baluta > --- > d

Re: [PATCH 5/7] iio: adc: ad7887: use iio helper function to guarantee direct mode

2016-05-25 Thread Daniel Baluta
On Tue, May 24, 2016 at 10:18 PM, Alison Schofield wrote: > Replace the code that guarantees the device stays in direct mode > with iio_device_claim_direct_mode() which does same. > > Signed-off-by: Alison Schofield > Cc: Daniel Baluta Acked-by: Daniel Baluta > --- > d

Re: [PATCH 6/7] iio: adc: ad7923: use iio helper function to guarantee direct mode

2016-05-25 Thread Daniel Baluta
On Tue, May 24, 2016 at 10:19 PM, Alison Schofield wrote: > Replace the code that guarantees the device stays in direct mode > with iio_device_claim_direct_mode() which does same. > > Signed-off-by: Alison Schofield > Cc: Daniel Baluta Acked-by: Daniel Baluta > --- > d

Re: [PATCH 7/7] iio: adc: ad799x: use iio helper function to guarantee direct mode

2016-05-25 Thread Daniel Baluta
On Tue, May 24, 2016 at 10:20 PM, Alison Schofield wrote: > Replace the code that guarantees the device stays in direct mode > with iio_device_claim_direct_mode() which does same. > > Signed-off-by: Alison Schofield > Cc: Daniel Baluta Acked-by: Daniel Baluta > ---

Re: [RFC 1/4] iio: ina2xx: add direct IO support for TI INA2xx Power Monitors

2015-11-11 Thread Daniel Baluta
> Signed-off-by: Marc Titinger > --- > drivers/iio/adc/Kconfig | 9 + > drivers/iio/adc/Makefile | 1 + > drivers/iio/adc/ina2xx-iio.c | 404 > +++ One more thing. In IIO we do not prefer generic names for files. Lets name this after the fir

Re: Issues with Lenovo Yoga 900 IIO devices (accelerometer, etc.)

2015-12-16 Thread Daniel Baluta
On Tue, Dec 15, 2015 at 9:19 PM, Nish Aravamudan wrote: > So, I apologize in advance for this relatively vague report, but I'm fairly > sure > the Yoga 900 has an accelerometer amongst other sensors (ambient light?) > exported over IIO. > > But, these sensors seem to not be updating at all with a

Re: [RFC 5/9] iio: Documentation: Add IIO configfs documentation

2015-11-18 Thread Daniel Baluta
On Wed, Nov 18, 2015 at 6:06 PM, Marc Titinger wrote: > On 18/11/2015 16:38, Crt Mori wrote: >> >> This has my acked-by, yet it is missing a commit message? Can we get that >> and the removed From: as I think this is a new patch and not resend of >> Daniel's? >> Also it would need your signed-off-

Re: [PATCH v2] Staging: iio: Move evgen interrupt generation to irq_work

2015-09-14 Thread Daniel Baluta
le keeping the normal interrupt flow. >> >> Signed-off-by: Cristina Opriceana Acked-by: Daniel Baluta > > Looks good to me. Will let this sit on the list for a little while > though to give others plenty of time to comment. > > Thanks for doing this, ended up simpler than I t

[PATCH] tools/lguest: Don't bork the terminal in case of wrong args

2015-12-08 Thread Daniel Baluta
Running lguest without arguments or with a wrong argument name borks the terminal, because the cleanup handler is set up too late in the initialization process. Signed-off-by: Daniel Baluta --- tools/lguest/lguest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools

[PATCH v2] DocBook documentation for IIO

2015-07-21 Thread Daniel Baluta
.info/?l=linux-iio&m=143707511006898&w=2 * for DocBook warnings reported by Randy, Cristina (Cc'ed) will send a patch series fixes. Daniel Baluta (1): DocBook: Add initial documentation for IIO Documentation/DocBook/Makefile | 2 +- Documentation/D

[PATCH v2] DocBook: Add initial documentation for IIO

2015-07-21 Thread Daniel Baluta
This is intended to help developers faster find their way inside the Industrial I/O core and reduce time spent on IIO drivers development. Signed-off-by: Daniel Baluta --- Documentation/DocBook/Makefile | 2 +- Documentation/DocBook/iio.tmpl | 680 + 2

Re: [PATCH] iio: pressure: ms5611: select IIO_BUFFER

2016-02-16 Thread Daniel Baluta
plicit-function-declaration] > > This adds the second select. > > Signed-off-by: Arnd Bergmann > Fixes: 713bbb4efb9d ("iio: pressure: ms5611: Add triggered buffer support") Acked-by: Daniel Baluta > --- > drivers/iio/pressure/Kconfig | 1 + > 1 file changed, 1 insertion(

[RFC PATCH 7/9] iio: imu: inv_mpu6050: Fix alignment with open parenthesis

2016-02-18 Thread Daniel Baluta
This makes code consistent around inv_mpu6050 driver and fixes the following checkpatch.pl warning: CHECK: Alignment should match open parenthesis Note that there were few cases were it was not possible to fix this due to making the line too long, but we can live with that. Signed-off-by: Daniel

[RFC PATCH 0/9] iio: Fix ABBA deadlock in inv-mpu6050

2016-02-18 Thread Daniel Baluta
k and mpu lock Daniel Baluta (7): iio: imu: inv_mpu6050: Fix multiline comments style iio: imu: inv_mpu6050: Fix Yoda conditions iio: imu: inv_mpu6050: Fix newlines to make code easier to read iio: imu: inv_mpu6050: Remove unnecessary parentheses iio: imu: inv_mpu6050: Delete space b

[RFC PATCH 1/9] iio: imu: inv_mpu6050: Fix multiline comments style

2016-02-18 Thread Daniel Baluta
The preffered style for long (multi-line) comments is: /* * this is a multiline * comment */ This also fixes checkpatch.pl warning: WARNING: Block comments use * on subsequent lines Signed-off-by: Daniel Baluta --- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 37

[RFC PATCH 5/9] iio: imu: inv_mpu6050: Delete space before comma

2016-02-18 Thread Daniel Baluta
This fixes the following checkpatch.pl warning: ERROR: space prohibited before that ',' (ctx:WxE) .shift = 0 , Signed-off-by: Daniel Baluta --- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drive

[RFC PATCH 4/9] iio: imu: inv_mpu6050: Remove unnecessary parentheses

2016-02-18 Thread Daniel Baluta
Fixes the following checkpatch warning: CHECK: Unnecessary parentheses around cpm->package.elements[i] Signed-off-by: Daniel Baluta --- drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_acp

[RFC PATCH 9/9] iio: imu: inv_mpu6050: Fix deadlock between i2c adapter lock and mpu lock

2016-02-18 Thread Daniel Baluta
c transaction so if only the compass is used this would be more power efficient. Signed-off-by: Adriana Reus Signed-off-by: Daniel Baluta --- drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 88 ++- 1 file changed, 15 insertions(+), 73 deletions(-) diff --git a/dri

[RFC PATCH 8/9] i2c: i2c-mux: Allow for NULL select callback

2016-02-18 Thread Daniel Baluta
From: Adriana Reus Add a check in i2c_mux_master_xfer before calling the select callback. This is necessary so that NULL callbacks can be safely registered. Signed-off-by: Adriana Reus Signed-off-by: Daniel Baluta --- drivers/i2c/i2c-mux.c | 10 ++ 1 file changed, 6 insertions(+), 4

[RFC PATCH 6/9] iio: imu: inv_mpu6050: Fix code indent for if statement

2016-02-18 Thread Daniel Baluta
This fixes the following checkpatch.pl warning: WARNING: suspect code indent for conditional statements (8, 24) + if (kfifo_len(&st->timestamps) > [...] + goto flush_fifo; Signed-off-by: Daniel Baluta --- drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c | 4 ++

[RFC PATCH 3/9] iio: imu: inv_mpu6050: Fix newlines to make code easier to read

2016-02-18 Thread Daniel Baluta
This fixes the following checkpatch.pl warnings: * WARNING: Missing a blank line after declarations * CHECK: Blank lines aren't necessary before a close brace '}' Signed-off-by: Daniel Baluta --- drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c | 2 +- drivers/iio/

[RFC PATCH 2/9] iio: imu: inv_mpu6050: Fix Yoda conditions

2016-02-18 Thread Daniel Baluta
This fixes the following checkpatch warning: * WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: Daniel Baluta --- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 6 +++--- drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c | 2 +- 2 files

Re: [PATCH v4] iio: adc: Add TI ADS1015 ADC driver support

2016-02-08 Thread Daniel Baluta
On Mon, Feb 8, 2016 at 12:25 PM, Wolfram Sang wrote: > On Fri, Feb 05, 2016 at 06:32:45PM -0600, Michael Welling wrote: >> On Fri, Feb 05, 2016 at 09:32:34PM +0200, Daniel Baluta wrote: >> > >> +static int ads1015_read_raw(struct iio_dev *indio_dev, >> > &g

[PATCH] iio: Fix documentation for iio_dev mlock

2016-02-08 Thread Daniel Baluta
mlock *must* be used by core and drivers to protect access to devices state changes. Signed-off-by: Daniel Baluta --- At a first glance there are few places where access to iio_dev state changes are done without mlock protection. Will fix them with follow up patches. include/linux/iio/iio.h

Re: [PATCH v4] iio: adc: Add TI ADS1015 ADC driver support

2016-02-08 Thread Daniel Baluta
On Mon, Feb 8, 2016 at 4:44 PM, Daniel Baluta wrote: > On Mon, Feb 8, 2016 at 12:25 PM, Wolfram Sang wrote: >> On Fri, Feb 05, 2016 at 06:32:45PM -0600, Michael Welling wrote: >>> On Fri, Feb 05, 2016 at 09:32:34PM +0200, Daniel Baluta wrote: >>> > >> +static

Re: [PATCH v4] iio: adc: Add TI ADS1015 ADC driver support

2016-02-10 Thread Daniel Baluta
>> > > > > > >> +static int ads1015_read_raw(struct iio_dev *indio_dev, >> > > > > > >> + struct iio_chan_spec const *chan, >> > > > > > >> +int >> > *val, >> > > > > > >> + int *val2, long mask) { >> > > > > > >> + int ret, idx; >> > > > > > >>

Re: [RFC PATCH 0/9] iio: Fix ABBA deadlock in inv-mpu6050

2016-02-26 Thread Daniel Baluta
On Mon, Feb 22, 2016 at 1:17 AM, Wolfram Sang wrote: > On Thu, Feb 18, 2016 at 05:53:05PM +0200, Daniel Baluta wrote: >> Sending this as an RFC because I don't know if style fixes are appropriate >> for this driver and also not sure if deadlock fix is the best solution. >

Re: [PATCH] iio: health/afe4403: mark suspend/resume functions __maybe_unused

2016-02-15 Thread Daniel Baluta
On Mon, Feb 15, 2016 at 11:02 AM, Arnd Bergmann wrote: > The newly added afe4403 driver implements suspend/resume using the > SIMPLE_DEV_PM_OPS() macro, which leaves out references to the actual > functions when CONFIG_PM is disabled, causing a harmless warning: > > health/afe4403.c:509:12: error:

[PATCH v2] iio: imu: Add support for Kionix KMX61 sensor

2014-11-10 Thread Daniel Baluta
Minimal implementation for KMX61 6-axis accelerometer/magnetometer. It exports raw accel/magn readings together with scale and sampling frequency. Datasheet will be available at: http://www.kionix.com/6-axis-accelerometer-magnetometer/kmx61 Signed-off-by: Daniel Baluta --- Changes since v1

[PATCH] MAINTAINERS: Add IIO include files

2014-11-11 Thread Daniel Baluta
Files under include/linux/iio were not reported as part of the IIO subsystem. Reported-by: Cristina Ciocan Signed-off-by: Daniel Baluta --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index b2f927b..ebb9c38 100644 --- a/MAINTAINERS +++ b

Re: [PATCH v4 6/7] iio: dummy: Demonstrate the usage of new channel types

2014-11-24 Thread Daniel Baluta
On Sat, Nov 22, 2014 at 1:18 PM, Jonathan Cameron wrote: > On 22/11/14 11:05, Jonathan Cameron wrote: >> On 10/11/14 12:45, Daniel Baluta wrote: >>> Adds support for the new channel types in the dummy driver: >>> * a new channel IIO_ACTIVITY >>> * two

Re: [PATCH v3] iio: imu: Add support for Kionix KMX61 sensor

2014-11-25 Thread Daniel Baluta
On Tue, Nov 25, 2014 at 2:45 AM, Hartmut Knaack wrote: > Daniel Baluta schrieb am 18.11.2014 17:47: >> Minimal implementation for KMX61 6-axis accelerometer/magnetometer. It >> exports >> raw accel/magn readings together with scale and sampling frequency. >> >&g

Re: [PATCH v3] iio: imu: Add support for Kionix KMX61 sensor

2014-11-25 Thread Daniel Baluta
On Wed, Nov 26, 2014 at 12:31 AM, Hartmut Knaack wrote: > Daniel Baluta schrieb am 25.11.2014 10:54: >> On Tue, Nov 25, 2014 at 2:45 AM, Hartmut Knaack wrote: >>> Daniel Baluta schrieb am 18.11.2014 17:47: >>>> Minimal implementation for KMX61 6-axis accelerometer/

Re: [PATCH v3] iio: imu: Add support for Kionix KMX61 sensor

2014-11-25 Thread Daniel Baluta
On Wed, Nov 26, 2014 at 12:44 AM, Daniel Baluta wrote: > On Wed, Nov 26, 2014 at 12:31 AM, Hartmut Knaack wrote: >> Daniel Baluta schrieb am 25.11.2014 10:54: >>> On Tue, Nov 25, 2014 at 2:45 AM, Hartmut Knaack wrote: >>>> Daniel Baluta schrieb am 18.11.2014 17:47

[PATCH v4 0/6] Add support for KMX61 sensor

2014-12-03 Thread Daniel Baluta
comments from Hartmut reported on v3: * http://marc.info/?l=linux-kernel&m=141687633527812&w=2 * added support for PM events, data ready/any motion triggers Daniel Baluta (6): iio: imu: Add support for Kionix KMX61 sensor iio: imu: kmx61: Add acpi support iio: imu:

[PATCH v4 5/6] iio: imu: kmx61: Add support for data ready triggers

2014-12-03 Thread Daniel Baluta
This creates a data ready trigger per IIO device. Signed-off-by: Daniel Baluta --- drivers/iio/imu/Kconfig | 2 + drivers/iio/imu/kmx61.c | 295 +++- 2 files changed, 296 insertions(+), 1 deletion(-) diff --git a/drivers/iio/imu/Kconfig b/drivers

[PATCH v4 3/6] iio: imu: kmx61: Add PM runtime support

2014-12-03 Thread Daniel Baluta
By default both sensors are ACTIVE, in this way the driver will work even if CONFIG_PM_RUNTIME is not selected. Signed-off-by: Daniel Baluta --- drivers/iio/imu/kmx61.c | 114 +++- 1 file changed, 112 insertions(+), 2 deletions(-) diff --git a

[PATCH v4 2/6] iio: imu: kmx61: Add acpi support

2014-12-03 Thread Daniel Baluta
Signed-off-by: Daniel Baluta --- drivers/iio/imu/kmx61.c | 59 + 1 file changed, 59 insertions(+) diff --git a/drivers/iio/imu/kmx61.c b/drivers/iio/imu/kmx61.c index 5b44371..893f7c8 100644 --- a/drivers/iio/imu/kmx61.c +++ b/drivers/iio/imu

[PATCH v4 4/6] iio: imu: kmx61: Add PM sleep support

2014-12-03 Thread Daniel Baluta
Per sensor state (ACTIVE/STANDBY) is saved in driver's private data (acc_stby/mag_stby) and restored when resume is called. Signed-off-by: Daniel Baluta --- drivers/iio/imu/kmx61.c | 29 + 1 file changed, 29 insertions(+) diff --git a/drivers/iio/imu/kmx6

[PATCH v4 6/6] iio: imu: kmx61: Add support for any motion trigger

2014-12-03 Thread Daniel Baluta
We use WUFE (Wake Up from Sleep Engine) and BTSE (Back to Sleep Engine) to detect general motion input. Signed-off-by: Daniel Baluta --- drivers/iio/imu/kmx61.c | 433 +++- 1 file changed, 426 insertions(+), 7 deletions(-) diff --git a/drivers/iio

[PATCH v4 1/6] iio: imu: Add support for Kionix KMX61 sensor

2014-12-03 Thread Daniel Baluta
-accelerometer-magnetometer/kmx61 Signed-off-by: Daniel Baluta --- drivers/iio/imu/Kconfig | 9 + drivers/iio/imu/Makefile | 2 + drivers/iio/imu/kmx61.c | 691 +++ 3 files changed, 702 insertions(+) create mode 100644 drivers/iio/imu/kmx61.c diff --git

Re: [PATCH v2] iio: imu: Add support for Kionix KMX61 sensor

2014-11-17 Thread Daniel Baluta
On Sun, Nov 16, 2014 at 11:10 PM, Jonathan Cameron wrote: > On 10/11/14 17:24, Daniel Baluta wrote: >> Minimal implementation for KMX61 6-axis accelerometer/magnetometer. It >> exports >> raw accel/magn readings together with scale and sampling frequency. >> >&g

[PATCH 2/2] kmx61: Use KMX61_DRV_NAME instead of hardcoded value

2014-11-17 Thread Daniel Baluta
Signed-off-by: Daniel Baluta --- drivers/iio/imu/kmx61.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/imu/kmx61.c b/drivers/iio/imu/kmx61.c index e49b1cc..8c4b365 100644 --- a/drivers/iio/imu/kmx61.c +++ b/drivers/iio/imu/kmx61.c @@ -578,7 +578,7

[PATCH 1/2] kmx61: Use uscale instead of scale

2014-11-17 Thread Daniel Baluta
This makes it easier to notice that we only use the micro part for scale. Signed-off-by: Daniel Baluta --- drivers/iio/imu/kmx61.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iio/imu/kmx61.c b/drivers/iio/imu/kmx61.c index 2bd77dd..e49b1cc 100644 --- a

[PATCH 0/2] kmx61: Small cleanups

2014-11-17 Thread Daniel Baluta
sting: 61ef04a496 (iio: imu: Add support for Kionix KMX61 sensor) Daniel Baluta (2): kmx61: Use uscale instead of scale kmx61: Use KMX61_DRV_NAME instead of hardcoded value drivers/iio/imu/kmx61.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- 1.9.1 -- To unsubscribe from

Re: [PATCH 0/2] kmx61: Small cleanups

2014-11-17 Thread Daniel Baluta
On Mon, Nov 17, 2014 at 4:59 PM, Jonathan Cameron wrote: > > > On November 17, 2014 1:18:34 PM GMT+00:00, Daniel Baluta > wrote: >>This is a small cleanup patchset, that: >> * makes it clear that kmx61 uses only the micro part of scale >> * use macro

Re: [PATCH v2] iio: imu: Add support for Kionix KMX61 sensor

2014-11-17 Thread Daniel Baluta
p://www.kionix.com/6-axis-accelerometer-magnetometer/kmx61 > > some trivial comments below > >> Signed-off-by: Daniel Baluta >> --- >> Changes since v1: >> * serialize non-atomic operations with a mutex (set_odr/get_odr, >> set_scale). >>

[PATCH v3] iio: imu: Add support for Kionix KMX61 sensor

2014-11-18 Thread Daniel Baluta
Minimal implementation for KMX61 6-axis accelerometer/magnetometer. It exports raw accel/magn readings together with scale and sampling frequency. Datasheet will be available at: http://www.kionix.com/6-axis-accelerometer-magnetometer/kmx61 Signed-off-by: Daniel Baluta --- Changes since v2

Re: [RFC PATCH 1/8] iio: dummy: Introduce virtual registers for dummy device

2014-10-19 Thread Daniel Baluta
On Sun, Oct 19, 2014 at 11:30 PM, Hartmut Knaack wrote: > Daniel Baluta schrieb am 02.10.2014 15:43: >> We need a way to store events generated by iio_dummy_evgen module, >> in order to correctly process IRQs in iio_simple_dummy_events. >> >> For the moment, we add tw

[RFC PATCH v2 0/7] Introduce IIO interface for Android advanced features

2014-10-09 Thread Daniel Baluta
ed IIO_EV_DIR_NONE * changed cover letter subject to reflect the changes Daniel Baluta (4): iio: dummy: Add virtual registers for dummy device iio: core: Introduce IIO_ACTIVITY channel and TRANSITION event iio: dummy: Demonstrate the usage of new channel types iio: event_monitor: Add support for

[RFC PATCH v2 6/7] iio: dummy: Demonstrate the usage of new channel types

2014-10-09 Thread Daniel Baluta
for reading and writing height Signed-off-by: Irina Tirdea Signed-off-by: Daniel Baluta --- drivers/staging/iio/iio_simple_dummy.c| 199 +++--- drivers/staging/iio/iio_simple_dummy.h| 5 + drivers/staging/iio/iio_simple_dummy_events.c | 38 + 3

[RFC PATCH v2 4/7] iio: core: Introduce STEPS channel type, ENABLE mask and INSTANCE event

2014-10-09 Thread Daniel Baluta
/devices/sensors/composite_sensors.html#detector. A device that has the pedometer functionality this interface needs to support is Freescale's MMA9553L: http://www.freescale.com/files/sensors/doc/ref_manual/MMA9553LSWRM.pdf Signed-off-by: Irina Tirdea Signed-off-by: Daniel B

[RFC PATCH v2 3/7] iio: core: Introduce IIO_EV_DIR_NONE

2014-10-09 Thread Daniel Baluta
From: Irina Tirdea For some events (e.g.: step detector) a direction does not make sense. Add IIO_EV_DIR_NONE to be used with such events and generate sysfs event attributes that do not contain direction. Signed-off-by: Irina Tirdea Signed-off-by: Daniel Baluta --- drivers/iio/industrialio

[RFC PATCH v2 7/7] iio: event_monitor: Add support for new channel types

2014-10-09 Thread Daniel Baluta
ed-off-by: Irina Tirdea Signed-off-by: Daniel Baluta --- .../staging/iio/Documentation/iio_event_monitor.c | 25 +++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/drivers/staging/iio/Documentation/iio_event_monitor.c b/drivers/staging/iio/Documentation/iio_event_

[RFC PATCH v2 1/7] iio: dummy: Add virtual registers for dummy device

2014-10-09 Thread Daniel Baluta
> /sys/bus/iio/devices/iio_evgen/poke2 id_reg 0x02, id_data 0x04 This means, event of type 4 was generated by fake device 2. We currently use a hardcoded mapping of virtual events to IIO events. Signed-off-by: Irina Tirdea Signed-off-by: Daniel Baluta --- drivers/staging/iio/iio_dummy_evge

[RFC PATCH v2 2/7] iio: core: Introduce IIO_ACTIVITY channel and TRANSITION event

2014-10-09 Thread Daniel Baluta
http://freescale.com/files/sensors/doc/ref_manual/MMA9553LSWRM.pdf Signed-off-by: Irina Tirdea Signed-off-by: Daniel Baluta --- Documentation/ABI/testing/sysfs-bus-iio | 44 + drivers/iio/industrialio-core.c | 5 drivers/iio/industrialio-event.c

[RFC PATCH v2 5/7] iio: core: Introduce HEIGHT channel type

2014-10-09 Thread Daniel Baluta
er to determine distance, speed and activity type. Introduce a new channel type HEIGHT to export these values. Signed-off-by: Irina Tirdea Signed-off-by: Daniel Baluta --- Documentation/ABI/testing/sysfs-bus-iio | 9 + drivers/iio/industrialio-core.c | 1 + include/linux/iio/ty

[PATCH] io: accel: kxcjk-1013: Fix iio_event_spec direction

2014-10-10 Thread Daniel Baluta
* in_accel_x_thresh_(null)_value or even memory corruption. Fixes: b4b491c083 (iio: accel: kxcjk-1013: Support threshold) Signed-off-by: Daniel Baluta --- drivers/iio/accel/kxcjk-1013.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013

Re: [RFC PATCH 3/8] iio: core: Introduce new MOTION event

2014-10-11 Thread Daniel Baluta
On Thu, Oct 9, 2014 at 10:31 PM, Jonathan Cameron wrote: > On 06/10/14 15:17, Daniel Baluta wrote: >> >> >> On 10/04/2014 04:12 PM, Jonathan Cameron wrote: >>> On 02/10/14 14:43, Daniel Baluta wrote: >>>> This is to be used by drivers to signal detection

Re: [PATCH 1/6] iio: light: Updated Vishay Capella cm32181 ambient light sensor driver. - Renamed company name. - Removed cm32181_reg. - Removed white space. - Removed unused include files. - Updated

2015-05-21 Thread Daniel Baluta
On Fri, May 22, 2015 at 4:56 AM, Greg KH wrote: > On Thu, May 21, 2015 at 05:30:40PM -0700, Kevin Tsai wrote: >> Signed-off-by: Kevin Tsai >> --- > > Your whole changelog ended up in the Subject line :( Hi Kevin, Few comments: 1) Please also add a cover letter. Use --cover-letter parameter of

[PATCH] iio: light: Add support for ROHM RPR0521 sensor

2015-05-22 Thread Daniel Baluta
This patch adds support for ROHM RPR0521 ambient light and proximity sensor. It offers raw readings for intensity and proximity. Signed-off-by: Daniel Baluta --- drivers/iio/light/Kconfig | 11 + drivers/iio/light/Makefile | 1 + drivers/iio/light/rpr0521.c | 579

Re: [PATCH] iio: light: Add support for ROHM RPR0521 sensor

2015-05-25 Thread Daniel Baluta
On Sat, May 23, 2015 at 1:51 PM, Jonathan Cameron wrote: > On 22/05/15 13:36, Daniel Baluta wrote: >> This patch adds support for ROHM RPR0521 ambient light and proximity >> sensor. It offers raw readings for intensity and proximity. >> >> Signed-off-by: Daniel Baluta

Re: [PATCH 1/1 linux-next] configfs: unexport/make static config_item_init()

2015-05-15 Thread Daniel Baluta
On Thu, May 14, 2015 at 10:14 PM, Fabian Frederick wrote: > > >> On 14 May 2015 at 12:41 Daniel Baluta wrote: >> >> >> On Wed, Apr 29, 2015 at 8:01 PM, Fabian Frederick wrote: >> > config_item_init() is only used in item.c >> > >> > Si

Re: [PATCH v5 2/4] iio: core: Introduce IIO configfs support

2015-05-06 Thread Daniel Baluta
On 05/04/2015 10:59 PM, Lars-Peter Clausen wrote: On 05/04/2015 12:50 PM, Daniel Baluta wrote: This creates an IIO configfs subystem named "iio", with a default "triggers" group. Triggers group is used for handling software triggers. To create a new software trigg

Re: [PATCH v5 3/4] iio: trigger: Introduce IIO hrtimer based trigger

2015-05-06 Thread Daniel Baluta
On 05/05/2015 04:51 PM, Jonathan Cameron wrote: On 4 May 2015 20:54:08 GMT+01:00, Lars-Peter Clausen wrote: On 05/04/2015 12:50 PM, Daniel Baluta wrote: [...] +IIO_HRTIMER_INFO_ATTR(sampling_frequency, S_IRUGO | S_IWUSR, + iio_hrtimer_info_show_sampling_frequency

Re: [PATCH v5 3/4] iio: trigger: Introduce IIO hrtimer based trigger

2015-05-06 Thread Daniel Baluta
On Wed, May 6, 2015 at 8:16 PM, Jonathan Cameron wrote: > On 06/05/15 17:25, Daniel Baluta wrote: >> >> >> On 05/05/2015 04:51 PM, Jonathan Cameron wrote: >>> >>> >>> On 4 May 2015 20:54:08 GMT+01:00, Lars-Peter Clausen >>>

Re: [PATCH] iio: hid-sensors: Fix memory leak on failure path in hid_prox_probe()

2015-05-07 Thread Daniel Baluta
On Thu, May 7, 2015 at 1:00 AM, Fabio Estevam wrote: > On Wed, May 6, 2015 at 6:48 PM, Alexey Khoroshilov > wrote: >> If prox_parse_report() fails, memory allocated for channels is not >> deallocated, since it is still in local variable channels >> while kfree() is called with indio_dev->channels

Re: [PATCH v5 3/4] iio: trigger: Introduce IIO hrtimer based trigger

2015-05-07 Thread Daniel Baluta
On Thu, May 7, 2015 at 12:19 PM, Jonathan Cameron wrote: > On 06/05/15 18:37, Daniel Baluta wrote: >> On Wed, May 6, 2015 at 8:16 PM, Jonathan Cameron wrote: >>> On 06/05/15 17:25, Daniel Baluta wrote: >>>> >>>> >>>> On 05/05/2015 04:51 PM, J

Re: [PATCH v2 0/3] Introduce support for MMC35240 magnetic sensor

2015-05-08 Thread Daniel Baluta
On Sun, Apr 26, 2015 at 8:00 PM, Jonathan Cameron wrote: > On 24/04/15 16:58, Daniel Baluta wrote: >> This adds support for Memsic's MMC35240 magnetometer. The sensor does >> not offer an interrupt line for data ready so for the moment we only >> expose raw re

[PATCH v6 2/4] iio: core: Introduce IIO configfs support

2015-05-08 Thread Daniel Baluta
igger core: $ mkdir /config/iio/triggers/hrtimer-instance1 Signed-off-by: Daniel Baluta --- drivers/iio/Kconfig | 8 +++ drivers/iio/Makefile| 1 + drivers/iio/industrialio-configfs.c | 117 include/linux/iio/sw_trigger.h

[PATCH v6 0/4] Add initial configfs support for IIO

2015-05-08 Thread Daniel Baluta
* patch 3/4 - none * patch 4/4 - removed "Further work" chapter in iio_configfs.txt - added configfs-iio file in Documentation/ABI/testing Daniel Baluta (4): iio: core: Introduce IIO software triggers iio: core: Intro

[PATCH v6 1/4] iio: core: Introduce IIO software triggers

2015-05-08 Thread Daniel Baluta
kernel module is loaded. Software triggers can be created directly from drivers or from user space via configfs interface. Signed-off-by: Daniel Baluta --- drivers/iio/Kconfig | 8 +++ drivers/iio/Makefile | 1 + drivers/iio/industrialio-sw-trigger.c | 115

[PATCH v6 3/4] iio: trigger: Introduce IIO hrtimer based trigger

2015-05-08 Thread Daniel Baluta
based on an older version from Marten and Lars-Peter. Signed-off-by: Marten Svanfeldt Signed-off-by: Lars-Peter Clausen Signed-off-by: Daniel Baluta --- drivers/iio/trigger/Kconfig| 10 ++ drivers/iio/trigger/Makefile | 2 + drivers/iio/trigger/iio-trig-hrtimer.c | 194

[PATCH v6 4/4] iio: Documentation: Add IIO configfs documentation

2015-05-08 Thread Daniel Baluta
Signed-off-by: Daniel Baluta --- Documentation/ABI/testing/configfs-iio | 20 Documentation/iio/iio_configfs.txt | 58 ++ 2 files changed, 78 insertions(+) create mode 100644 Documentation/ABI/testing/configfs-iio create mode 100644

Re: [PATCH v1 1/1] iio: ltr501: Add light channel support

2015-05-05 Thread Daniel Baluta
> Signed-off-by: Kuppuswamy Sathyanarayanan > Reviewed-by: Daniel Baluta > --- > drivers/iio/light/ltr501.c | 71 > +- > 1 file changed, 64 insertions(+), 7 deletions(-) > > diff --git a/drivers/iio/light/ltr501.c b/drivers/iio/

Re: [PATCH v5 1/4] iio: core: Introduce IIO software triggers

2015-05-06 Thread Daniel Baluta
On Mon, May 4, 2015 at 11:11 PM, Lars-Peter Clausen wrote: > On 05/04/2015 12:50 PM, Daniel Baluta wrote: >> >> A software trigger associates an IIO device trigger with a software >> interrupt source (e.g: timer, sysfs). This patch adds the generic >> infrastructure for

[RFC PATCH 0/2] Introduce PM runtime helper functions

2015-05-18 Thread Daniel Baluta
created API. If this is ok follow up patches will modify the rest of the drivers. There is a small difference for hid-sensors where the setup sequence additionally calls pm_suspend_ignore_children. This is taken care of by introducing a 3rd parameter to iio_pm_runtime_setup. Daniel Baluta (2

[RFC PATCH 2/2] iio: accel: kxcjk1013: Use the new IIO pm runtime helpers

2015-05-18 Thread Daniel Baluta
Signed-off-by: Daniel Baluta --- drivers/iio/accel/kxcjk-1013.c | 56 +++--- 1 file changed, 14 insertions(+), 42 deletions(-) diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c index a98b5d2..308499a 100644 --- a/drivers/iio/accel

[RFC PATCH 1/2] iio: pm_runtime: Introduce PM runtime helper functions

2015-05-18 Thread Daniel Baluta
* imu/kmx61.c * common/hid-sensors. Signed-off-by: Daniel Baluta --- include/linux/iio/pm_runtime.h | 63 ++ 1 file changed, 63 insertions(+) create mode 100644 include/linux/iio/pm_runtime.h diff --git a/include/linux/iio/pm_runtime.h b/include

Re: [RFC PATCH 1/2] iio: pm_runtime: Introduce PM runtime helper functions

2015-05-18 Thread Daniel Baluta
ctionality needed. On Mon, May 18, 2015 at 8:34 PM, Peter Meerwald wrote: > On Mon, 18 May 2015, Daniel Baluta wrote: > >> We need this in order to avoid reimplementing the same functions each time >> we add PM runtime support in a driver. > > comments below > >

<    1   2   3   4   5   6   7   8   9   10   >