Re: [PATCH v2] iio: gyro: adis16060: Change the name of function.

2017-04-02 Thread Jonathan Cameron
On 31/03/17 11:21, simran singhal wrote: > Change the name of function from adis16060_spi_write_than_read() > to adis16060_spi_write_then_read(). change "than" to "then" as > its time depended. > > Signed-off-by: simran singhal Applied. > --- > > v2: >-Change the subject. >-Add signed-o

Re: [PATCH 1/3] staging: iio: accel: Remove useless type conversion

2017-04-02 Thread Jonathan Cameron
On 31/03/17 16:08, simran singhal wrote: > Some type conversions like casting a pointer to a pointer of same type, > casting to the original type using addressof(&) operator etc. are not > needed. Therefore, remove them. Done using coccinelle: Please write a more specific commit message. No where

Re: [PATCH 3/3] staging: iio: light: Remove useless type conversion

2017-04-02 Thread Jonathan Cameron
On 31/03/17 16:08, simran singhal wrote: > Some type conversions like casting a pointer to a pointer of same type, > casting to the original type using addressof(&) operator etc. are not > needed. Therefore, remove them. Done using coccinelle: > > @@ > type t; > t *p; > t a; > @@ > ( > - (t)(a) >

Re: [PATCH 2/3] staging: iio: frequency: Remove useless type conversion

2017-04-02 Thread Jonathan Cameron
On 31/03/17 16:08, simran singhal wrote: > Some type conversions like casting a pointer to a pointer of same type, > casting to the original type using addressof(&) operator etc. are not > needed. Therefore, remove them. Done using coccinelle: > > @@ > type t; > t *p; > t a; > @@ > ( > - (t)(a) >

Re: [PATCH] staging: iio: meter: Replace mlock with driver private buf_lock

2017-04-02 Thread Jonathan Cameron
On 31/03/17 03:47, Arushi Singhal wrote: > The driver needs to insure atomicity during frequency > changes of bus and device. The iiodev->mlock as used > was not doing that. Replace it with the drivers existing > buffer lock and execute spi_write directly. > > Signed-off-by: Arushi Singhal Firstl

Re: [PATCH] staging: iio: ad9832: use 4-digit octal permissions

2017-04-02 Thread Jonathan Cameron
On 30/03/17 10:55, Guru Das Srinagesh wrote: > This fixes the coding style issue of using S_IWUSR in place of 4-digit > octal numbers. > > Issue detected by checkpatch. > > Signed-off-by: Guru Das Srinagesh Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to

Re: [PATCH] staging:iio:accel:adis16029 fixed checkpatch issue - drop braces around single if statement

2017-04-02 Thread Jonathan Cameron
See patch title. Check the part number... On 29/03/17 09:36, Andrea della Porta wrote: > Fixed the followinf checkpatch warning: > WARNING: braces {} are not necessary for single statement blocks > #258: FILE: drivers/staging/iio/accel/adis16209.c:258: > + if (ret) { > +

RE: [PATCH 4/9] staging: iio: Augment TODO file with GPIO work item

2018-04-19 Thread Jonathan Cameron
> To make sure that these drivers do not leave staging before they > are properly converted to use the new GPIO descriptor API, > augment the TODO file with this work item. > > Cc: Jonathan Cameron > Signed-off-by: Linus Walleij Acked-by: Jonathan Cameron I hope I haven&#

Re: [PATCH 48/61] staging: iio: adc: simplify getting .drvdata

2018-04-21 Thread Jonathan Cameron
On Thu, 19 Apr 2018 16:06:18 +0200 Wolfram Sang wrote: > We should get drvdata from struct device directly. Going via > platform_device is an unneeded step back and forth. > > Signed-off-by: Wolfram Sang Applied, thanks, Jonathan > --- > > Build tested only. buildbot is happy. Please apply i

Re: [PATCH 01/13] staging: iio: tsl2x7x: move integration_time* attributes to IIO_INTENSITY channel

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 20:41:41 -0400 Brian Masney wrote: > The integration_time* attributes are currently associated with the > IIO_LIGHT channel but should be associated with the IIO_INTENSITY > channel. Directory listing of the sysfs attributes for a TSL2772 > with this patch applied: > > dev >

Re: [PATCH 02/13] staging: iio: tsl2x7x: use GPL-2.0+ SPDX license identifier

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 20:41:42 -0400 Brian Masney wrote: > The summary text for the GPL is not needed since the SPDX identifier > is a legally binding shorthand that can be used instead. > > Signed-off-by: Brian Masney I sanity checked against other drivers because I wasn't 100% sure this wasn't

Re: [PATCH 04/13] staging: iio: tsl2x7x: simplify tsl2x7x_clear_interrupts function

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 20:41:44 -0400 Brian Masney wrote: > tsl2x7x_clear_interrupts() takes a reg argument but there are only > two callers to this function and both callers pass the same value. > Since this function was introduced, interrupts are now working > properly for this driver, and several

Re: [PATCH 03/13] staging: iio: tsl2x7x: don't return error in IRQ handler

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 20:41:43 -0400 Brian Masney wrote: > tsl2x7x_event_handler() could return an error and this could cause the > interrupt to remain masked. We shouldn't return an error in the > interrupt handler so this patch always returns IRQ_HANDLED. An error > will be logged if one occurs.

Re: [PATCH 05/13] staging: iio: tsl2x7x: remove unnecessary chip status checks in suspend/resume

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 20:41:45 -0400 Brian Masney wrote: > tsl2x7x_suspend() and tsl2x7x_resume() both check to see what the > current chip status is. These checks are not necessary so this patch > removes those checks. > > Signed-off-by: Brian Masney This description could have been clearer... T

Re: [PATCH 06/13] staging: iio: tsl2x7x: simplify tsl2x7x_write_interrupt_config return

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 20:41:46 -0400 Brian Masney wrote: > tsl2x7x_write_interrupt_config() has an unnecessary return value check > at the end of the function. This patch changes the function to just > return the value from the call to tsl2x7x_invoke_change(). > > Signed-off-by: Brian Masney Nice

Re: [PATCH 07/13] staging: iio: tsl2x7x: simplify device id verification

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 20:41:47 -0400 Brian Masney wrote: > This patch renames tsl2x7x_device_id() to tsl2x7x_device_id_verif(), > removes the unnecessary pointer on the id parameter, and only calls > the verification function once. > > Signed-off-by: Brian Masney That double call is just weird..

Re: [PATCH 08/13] staging: iio: tsl2x7x: add range checking to three sysfs attributes

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 20:41:48 -0400 Brian Masney wrote: > The sysfs attributes in_illuminance0_target_input, > in_illuminance0_calibrate, and in_proximity0_calibrate did not have > proper range checking in place so this patch adds the correct range > checks. > > Signed-off-by: Brian Masney Comm

Re: [PATCH 09/13] staging: iio: tsl2x7x: move power and diode settings into header file

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 20:41:49 -0400 Brian Masney wrote: > The power and diode defines are needed for the platform data so this > patch moves the defines out of the .c file and into the header file. A > comment for the diode is also cleaned up while this code is touched. > > Signed-off-by: Brian M

Re: [PATCH 10/13] staging: iio: tsl2x7x: rename prx to prox for consistency

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 20:41:50 -0400 Brian Masney wrote: > The driver mostly uses the 'prox' naming convention for most of the > proximity settings, however prx_time and tsl2x7x_prx_gain was present. > This patch renames these to prox_time and tsl2x7x_prox_gain for > consistency with everything els

Re: [PATCH 12/13] staging: iio: tsl2x7x: various comment cleanups

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 20:41:52 -0400 Brian Masney wrote: > This patch removes several unnecessary comments, changes some comments > so that the use as much of the allowable 80 characters as possible, adds > the proper whitespace, removes some structure members from the kernel > docs that are no lon

Re: [PATCH 13/13] staging: iio: tsl2x7x: rename prox_config to als_prox_config

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 20:41:53 -0400 Brian Masney wrote: > The configuration register on the device is represented with the > prox_config member on the tsl2x7x_settings structure. According to the > TSL2772 data sheet, this register can hold: 1) the proximity drive > level, 2) ALS/Proximity long wa

