Re: [PATCH 3/8] [media] v4l: rcar_fdp1: Change platform dependency to ARCH_RENESAS

2018-04-21 Thread Laurent Pinchart
Hi Geert, Thank you for the patch. On Friday, 20 April 2018 16:28:29 EEST Geert Uytterhoeven wrote: > The Renesas Fine Display Processor driver is used on Renesas R-Car SoCs > only. Since commit 9b5ba0df4ea4f940 ("ARM: shmobile: Introduce > ARCH_RENESAS") is ARCH_RENESAS a more appropriate

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

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

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

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

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

2018-04-21 Thread Rodrigo Siqueira
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_raw function defined by the IIO API. Finally, the third patch adds

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,

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

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

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

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

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

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

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

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,

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

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 >dev in ad2s1200_probe. This value is repeatedly > used in ad2s1200_probe. > > Signed-off-by: David Veenstra No significant gain in readability.

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

2018-04-21 Thread Rodrigo Siqueira
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/ade7854.c | 42 + 1

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

2018-04-21 Thread Rodrigo Siqueira
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 manipulation for current and voltage channels. Finally, this patch

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

2018-04-21 Thread Rodrigo Siqueira
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 used for handling the registers mentioned above. Signed-off-by:

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(). > >

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

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 >

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

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

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

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

[PATCH] staging: lustre: Change return type to vm_fault_t

2018-04-21 Thread Souptick Joarder
Use new return type vm_fault_t for fault handler. For now, this is just documenting that the function returns a VM_FAULT value rather than an errno. Once all instances are converted, vm_fault_t will become a distinct type. Commit 1c8f422059ae ("mm: change return type to vm_fault_t")

Re: [PATCH] staging: lustre: Change return type to vm_fault_t

2018-04-21 Thread Matthew Wilcox
On Sun, Apr 22, 2018 at 03:47:24AM +0530, Souptick Joarder wrote: > @@ -261,7 +261,7 @@ static inline int to_fault_error(int result) > * \retval VM_FAULT_ERROR on general error > * \retval NOPAGE_OOM not have memory for allocate new page > */ > -static int ll_fault0(struct vm_area_struct

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

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

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

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

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

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

2018-04-21 Thread John Syne
> On Apr 21, 2018, at 10:26 AM, Jonathan Cameron wrote: > > 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

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

2018-04-21 Thread Brian Masney
On Sat, Apr 21, 2018 at 05:16:38PM +0100, Jonathan Cameron wrote: > 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. > > > >

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

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

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

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

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

2018-04-21 Thread John Syne
Attached is a spreadsheet which should help explain the calibration process. ADE7878_calibration.xlsx Description: MS-Excel 2007 spreadsheet Here is the calibration guide: http://www.analog.com/media/en/technical-documentation/application-notes/AN-1076.pdf Regards, John > On Apr 21,