Re: [PATCH 11/13] staging: iio: tsl2x7x: use device defaults for als_time, prox_time and wait_time

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 20:41:51 -0400 Brian Masney wrote: > This patch changes the defaults of the als_time, prox_time and > wait_time to match the defaults according to the TSL2772 datasheet. > > Signed-off-by: Brian Masney Applied, thanks, Jonathan > --- > drivers/staging/iio/light/tsl2x7x.c

Re: [PATCH v2 01/13] staging: iio: ad2s1200: Remove unneeded include

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 21:28:32 +0200 David Veenstra wrote: > This patches removes unneeded slab.h header. > > Signed-off-by: David Veenstra This one surprised me, but indeed there are no direct users of any memory allocation in this file. Applied to the togreg branch of iio.git and pushed out as

Re: [PATCH v2 02/13] staging: iio: ad2s1200: Sort includes alphabetically

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 21:28:52 +0200 David Veenstra wrote: > This patches sorts all the includes in alphabetic order. > > Signed-off-by: David Veenstra Applied, Thanks Jonathan > --- > drivers/staging/iio/resolver/ad2s1200.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-)

Re: [PATCH v2 03/13] staging: iio: ad2s1200: Reverse Christmas tree ordering

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 21:29:08 +0200 David Veenstra wrote: > Reorders the variable declarations to prefer a reverse Christmas tree > order to improve readability. > > Signed-off-by: David Veenstra Applied, Thanks, Jonathan > --- > drivers/staging/iio/resolver/ad2s1200.c | 4 ++-- > 1 file cha

Re: [PATCH v2 04/13] staging: iio: ad2s1200: Add blank lines

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 21:29:52 +0200 David Veenstra wrote: > Add blank lines to improve readability. > > Signed-off-by: David Veenstra Applied, Thanks, Jonathan > --- > drivers/staging/iio/resolver/ad2s1200.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/staging/iio

Re: [PATCH v2 05/13] staging: iio: ad2s1200: Add kernel docs to driver state

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 21:30:03 +0200 David Veenstra wrote: > Add missing kernel docs to the ad2s1200 driver state. > > Signed-off-by: David Veenstra > --- > drivers/staging/iio/resolver/ad2s1200.c | 8 > 1 file changed, 8 insertions(+) > > diff --git a/drivers/staging/iio/resolver/ad2s

Re: [PATCH v2 06/13] staging: iio: ad2s1200: Introduce variable for repeated value

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 21:30:19 +0200 David Veenstra wrote: > Add variable to hold &spi->dev in ad2s1200_probe. This value is repeatedly > used in ad2s1200_probe. > > Signed-off-by: David Veenstra No significant gain in readability. Perhaps even a slight lost I'm going to say no to this one. Jo

Re: [PATCH v2 07/13] staging: iio: ad2s1200: Improve readability with be16_to_cpup

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 21:30:32 +0200 David Veenstra wrote: > The manual states that the data is contained in the upper 12 bits > of the 16 bits read by spi. The code that extracts these 12 bits > is correct for both be and le machines, but this is not clear > from a first glance. > > To improve re

Re: [PATCH v2 08/13] staging: iio: ad2s1200: Replace legacy gpio API with modern API

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 21:30:44 +0200 David Veenstra wrote: > The legacy, integer based gpio API is replaced with the descriptor > based API. > > For compatibility, it is first tried to use the platform data to > request the gpio's. Otherwise, it looks for the "sample" and "rdvel" > gpio function.

Re: [PATCH v2 09/13] staging: iio: ad2s1200: Add documentation for device tree binding

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 21:30:54 +0200 David Veenstra wrote: > Add documentation for the added device tree bindings. > > Signed-off-by: David Veenstra Straight forward, but please introduce it directly in bindings/iio/resolver rather than moving it. The binding doesn't require a driver to be outsi

Re: [PATCH v2 10/13] staging: iio: ad2s1200: Add scaling factor for angular velocity channel

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 21:31:09 +0200 David Veenstra wrote: > The sysfs iio ABI states radians per second is expected as the unit for > angular velocity, but the 12-bit angular velocity register has rps > as its unit. So a fractional scaling factor of approximately 2 * Pi is > added to the angular v

Re: [PATCH v2 11/13] staging: iio: Documentation: Add missing sysfs docs for angle channel

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 21:31:37 +0200 David Veenstra wrote: > The iio resolver drivers in staging use angle channels. This patch > add missing documentation for this type of channel. > > As was discussed in [1], radians is chosen as the unit, to match the > unit of angular velocity. > > [1] https:

Re: [PATCH v2 12/13] staging: iio: ad2s1200: Add scaling factor for angle channel

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 21:31:48 +0200 David Veenstra wrote: > A fractional scaling factor of approximately 2 * Pi / (2^12 -1) is added, > to scale the 12-bits angular position to radians. > > Signed-off-by: David Veenstra > --- > Changes in v2: > - This patch replaces the patch that changed the

Re: [PATCH v2 13/13] staging: iio: ad2s1200: Move driver out of staging

2018-04-21 Thread Jonathan Cameron
On Fri, 20 Apr 2018 21:32:01 +0200 David Veenstra wrote: > Move the iio driver for the ad2s1200 resolver-to-digital > converter out of staging, into mainline iio subsystems. > > Signed-off-by: David Veenstra I'll look at this once the minor issues with the other patches are cleared up (so in v3

Re: [PATCH 0/3] stagging:iio:meter: Add essential IIO API structures for ADE7854

2018-04-21 Thread Jonathan Cameron
On Sat, 21 Apr 2018 08:54:45 -0300 Rodrigo Siqueira wrote: > This patchset aims to update ADE7854 by adding the required IIO API > components. The first patch adds the iio_chan_spec for handling seven > different registers (all of them with a similar behavior). The second > patch appends the read

Re: [PATCH 1/3] stagging:iio:meter: Add iio_chan_spec

2018-04-21 Thread Jonathan Cameron
On Sat, 21 Apr 2018 08:55:08 -0300 Rodrigo Siqueira wrote: > This patch adds iio_chan_spec struct. Additionally, the channel adds the > support for handling AIGAIN, BIGAIN, CIGAIN, NIGAIN, AVGAIN, BVGAIN, and > CVGAIN. > > Signed-off-by: Rodrigo Siqueira > --- > drivers/staging/iio/meter/ade78

Re: [PATCH 2/3] stagging:iio:meter: Add ade7854_read_raw function

2018-04-21 Thread Jonathan Cameron
On Sat, 21 Apr 2018 08:55:52 -0300 Rodrigo Siqueira wrote: > This patch adds the ade7854_read_raw() function which is responsible for > handling the read operation for registers: AIGAIN, BIGAIN, CIGAIN, > NIGAIN, AVGAIN, BVGAIN, and CVGAIN. For the sake of simplicity, this > patch only adds basic

Re: [PATCH 3/3] stagging:iio:meter: Add ade7854_write_raw function

2018-04-21 Thread Jonathan Cameron
On Sat, 21 Apr 2018 08:56:19 -0300 Rodrigo Siqueira wrote: > This patch adds the ade7854_write_raw() function which is responsible > for handling the write operation for registers: AIGAIN, BIGAIN, CIGAIN, > NIGAIN, AVGAIN, BVGAIN, and CVGAIN. Finally, this patch completely > removes the old ABI u

Re: [PATCH v3 5/9] staging: iio: ad2s1200: Add documentation for device tree binding

2018-04-28 Thread Jonathan Cameron
On Fri, 27 Apr 2018 09:48:20 -0500 Rob Herring wrote: > On Mon, Apr 23, 2018 at 12:03:47AM +0200, David Veenstra wrote: > > Add documentation for the added device tree bindings. > > > > Signed-off-by: David Veenstra > > --- > > Changes in v3: > > - Documentation is added to Documentation/devic

Re: [PATCH v3 1/9] staging: iio: ad2s1200: Add kernel docs to driver state

2018-04-28 Thread Jonathan Cameron
On Mon, 23 Apr 2018 00:02:51 +0200 David Veenstra wrote: > Add missing kernel docs to the ad2s1200 driver state. > > Signed-off-by: David Veenstra Hi David, Comment inline. > --- > Changes in v3: > - Added more explanation to mutex lock. > > drivers/staging/iio/resolver/ad2s1200.c | 9

Re: [PATCH v3 2/9] staging: iio: ad2s1200: Improve readability with be16_to_cpup

2018-04-28 Thread Jonathan Cameron
On Mon, 23 Apr 2018 00:03:03 +0200 David Veenstra wrote: > The manual states that the data is contained in the upper 12 bits > of the 16 bits read by spi. The code that extracts these 12 bits > is correct for both be and le machines, but this is not clear > from a first glance. > > To improve re

Re: [PATCH v3 3/9] staging: iio: ad2s1200: Replace legacy gpio API with modern API

2018-04-28 Thread Jonathan Cameron
On Mon, 23 Apr 2018 00:03:16 +0200 David Veenstra wrote: > The legacy, integer based gpio API is replaced with the modern > descriptor based API. > > Signed-off-by: David Veenstra This patch is fine, but I'm going to leave it for the next version as it makes more sense to pick up with the next

Re: [PATCH v3 4/9] staging: iio: ad2s1200: Replace platform data with dt bindings

2018-04-28 Thread Jonathan Cameron
On Mon, 23 Apr 2018 00:03:32 +0200 David Veenstra wrote: > Remove usage of platform data, and replace it with device tree > facilities. > > Signed-off-by: David Veenstra This is fine up to the need to add the prefix to the gpio names. Thanks, Jonathan > --- > Changes in v3: > - Introduced i

Re: [PATCH v3 6/9] staging: iio: ad2s1200: Add scaling factor for angular velocity channel

2018-04-28 Thread Jonathan Cameron
On Mon, 23 Apr 2018 00:03:59 +0200 David Veenstra wrote: > The sysfs iio ABI states radians per second is expected as the unit for > angular velocity, but the 12-bit angular velocity register has rps Really small point, but rps is a bit ambiguous given we are talking about converting to radian's

Re: [PATCH v3 6/9] staging: iio: ad2s1200: Add scaling factor for angular velocity channel

2018-04-28 Thread Jonathan Cameron
On Sat, 28 Apr 2018 18:23:44 +0100 Jonathan Cameron wrote: > On Mon, 23 Apr 2018 00:03:59 +0200 > David Veenstra wrote: > > > The sysfs iio ABI states radians per second is expected as the unit for > > angular velocity, but the 12-bit angular velocity register has rps

Re: [PATCH v3 7/9] staging: iio: Documentation: Add missing sysfs docs for angle channel

2018-04-28 Thread Jonathan Cameron
On Mon, 23 Apr 2018 00:04:10 +0200 David Veenstra wrote: > The iio resolver drivers in staging use angle channels. This patch > add missing documentation for this type of channel. > > As was discussed in [1], radians is chosen as the unit, to match the > unit of angular velocity. > > [1] https:

Re: [PATCH v3 8/9] staging: iio: ad2s1200: Add scaling factor for angle channel

2018-04-28 Thread Jonathan Cameron
On Mon, 23 Apr 2018 00:04:24 +0200 David Veenstra wrote: > A scaling factor of approximately 2 * Pi / (2^12 -1) is added, > to scale the 12-bits angular position to radians. > > A return type of IIO_VAL_INT_PLUS_NANO is used, so that the scale of > both the angle channel and angular velocity cha

Re: [PATCH v3 9/9] staging: iio: ad2s1200: Move driver out of staging

2018-04-28 Thread Jonathan Cameron
On Mon, 23 Apr 2018 00:04:42 +0200 David Veenstra wrote: > Move the iio driver for the ad2s1200 and ad2s1205 resolver-to-digital > converter out of staging, into mainline iio subsystems. > > Signed-off-by: David Veenstra A few more minor bits and bobs + suggestions. Some little things that I m

Re: [PATCH v2 01/11] staging: iio: tsl2x7x: use GPL-2.0+ SPDX license identifier

2018-05-06 Thread Jonathan Cameron
On Thu, 3 May 2018 22:53:09 -0400 Brian Masney wrote: > The summary text for the GPL is not needed since the SPDX identifier > is a legally binding shorthand that can be used instead. > > Signed-off-by: Brian Masney I'm always less than totally keen on these patches not coming from the copyrig

Re: [PATCH v2 02/11] staging: iio: tsl2x7x: add range checking to three sysfs attributes

2018-05-06 Thread Jonathan Cameron
On Thu, 3 May 2018 22:53:10 -0400 Brian Masney wrote: > The sysfs attributes in_illuminance0_target_input, > in_illuminance0_calibrate, and in_proximity0_calibrate did not have > proper range checking in place so this patch adds the correct range > checks. > > Signed-off-by: Brian Masney Appli

Re: [PATCH v2 04/11] staging: iio: tsl2x7x: move calibscale_available attribute to IIO_INTENSITY channel

2018-05-06 Thread Jonathan Cameron
On Thu, 3 May 2018 22:53:12 -0400 Brian Masney wrote: > The calibscale_available attribute is currently associated with the > IIO_LIGHT channel but should be associated with the IIO_INTENSITY > channel. This patch corrects that association and it also corrects > lines that were unnecessarily spl

Re: [PATCH v2 03/11] staging: iio: tsl2x7x: don't setup event handlers if interrupts are not configured

2018-05-06 Thread Jonathan Cameron
On Thu, 3 May 2018 22:53:11 -0400 Brian Masney wrote: > The driver would expose to userspace the events directory even if the > interrupts were not configured. This patch changes the driver so that > the events directory is not exposed to user space if interrupts are > not configured. This patch

Re: [PATCH v2 05/11] staging: iio: tsl2x7x: use IIO_CONST_ATTR for calibscale_available

2018-05-06 Thread Jonathan Cameron
On Thu, 3 May 2018 22:53:13 -0400 Brian Masney wrote: > The in_intensity0_calibscale_available sysfs attribute has code that > checks the device type to determine which calibration scales are > available. This check is not necessary since all of the supported > ALS device types use the scales 1

Re: [PATCH v2 06/11] staging: iio: tsl2x7x: correct integration time and lux equation

2018-05-06 Thread Jonathan Cameron
On Thu, 3 May 2018 22:53:14 -0400 Brian Masney wrote: > The integration_time sysfs attribute did not report the correct > time. Changing the integration time would cause the reported lux to > change wildly. Once the integration time was corrected, all of the > equations, and lux tables needed to

Re: [PATCH v2 07/11] staging: iio: tsl2x7x: support 2.72 and 2.73 ALS increments

2018-05-06 Thread Jonathan Cameron
On Thu, 3 May 2018 22:53:15 -0400 Brian Masney wrote: > The driver assumed that the ALS increment was 2.72 ms, and the upper > range was 696 ms. Some other supported devices use 2.73 ms - 699 ms. > This patch adds support for the multiple ranges. > > Signed-off-by: Brian Masney My problem her

Re: [PATCH v2 08/11] staging: iio: tsl2x7x: add device ids for code readability

2018-05-06 Thread Jonathan Cameron
On Thu, 3 May 2018 22:53:16 -0400 Brian Masney wrote: > This patch adds the device IDs to the device_channel_config array to > improve code readability. > > Signed-off-by: Brian Masney Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Than

Re: [PATCH v2 09/11] staging: iio: tsl2x7x: correct IIO_EV_INFO_PERIOD values

2018-05-06 Thread Jonathan Cameron
On Thu, 3 May 2018 22:53:17 -0400 Brian Masney wrote: > The thresh periods assumed an integration time of 3ms. This patch adds > support for the correct integration time (2.72ms or 2.73ms). The code > had the ALS filter values as going up to 15, however the values actually > went up to 60 since

Re: [PATCH v2 10/11] staging: iio: tsl2x7x: rename driver to tsl2772

2018-05-06 Thread Jonathan Cameron
On Thu, 3 May 2018 22:53:18 -0400 Brian Masney wrote: > This patch renames this driver from tsl2x7x to tsl2772 since it is > highly likely that additional devices will be added to this driver that > do not match that wildcard. The tsl2772 driver name was selected since > that is currently the de

Re: [PATCH v2 11/11] staging: iio: tsl2x7x/tsl2772: move out of staging

2018-05-06 Thread Jonathan Cameron
On Thu, 3 May 2018 22:56:54 -0400 Brian Masney wrote: > Hey Jonathan, > > I intentionally didn't run git format-patch with the --no-renames since > patch 10 renamed the driver. Here is the .[ch] files included inline to > make your review easier. Thanks :) A few really minor things beyond that

Re: [PATCH v3 1/9] staging: iio: tsl2x7x: remove unnecessary whitespace

2018-05-12 Thread Jonathan Cameron
On Thu, 10 May 2018 20:12:15 -0400 Brian Masney wrote: > This patch removes unnecessary whitespace in preparation for moving this > driver out of staging. > > Signed-off-by: Brian Masney Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Tha

Re: [PATCH v3 2/9] staging: iio: tsl2x7x: use direct returns

2018-05-12 Thread Jonathan Cameron
On Thu, 10 May 2018 20:12:16 -0400 Brian Masney wrote: > This patch changes the functions tsl2x7x_read_event_value() and > tsl2x7x_read_raw() to use direct returns to simplify the code. > > Signed-off-by: Brian Masney Applied, thanks Jonathan > --- > drivers/staging/iio/light/tsl2x7x.c | 49

Re: [PATCH v3 3/9] staging: iio: tsl2x7x: turn chip off if IIO device registration fails

2018-05-12 Thread Jonathan Cameron
On Thu, 10 May 2018 20:12:17 -0400 Brian Masney wrote: > This patch turns the chip off if IIO device registration fails so that > the error handling mirrors the device remove to make review easier in > preparation for moving this driver out of staging. > > This patch also adds a missing error ch

Re: [PATCH v3 5/9] staging: iio: tsl2x7x: convert to use read_avail

2018-05-12 Thread Jonathan Cameron
On Thu, 10 May 2018 20:12:19 -0400 Brian Masney wrote: > Make the sysfs attributes in_proximity0_calibscale_available, and > in_intensity0_{calibscale,integration_time}_available be created > using info_mask_separate_available on the channel configuration. > > The driver assumed that the ALS inc

Re: [PATCH v3 4/9] staging: iio: tsl2x7x: use macro to populate tsl2X7X_device_info

2018-05-12 Thread Jonathan Cameron
On Thu, 10 May 2018 20:12:18 -0400 Brian Masney wrote: > This patch creates a macro that populates the tsl2X7X_device_info > structure to reduce duplicated code in the driver. > > Signed-off-by: Brian Masney Applied. Thanks, Jonathan > --- > drivers/staging/iio/light/tsl2x7x.c | 61 > +

Re: [PATCH v3 6/9] staging: iio: tsl2x7x: correct IIO_EV_INFO_PERIOD values

2018-05-12 Thread Jonathan Cameron
On Thu, 10 May 2018 20:12:20 -0400 Brian Masney wrote: > The thresh periods assumed an integration time of 3ms. This patch adds > support for the correct integration time (2.72ms or 2.73ms). The code > had the ALS filter values as going up to 15, however the values actually > went up to 60 since

Re: [PATCH v3 7/9] staging: iio: tsl2x7x: add range checking to tsl2x7x_write_raw

2018-05-12 Thread Jonathan Cameron
On Thu, 10 May 2018 20:12:21 -0400 Brian Masney wrote: > The CALIBBIAS and INT_TIME masks in tsl2x7x_write_raw did not have any > range checking in place so this patch adds the appropriate range > checking. The defines TSL2X7X_ALS_GAIN_TRIM_{MIN,MAX} are also > introduced by this patch. > > Sign

Re: [PATCH v3 8/9] staging: iio: tsl2x7x: rename driver to tsl2772

2018-05-12 Thread Jonathan Cameron
On Thu, 10 May 2018 20:12:22 -0400 Brian Masney wrote: > This patch renames this driver from tsl2x7x to tsl2772 since it is > highly likely that additional devices will be added to this driver that > do not match that wildcard. The tsl2772 driver name was selected since > that is currently the de

Re: [PATCH v3 9/9] staging: iio: tsl2x7x/tsl2772: move out of staging

2018-05-12 Thread Jonathan Cameron
On Thu, 10 May 2018 20:32:06 -0400 Brian Masney wrote: > On Thu, May 10, 2018 at 08:12:23PM -0400, Brian Masney wrote: > > Move the tsl2772 driver out of staging and into mainline. > > Hey Jonathan, > > Here is the .c and .h file to make your review easier. Thanks for all > your feedback on a

Re: [PATCH v3 9/9] staging: iio: tsl2x7x/tsl2772: move out of staging

2018-05-12 Thread Jonathan Cameron
On Sat, 12 May 2018 08:36:30 -0400 Brian Masney wrote: > On Sat, May 12, 2018 at 12:44:37PM +0100, Jonathan Cameron wrote: > > On Thu, 10 May 2018 20:32:06 -0400 > > Brian Masney wrote: > > > > > On Thu, May 10, 2018 at 08:12:23PM -0400, Brian Masney wrote: &

Re: [PATCH v4 01/12] staging: iio: ad2s1200: Remove unneeded newline in license

2018-05-20 Thread Jonathan Cameron
On Fri, 18 May 2018 20:21:06 +0200 David Veenstra wrote: > Remove unneeded newline in license, as it does not improve readability. > > Signed-off-by: David Veenstra Applied, thanks Jonathan > --- > Changes in v4: > - Introduced in this version. > > drivers/staging/iio/resolver/ad2s1200.c |

Re: [PATCH v4 02/12] staging: iio: ad2s1200: Remove unneeded initializations

2018-05-20 Thread Jonathan Cameron
On Fri, 18 May 2018 20:21:23 +0200 David Veenstra wrote: > Remove 2 initializations which are unneeded, because the > initialized values are never used. > > Signed-off-by: David Veenstra Applied. > --- > Changes in v4: > - Introduced in this version. > > drivers/staging/iio/resolver/ad2s1200

Re: [PATCH v4 03/12] staging: iio: ad2s1200: Add kernel docs to driver state

2018-05-20 Thread Jonathan Cameron
On Fri, 18 May 2018 20:21:34 +0200 David Veenstra wrote: > Add missing kernel docs to the ad2s1200 driver state. > > Signed-off-by: David Veenstra Nice. Applied, Jonathan > --- > Changes in v4: > - Simplified explanation of lock. > > drivers/staging/iio/resolver/ad2s1200.c | 8 >

Re: [PATCH v4 04/12] staging: iio: ad2s1200: Setup spi before iio device register

2018-05-20 Thread Jonathan Cameron
On Fri, 18 May 2018 20:21:44 +0200 David Veenstra wrote: > The spi should be set up before the device is registered as an iio > device. > > This patch moves the setup to before the device registration. > > Signed-off-by: David Veenstra Applied to the togreg branch of iio.git and pushed out as

Re: [PATCH v4 06/12] staging: iio: ad2s1200: Replace platform data with dt bindings

2018-05-20 Thread Jonathan Cameron
On Fri, 18 May 2018 20:22:32 +0200 David Veenstra wrote: > Remove usage of platform data, and replace it with device tree > facilities. > > Signed-off-by: David Veenstra Great, Applied to the togreg branch of iio.git and pushed out as testing. I think the dt bindings that match this are uncon

Re: [PATCH v4 07/12] staging: iio: ad2s1200: Add dt table

2018-05-20 Thread Jonathan Cameron
On Fri, 18 May 2018 20:22:41 +0200 David Veenstra wrote: > Add device tree table for matching with the vendor ID. > > Signed-off-by: David Veenstra Applied Thanks, Jonathan > --- > Changes in v4: > - Introduced in this version. > > drivers/staging/iio/resolver/ad2s1200.c | 8 > 1

Re: [PATCH v4 05/12] staging: iio: ad2s1200: Replace legacy gpio API with modern API

2018-05-20 Thread Jonathan Cameron
On Fri, 18 May 2018 20:21:56 +0200 David Veenstra wrote: > The legacy, integer based gpio API is replaced with the modern > descriptor based API. > > Signed-off-by: David Veenstra Hmm This is more complex than it needed to be because it has to do some massaging of the two different methods only

Re: [PATCH v4 08/12] dt-bindings: iio: resolver: Document AD2S1200 bindings

2018-05-20 Thread Jonathan Cameron
On Fri, 18 May 2018 20:22:50 +0200 David Veenstra wrote: > Add documentation for the device tree bindings of the AD2S1200 resolver. > > Signed-off-by: David Veenstra Nothing fundamentally wrong it in here, but a few things to tidy up. > --- > Changes in v4: > - Added vendor prefix to gpio fu

Re: [PATCH v4 09/12] staging: iio: ad2s1200: Add scaling factor for angular velocity channel

2018-05-20 Thread Jonathan Cameron
On Fri, 18 May 2018 20:23:01 +0200 David Veenstra wrote: > The sysfs iio ABI states radians per second is expected as the unit for > angular velocity, but the 12-bit angular velocity register has > revolution per seconds as its unit. So a scaling factor of approximately > 2 * Pi is added to the a

Re: [PATCH v4 10/12] staging: iio: ad2s1200: Add scaling factor for angle channel

2018-05-20 Thread Jonathan Cameron
On Fri, 18 May 2018 20:23:14 +0200 David Veenstra wrote: > A scaling factor of approximately 2 * Pi / (2^12 -1) is added, > to scale the 12-bits angular position to radians. > > A return type of IIO_VAL_INT_PLUS_NANO is used, so that the scale of > both the angle channel and angular velocity cha

Re: [PATCH v4 11/12] staging: iio: ad2s1200: Add copyright

2018-05-20 Thread Jonathan Cameron
On Fri, 18 May 2018 20:23:25 +0200 David Veenstra wrote: > Add David Veenstra as a copyright holders and as an author, > for all of the staging clean ups of the ad2s1200 driver. > > Signed-off-by: David Veenstra Applied to the togreg branch of iio.git and pushed out as testing for the autobuild

Re: [PATCH v4 12/12] staging: iio: ad2s1200: Move driver out of staging

2018-05-20 Thread Jonathan Cameron
On Fri, 18 May 2018 20:23:40 +0200 David Veenstra wrote: > Move the iio driver for the ad2s1200 and ad2s1205 resolver-to-digital > converter out of staging, into mainline iio subsystems. > > Signed-off-by: David Veenstra Some totally trivial rubbish inline that I noticed. Doesn't need fixing re

Re: [PATCH] staging:iio:accel:adis16240: sign extend function avoiding code duplication

2018-06-12 Thread Jonathan Cameron
On Tue, 12 Jun 2018 02:57:48 +0200 Karim Eshapa wrote: > Use sign_extend32 kernel function instead of code duplication. > Safe also for 16 bit. > > Signed-off-by: Karim Eshapa Please resend as a fresh patch marked at V2 with a change log below the --- so we can easily see what has changed. Th

Re: [PATCH v2] staging:iio:accel:adis16240: sign extend function avoiding code duplication

2018-06-16 Thread Jonathan Cameron
On Tue, 12 Jun 2018 18:21:53 +0200 Karim Eshapa wrote: > Use sign_extend32 kernel function instead of code duplication, > Safe also for 16 bit. and remove declaration of bits variable not needed. > > Signed-off-by: Karim Eshapa Please consider how a patch is applied and resend as a v3 which ca

Re: [PATCH] staging:iio:accel:adis16203: sign extend function rather code duplication

2018-06-16 Thread Jonathan Cameron
On Tue, 12 Jun 2018 18:48:38 +0200 Karim Eshapa wrote: > Use sign_extend32 kernel function instead of code duplication. > This function is also safe for 16 bits. > > Signed-off-by: Karim Eshapa Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with

Re: [PATCH 20/27] Staging: iio: Allow compile test of GPIO consumers if !GPIOLIB

2015-05-07 Thread Jonathan Cameron
e dependency on GPIOLIB if COMPILE_TEST is enabled, where > appropriate. > > Signed-off-by: Geert Uytterhoeven > Cc: Jonathan Cameron > Cc: linux-...@vger.kernel.org > Cc: de...@driverdev.osuosl.org Applied to the togreg branch of iio.git - to be pushed out as testing 'soonis

Re: [PATCH v3 1/3] staging: iio_simple_dummy: fix init function

2015-06-01 Thread Jonathan Cameron
On 30/05/15 09:20, Vladimirs Ambrosovs wrote: > This patch fixes the init function for the iio_simple_dummy driver. > The main issues were absence of kfree for the allocated array, and no > devices being removed in case the probe function fails, running in a loop. > > Signed-off-by: Vladimirs Ambr

Re: [PATCH v3 3/3] staging: iio_simple_dummy: fix module_param type

2015-06-01 Thread Jonathan Cameron
On 30/05/15 09:20, Vladimirs Ambrosovs wrote: > Fix the module_param "instances" type to uint, since the variable type > holding the value is unsigned. > > Signed-off-by: Vladimirs Ambrosovs Applied to the togreg branch of iio.git - which will get pushed out as testing in a few days. Or just poss

Re: [PATCH v3 2/3] staging: iio_simple_dummy: fix return types

2015-06-01 Thread Jonathan Cameron
On 30/05/15 09:20, Vladimirs Ambrosovs wrote: > The functions iio_dummy_remove(), iio_simple_dummy_events_unregister() and > iio_dummy_evgen_release_irq() were changed to return void instead of int. > > Signed-off-by: Vladimirs Ambrosovs applied as per previous patch. > --- > drivers/staging/iio

Re: [PATCH v4] dt-bindings: iio: accel: add binding documentation for ADIS16240

2019-11-23 Thread Jonathan Cameron
On Sat, 23 Nov 2019 02:19:27 -0300 Rodrigo Carvalho wrote: > This patch add device tree binding documentation for ADIS16240. > > Signed-off-by: Rodrigo Ribeiro Carvalho No problem with this patch, but I definitely want to see an accompanying one enforcing the SPI mode in the driver. Right now

Re: [PATCH v2 1/4] iio: adc: Add support for AD7091R5 ADC

2019-12-01 Thread Jonathan Cameron
On Mon, 25 Nov 2019 11:26:27 + "Ardelean, Alexandru" wrote: > On Tue, 2019-10-29 at 18:29 +0200, Beniamin Bia wrote: > > [External] > > > > From: Paul Cercueil > > > > AD7091 is 4-Channel, I2C, Ultra Low Power,12-Bit ADC. > > > > Datasheet: > > Link: > > https://www.analog.com/media/en/t

Re: [PATCH v4] dt-bindings: iio: accel: add binding documentation for ADIS16240

2019-12-01 Thread Jonathan Cameron
+CC Mark as we probably need a more general view point on the question of whether SPI mode should be enforced by binding or in the driver. On Mon, 25 Nov 2019 07:51:30 + "Ardelean, Alexandru" wrote: > On Sat, 2019-11-23 at 11:41 +0000, Jonathan Cameron wrote: > > On Sat

Re: [PATCH v5 1/2] staging: iio: accel: adis16240: enforce SPI mode on probe function

2019-12-01 Thread Jonathan Cameron
On Mon, 25 Nov 2019 07:55:39 + "Ardelean, Alexandru" wrote: > On Sat, 2019-11-23 at 20:35 -0300, Rodrigo Carvalho wrote: > > [External] > > > > According to the datasheet, this driver supports only SPI mode 3, > > so we should enforce it and call spi_setup() on probe function. > > > > Signe

Re: [PATCH v4] dt-bindings: iio: accel: add binding documentation for ADIS16240

2019-12-03 Thread Jonathan Cameron
On Tue, 3 Dec 2019 16:38:50 + Mark Brown wrote: > On Sun, Dec 01, 2019 at 11:40:32AM +0000, Jonathan Cameron wrote: > > > +CC Mark as we probably need a more general view point on > > the question of whether SPI mode should be enforced by binding > > or in the drive

Re: [PATCH v5 2/2] dt-bindings: iio: accel: add binding documentation for ADIS16240

2019-12-06 Thread Jonathan Cameron
On Thu, 5 Dec 2019 09:21:29 -0600 Rob Herring wrote: > On Sat, Nov 23, 2019 at 08:35:10PM -0300, Rodrigo Carvalho wrote: > > This patch add device tree binding documentation for ADIS16240. > > > > Signed-off-by: Rodrigo Ribeiro Carvalho > > checkpatch.pl complains about a mismatch between th

Re: [PATCH v6 2/2] dt-bindings: iio: accel: add binding documentation for ADIS16240

2019-12-15 Thread Jonathan Cameron
On Fri, 13 Dec 2019 13:10:36 -0600 Rob Herring wrote: > On Sat, 7 Dec 2019 01:53:39 -0300, Rodrigo Carvalho wrote: > > This patch add device tree binding documentation for ADIS16240. > > > > Signed-off-by: Rodrigo Carvalho > > --- > > V6: > > - Update SPDX license identifier > > > > .../bi

Re: [PATCH 2/4] iio: imu: adis: Refactor adis_initial_startup

2020-02-01 Thread Jonathan Cameron
On Mon, 20 Jan 2020 16:20:49 +0200 Alexandru Ardelean wrote: > From: Nuno Sá > > All the ADIS devices perform, at the beginning, a self test to make sure > the device is in a sane state. Furthermore, some drivers also do a call > to `adis_reset()` before the test which is also a good practice.

Re: [PATCH 2/4] iio: imu: adis: Refactor adis_initial_startup

2020-02-03 Thread Jonathan Cameron
On Mon, 3 Feb 2020 10:31:30 +0100 Nuno Sá wrote: > Hi Jonathan, > > > On Sat, 2020-02-01 at 17:08 +0000, Jonathan Cameron wrote: > > On Mon, 20 Jan 2020 16:20:49 +0200 > > Alexandru Ardelean wrote: > > > > > From: Nuno Sá > > > > > &g

Re: [PATCH 2/4] iio: imu: adis: Refactor adis_initial_startup

2020-02-05 Thread Jonathan Cameron
On Wed, 5 Feb 2020 12:25:40 + "Sa, Nuno" wrote: > On Mon, 2020-02-03 at 12:03 +0000, Jonathan Cameron wrote: > > > > On Mon, 3 Feb 2020 10:31:30 +0100 > > Nuno Sá wrote: > > > > > Hi Jonathan, > > > > > > > > >

Re: [PATCH 2/4] iio: imu: adis: Refactor adis_initial_startup

2020-02-06 Thread Jonathan Cameron
On Wed, 5 Feb 2020 16:44:13 + "Sa, Nuno" wrote: > On Wed, 2020-02-05 at 14:59 +0000, Jonathan Cameron wrote: > > On Wed, 5 Feb 2020 12:25:40 + > > "Sa, Nuno" wrote: > > > > > On Mon, 2020-02-03 at 12:03 +, Jonathan Cameron

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