Re: [PATCH v2 1/2] include: linux: sysfs: Add __ATTR_NAMED macro

2017-09-19 Thread Lars-Peter Clausen
On 09/13/2017 11:29 PM, Greg KH wrote: > On Wed, Sep 13, 2017 at 09:23:31PM +0200, Lars-Peter Clausen wrote: >> On 09/13/2017 08:58 PM, Greg KH wrote: >>> On Wed, Sep 13, 2017 at 06:03:10PM +0100, Jonathan Cameron wrote: >>>> On Wed, 13 Sep 2017 14:14:07 +

Re: [PATCH] staging: iio: ad7192: Use the dedicated reset function

2017-09-14 Thread Lars-Peter Clausen
Stefan Popa <stefan.p...@analog.com> Acked-by: Lars-Peter Clausen <l...@metafoo.de> Thanks. > --- > drivers/staging/iio/adc/ad7192.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/staging/iio/adc/ad7192.c > b/drivers/stagi

Re: [PATCH] staging: iio: ad7192: Use the dedicated reset function

2017-09-14 Thread Lars-Peter Clausen
: Stefan Popa Acked-by: Lars-Peter Clausen Thanks. > --- > drivers/staging/iio/adc/ad7192.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/staging/iio/adc/ad7192.c > b/drivers/staging/iio/adc/ad7192.c > index d11c6de..6150d27 100644 > -

Re: [PATCH v2 1/2] include: linux: sysfs: Add __ATTR_NAMED macro

2017-09-13 Thread Lars-Peter Clausen
On 09/13/2017 08:58 PM, Greg KH wrote: > On Wed, Sep 13, 2017 at 06:03:10PM +0100, Jonathan Cameron wrote: >> On Wed, 13 Sep 2017 14:14:07 +0530 >> Himanshi Jain wrote: >> >>> Add __ATTR_NAMED macro similar to __ATTR but taking name as a >>> string instead of implicit

Re: [PATCH v2 1/2] include: linux: sysfs: Add __ATTR_NAMED macro

2017-09-13 Thread Lars-Peter Clausen
On 09/13/2017 08:58 PM, Greg KH wrote: > On Wed, Sep 13, 2017 at 06:03:10PM +0100, Jonathan Cameron wrote: >> On Wed, 13 Sep 2017 14:14:07 +0530 >> Himanshi Jain wrote: >> >>> Add __ATTR_NAMED macro similar to __ATTR but taking name as a >>> string instead of implicit conversion of argument to

Re: [Outreachy kernel] [PATCH] Fixed IIO_DEVICE_ATTR_NAMED API to take name as a string and added "" around names

2017-09-12 Thread Lars-Peter Clausen
On 09/12/2017 08:06 PM, Julia Lawall wrote: > > > On Tue, 12 Sep 2017, himanshi wrote: > >> Thanks for the review Daniel! I will change the imperative mood for the >> commit >> message once the other changes are finalised too and as suggested by Julia, >> would try to make the description

Re: [Outreachy kernel] [PATCH] Fixed IIO_DEVICE_ATTR_NAMED API to take name as a string and added "" around names

2017-09-12 Thread Lars-Peter Clausen
On 09/12/2017 08:06 PM, Julia Lawall wrote: > > > On Tue, 12 Sep 2017, himanshi wrote: > >> Thanks for the review Daniel! I will change the imperative mood for the >> commit >> message once the other changes are finalised too and as suggested by Julia, >> would try to make the description

Re: [Outreachy kernel] [PATCH] Fixed IIO_DEVICE_ATTR_NAMED API to take name as a string and added "" around names

2017-09-12 Thread Lars-Peter Clausen
On 09/12/2017 09:53 AM, Daniel Baluta wrote: > Hi Himanshi, > > On Tue, Sep 12, 2017 at 1:43 AM, Himanshi Jain > wrote: >> Fixed IIO_DEVICE_ATTR_NAMED API to take name as a >> string instead of implicit conversion to string using >> preprocessors. Added double quotes

Re: [Outreachy kernel] [PATCH] Fixed IIO_DEVICE_ATTR_NAMED API to take name as a string and added "" around names

2017-09-12 Thread Lars-Peter Clausen
On 09/12/2017 09:53 AM, Daniel Baluta wrote: > Hi Himanshi, > > On Tue, Sep 12, 2017 at 1:43 AM, Himanshi Jain > wrote: >> Fixed IIO_DEVICE_ATTR_NAMED API to take name as a >> string instead of implicit conversion to string using >> preprocessors. Added double quotes around names in >> existing

Re: [Outreachy kernel] Re: [PATCH] Staging: iio: adc: Added Space around binary op.

2017-09-08 Thread Lars-Peter Clausen
On 09/08/2017 11:59 AM, Julia Lawall wrote: > > > On Fri, 8 Sep 2017, Lars-Peter Clausen wrote: > >> On 09/08/2017 11:32 AM, Jonathan Cameron wrote: >>> On Fri, 8 Sep 2017 07:29:06 +0100 >>> Jonathan Cameron <ji...@jic23.retrosnub.co.uk> wrote:

Re: [Outreachy kernel] Re: [PATCH] Staging: iio: adc: Added Space around binary op.

2017-09-08 Thread Lars-Peter Clausen
On 09/08/2017 11:59 AM, Julia Lawall wrote: > > > On Fri, 8 Sep 2017, Lars-Peter Clausen wrote: > >> On 09/08/2017 11:32 AM, Jonathan Cameron wrote: >>> On Fri, 8 Sep 2017 07:29:06 +0100 >>> Jonathan Cameron wrote: >>> >>>> On

Re: [PATCH] Staging: iio: adc: Added Space around binary op.

2017-09-08 Thread Lars-Peter Clausen
On 09/08/2017 11:32 AM, Jonathan Cameron wrote: > On Fri, 8 Sep 2017 07:29:06 +0100 > Jonathan Cameron wrote: > >> On 8 September 2017 05:47:52 BST, Himanshi Jain >> wrote: >>> Added space around(one on each side of) binary >>> operator(-)

Re: [PATCH] Staging: iio: adc: Added Space around binary op.

2017-09-08 Thread Lars-Peter Clausen
On 09/08/2017 11:32 AM, Jonathan Cameron wrote: > On Fri, 8 Sep 2017 07:29:06 +0100 > Jonathan Cameron wrote: > >> On 8 September 2017 05:47:52 BST, Himanshi Jain >> wrote: >>> Added space around(one on each side of) binary >>> operator(-) as preferred according to kernel >>> coding style. >>>

Re: [PATCH 1/2] iio: ad_sigma_delta: Implement a dedicated reset function

2017-09-05 Thread Lars-Peter Clausen
analog.com> Acked-by: Lars-Peter Clausen <l...@metafoo.de> > --- > drivers/iio/adc/ad_sigma_delta.c | 28 > include/linux/iio/adc/ad_sigma_delta.h | 3 +++ > 2 files changed, 31 insertions(+) > > diff --git a/drivers/iio/adc/ad_sigma_

Re: [PATCH 1/2] iio: ad_sigma_delta: Implement a dedicated reset function

2017-09-05 Thread Lars-Peter Clausen
On 09/05/2017 02:14 PM, Dragos Bogdan wrote: > Since most of the SD ADCs have the option of reseting the serial > interface by sending a number of SCLKs with CS = 0 and DIN = 1, > a dedicated function that can do this is usefull. > > Signed-off-by: Dragos Bogdan Acked-by: Lar

Re: [PATCH 2/2] iio: ad7793: Fix the serial interface reset

2017-09-05 Thread Lars-Peter Clausen
w, it should be used instead. > > Fixes: 2edb769d246e ("iio:ad7793: Add support for the ad7798 and ad7799") > Signed-off-by: Dragos Bogdan <dragos.bog...@analog.com> Acked-by: Lars-Peter Clausen <l...@metafoo.de> > --- > drivers/iio/adc/ad7793.c | 4 ++-

Re: [PATCH 2/2] iio: ad7793: Fix the serial interface reset

2017-09-05 Thread Lars-Peter Clausen
w, it should be used instead. > > Fixes: 2edb769d246e ("iio:ad7793: Add support for the ad7798 and ad7799") > Signed-off-by: Dragos Bogdan Acked-by: Lars-Peter Clausen > --- > drivers/iio/adc/ad7793.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >

Re: Possible race in xilinx-xadc.ko

2017-08-19 Thread Lars-Peter Clausen
On 08/18/2017 05:10 PM, Anton Volkov wrote: > Hello. > > While searching for races in the Linux kernel I've come across > "drivers/iio/adc/xilinx-xadc.ko" module. Here is a question that I came up > with while analyzing results. Lines are given using the info from Linux v4.12. > > Consider the

Re: Possible race in xilinx-xadc.ko

2017-08-19 Thread Lars-Peter Clausen
On 08/18/2017 05:10 PM, Anton Volkov wrote: > Hello. > > While searching for races in the Linux kernel I've come across > "drivers/iio/adc/xilinx-xadc.ko" module. Here is a question that I came up > with while analyzing results. Lines are given using the info from Linux v4.12. > > Consider the

Re: [PATCH] iio: imu: adis16480: Fix acceleration scale factor for adis16480

2017-08-03 Thread Lars-Peter Clausen
On 08/04/2017 12:37 AM, Dragos Bogdan wrote: > According to the datasheet, the range of the acceleration is [-10 g, + 10 g], > so the scale factor should be 10 instead of 5. > > Signed-off-by: Dragos Bogdan <dragos.bog...@analog.com> Acked-by: Lars-Peter Clausen <l..

Re: [PATCH] iio: imu: adis16480: Fix acceleration scale factor for adis16480

2017-08-03 Thread Lars-Peter Clausen
On 08/04/2017 12:37 AM, Dragos Bogdan wrote: > According to the datasheet, the range of the acceleration is [-10 g, + 10 g], > so the scale factor should be 10 instead of 5. > > Signed-off-by: Dragos Bogdan Acked-by: Lars-Peter Clausen Thanks. > --- > drivers/iio/imu/adis1

Re: [PATCH 1/3] irq/irq_sim: add a simple interrupt simulator framework

2017-07-24 Thread Lars-Peter Clausen
On 07/19/2017 02:20 PM, Bartosz Golaszewski wrote: [...] > +void irq_sim_fini(struct irq_sim *sim) > +{ Not very likely to happen in practice, but for correctness we should probably put a irq_work_sync() here for each of the IRQs to make sure that the memory associated with the irq_sim_work_ctx

Re: [PATCH 1/3] irq/irq_sim: add a simple interrupt simulator framework

2017-07-24 Thread Lars-Peter Clausen
On 07/19/2017 02:20 PM, Bartosz Golaszewski wrote: [...] > +void irq_sim_fini(struct irq_sim *sim) > +{ Not very likely to happen in practice, but for correctness we should probably put a irq_work_sync() here for each of the IRQs to make sure that the memory associated with the irq_sim_work_ctx

Re: [PATCHv2] staging: iio: adc: add missing of_node references to iio_dev

2017-07-17 Thread Lars-Peter Clausen
Hi, The patch seems to be reverted? Also should this part in the IIO core take care of automatically setting the of_node of the IIO device? As far as I can see we don't have to initialize it manually. /* If the calling driver did not initialize of_node, do it here */ if

Re: [PATCHv2] staging: iio: adc: add missing of_node references to iio_dev

2017-07-17 Thread Lars-Peter Clausen
Hi, The patch seems to be reverted? Also should this part in the IIO core take care of automatically setting the of_node of the IIO device? As far as I can see we don't have to initialize it manually. /* If the calling driver did not initialize of_node, do it here */ if

Re: [PATCH] iio: Add LTC2471/LTC2473 driver

2017-06-30 Thread Lars-Peter Clausen
ff-by: Mike Looijmans <mike.looijm...@topic.nl> Looks good, thanks! Reviewed-by: Lars-Peter Clausen <l...@metafoo.de> Just two tiny nitpicks inline. > +static const struct iio_chan_spec ltc2471_channel[] = { > + { > + .type = IIO_VOLTAGE, > +

Re: [PATCH] iio: Add LTC2471/LTC2473 driver

2017-06-30 Thread Lars-Peter Clausen
ike Looijmans Looks good, thanks! Reviewed-by: Lars-Peter Clausen Just two tiny nitpicks inline. > +static const struct iio_chan_spec ltc2471_channel[] = { > + { > + .type = IIO_VOLTAGE, > + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), > +

Re: [PATCH v2] hwmon: Add LTC2471/LTC2473 driver

2017-06-29 Thread Lars-Peter Clausen
On 06/29/2017 04:11 PM, Mike Looijmans wrote: > On 29-06-17 15:40, Guenter Roeck wrote: >> On 06/29/2017 05:30 AM, Lars-Peter Clausen wrote: >>> On 06/29/2017 02:13 PM, Mike Looijmans wrote: >>>> The LTC2741 and LTC2473 are single voltage monitoring chip

Re: [PATCH v2] hwmon: Add LTC2471/LTC2473 driver

2017-06-29 Thread Lars-Peter Clausen
On 06/29/2017 04:11 PM, Mike Looijmans wrote: > On 29-06-17 15:40, Guenter Roeck wrote: >> On 06/29/2017 05:30 AM, Lars-Peter Clausen wrote: >>> On 06/29/2017 02:13 PM, Mike Looijmans wrote: >>>> The LTC2741 and LTC2473 are single voltage monitoring chip

Re: [PATCH v2] hwmon: Add LTC2471/LTC2473 driver

2017-06-29 Thread Lars-Peter Clausen
On 06/29/2017 02:13 PM, Mike Looijmans wrote: > The LTC2741 and LTC2473 are single voltage monitoring chips. The LTC2473 > is similar to the LTC2471 but outputs a signed differential value. > > Datasheet: > http://cds.linear.com/docs/en/datasheet/24713fb.pdf This looks more like a general

Re: [PATCH v2] hwmon: Add LTC2471/LTC2473 driver

2017-06-29 Thread Lars-Peter Clausen
On 06/29/2017 02:13 PM, Mike Looijmans wrote: > The LTC2741 and LTC2473 are single voltage monitoring chips. The LTC2473 > is similar to the LTC2471 but outputs a signed differential value. > > Datasheet: > http://cds.linear.com/docs/en/datasheet/24713fb.pdf This looks more like a general

Re: [PATCH] staging: iio: ad7152: Fix deadlock in ad7152_write_raw_samp_freq()

2017-05-28 Thread Lars-Peter Clausen
gt; > Found by Linux Driver Verification project (linuxtesting.org). > > Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> Looks good, thanks. Fixes: 6572389bcc11 ("staging: iio: cdc: ad7152: Implement IIO_CHAN_INFO_SAMP_FREQ attribute") Acked-by: Lars-Pete

Re: [PATCH] staging: iio: ad7152: Fix deadlock in ad7152_write_raw_samp_freq()

2017-05-28 Thread Lars-Peter Clausen
gt; > Found by Linux Driver Verification project (linuxtesting.org). > > Signed-off-by: Alexey Khoroshilov Looks good, thanks. Fixes: 6572389bcc11 ("staging: iio: cdc: ad7152: Implement IIO_CHAN_INFO_SAMP_FREQ attribute") Acked-by: Lars-Peter Clausen > --- > drivers

Re: [PATCH] misc: ad525x_dpot_spi: Add device tree support

2017-05-27 Thread Lars-Peter Clausen
Hi, Thanks for the patch. On 05/26/2017 08:17 PM, Roshni Shah wrote: > --- /dev/null > +++ b/Documentation/devicetree/bindings/misc/ad525x_dpot-spi.txt > @@ -0,0 +1,44 @@ > +Digital Potentiometers (SPI) compatible with Analog Devices family > + > +Required properties: > +- compatible: Should be

Re: [PATCH] misc: ad525x_dpot_spi: Add device tree support

2017-05-27 Thread Lars-Peter Clausen
Hi, Thanks for the patch. On 05/26/2017 08:17 PM, Roshni Shah wrote: > --- /dev/null > +++ b/Documentation/devicetree/bindings/misc/ad525x_dpot-spi.txt > @@ -0,0 +1,44 @@ > +Digital Potentiometers (SPI) compatible with Analog Devices family > + > +Required properties: > +- compatible: Should be

Re: [PATCH v2 2/2] dmaengine: dw: Remove AVR32 bits from the driver

2017-05-15 Thread Lars-Peter Clausen
On 05/15/2017 10:43 AM, Andy Shevchenko wrote: > On Sun, 2017-05-14 at 18:34 +0530, Vinod Koul wrote: >> On Tue, May 09, 2017 at 07:18:37PM +0300, Andy Shevchenko wrote: >>> AVR32 is gone. Now it's time to clean up the driver by removing >>> leftovers that was used by AVR32 related code. >> >>

Re: [PATCH v2 2/2] dmaengine: dw: Remove AVR32 bits from the driver

2017-05-15 Thread Lars-Peter Clausen
On 05/15/2017 10:43 AM, Andy Shevchenko wrote: > On Sun, 2017-05-14 at 18:34 +0530, Vinod Koul wrote: >> On Tue, May 09, 2017 at 07:18:37PM +0300, Andy Shevchenko wrote: >>> AVR32 is gone. Now it's time to clean up the driver by removing >>> leftovers that was used by AVR32 related code. >> >>

Re: [PATCH v2] iio:ad5064: Add support for ltc2633 and similar devices

2017-05-10 Thread Lars-Peter Clausen
ons, and it's 4.096V for "H" versions. > > Datasheets: > LTC2631: http://www.linear.com/docs/26553 > LTC2633: http://www.linear.com/docs/39529 > LTC2635: http://www.linear.com/docs/28754 > > Signed-off-by: Mike Looijmans <mike.looijm...@topic.nl>

Re: [PATCH v2] iio:ad5064: Add support for ltc2633 and similar devices

2017-05-10 Thread Lars-Peter Clausen
ons, and it's 4.096V for "H" versions. > > Datasheets: > LTC2631: http://www.linear.com/docs/26553 > LTC2633: http://www.linear.com/docs/39529 > LTC2635: http://www.linear.com/docs/28754 > > Signed-off-by: Mike Looijmans Reviewed-by: Lars-Peter Clausen Thanks for reworking the patch.

Re: [PATCH v2] iio: adc: Add support for TI ADC1x8s102

2017-05-03 Thread Lars-Peter Clausen
On 05/03/2017 10:43 AM, Andy Shevchenko wrote: >> + .owner = THIS_MODULE, > > This is redundant I'm pretty sure. Even in 2017, drivers keep being added that carry such assignments. Can you explain when it is needed and when not? Otherwise, I will leave it

Re: [PATCH v2] iio: adc: Add support for TI ADC1x8s102

2017-05-03 Thread Lars-Peter Clausen
On 05/03/2017 10:43 AM, Andy Shevchenko wrote: >> + .owner = THIS_MODULE, > > This is redundant I'm pretty sure. Even in 2017, drivers keep being added that carry such assignments. Can you explain when it is needed and when not? Otherwise, I will leave it

Re: Generic DMA-capable streaming device driver looking for home

2017-04-27 Thread Lars-Peter Clausen
On 04/27/2017 04:50 PM, Sinan Kaya wrote: > On 4/27/2017 10:00 AM, Jon Masters wrote: >> On 04/20/2017 06:10 PM, Alex Williams wrote: >>> Hi all, >>> >>> We're writing a device driver and having some difficulty matching a >>> subsystem to the driver/device properties. Can anyone help with >>>

Re: Generic DMA-capable streaming device driver looking for home

2017-04-27 Thread Lars-Peter Clausen
On 04/27/2017 04:50 PM, Sinan Kaya wrote: > On 4/27/2017 10:00 AM, Jon Masters wrote: >> On 04/20/2017 06:10 PM, Alex Williams wrote: >>> Hi all, >>> >>> We're writing a device driver and having some difficulty matching a >>> subsystem to the driver/device properties. Can anyone help with >>>

Re: [PATCH] iio:ad5064: Add support for ltc2633 and similar devices

2017-04-27 Thread Lars-Peter Clausen
On 04/27/2017 07:52 AM, Jonathan Cameron wrote: > On 26/04/17 10:44, Mike Looijmans wrote: >> The Linear Technology LTC2631, LTC2633 and LTC2635 are very similar >> to the AD5064 device, in particular the LTC2627. >> >> This patch adds support for those devices. Only the LTC2633 has been >>

Re: [PATCH] iio:ad5064: Add support for ltc2633 and similar devices

2017-04-27 Thread Lars-Peter Clausen
On 04/27/2017 07:52 AM, Jonathan Cameron wrote: > On 26/04/17 10:44, Mike Looijmans wrote: >> The Linear Technology LTC2631, LTC2633 and LTC2635 are very similar >> to the AD5064 device, in particular the LTC2627. >> >> This patch adds support for those devices. Only the LTC2633 has been >>

Re: [PATCH v4 net-next] mdio_bus: Issue GPIO RESET to PHYs.

2017-04-25 Thread Lars-Peter Clausen
On 04/24/2017 11:04 AM, Roger Quadros wrote: > On 24/04/17 02:35, Andrew Lunn wrote: >> On Fri, Apr 21, 2017 at 03:31:09PM +0200, Lars-Peter Clausen wrote: >>> On 04/21/2017 03:15 PM, Roger Quadros wrote: >>>> diff --git a/Documentation/devicetree/bindings/net/

Re: [PATCH v4 net-next] mdio_bus: Issue GPIO RESET to PHYs.

2017-04-25 Thread Lars-Peter Clausen
On 04/24/2017 11:04 AM, Roger Quadros wrote: > On 24/04/17 02:35, Andrew Lunn wrote: >> On Fri, Apr 21, 2017 at 03:31:09PM +0200, Lars-Peter Clausen wrote: >>> On 04/21/2017 03:15 PM, Roger Quadros wrote: >>>> diff --git a/Documentation/devicetree/bindings/net/

Re: [PATCH] iio: inkern: fix a static checker error

2017-04-25 Thread Lars-Peter Clausen
On 04/24/2017 11:32 AM, Peter Rosin wrote: > On 2017-04-20 23:13, Peter Rosin wrote: >> On 2017-04-20 23:12, Lars-Peter Clausen wrote: >>> On 04/20/2017 11:01 PM, Peter Rosin wrote: >>>> Avoid this smatch error: >>>> drivers/iio/inkern.c:751 iio_rea

Re: [PATCH] iio: inkern: fix a static checker error

2017-04-25 Thread Lars-Peter Clausen
On 04/24/2017 11:32 AM, Peter Rosin wrote: > On 2017-04-20 23:13, Peter Rosin wrote: >> On 2017-04-20 23:12, Lars-Peter Clausen wrote: >>> On 04/20/2017 11:01 PM, Peter Rosin wrote: >>>> Avoid this smatch error: >>>> drivers/iio/inkern.c:751 iio_rea

Re: [PATCH v4 net-next] mdio_bus: Issue GPIO RESET to PHYs.

2017-04-21 Thread Lars-Peter Clausen
On 04/21/2017 03:15 PM, Roger Quadros wrote: > diff --git a/Documentation/devicetree/bindings/net/mdio.txt > b/Documentation/devicetree/bindings/net/mdio.txt > new file mode 100644 > index 000..4ffbbac > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/mdio.txt > @@ -0,0 +1,33 @@ >

Re: [PATCH v4 net-next] mdio_bus: Issue GPIO RESET to PHYs.

2017-04-21 Thread Lars-Peter Clausen
On 04/21/2017 03:15 PM, Roger Quadros wrote: > diff --git a/Documentation/devicetree/bindings/net/mdio.txt > b/Documentation/devicetree/bindings/net/mdio.txt > new file mode 100644 > index 000..4ffbbac > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/mdio.txt > @@ -0,0 +1,33 @@ >

Re: [PATCH] iio: inkern: fix a static checker error

2017-04-20 Thread Lars-Peter Clausen
On 04/20/2017 11:01 PM, Peter Rosin wrote: > Avoid this smatch error: > drivers/iio/inkern.c:751 iio_read_avail_channel_raw() error: double unlock > 'mutex:>indio_dev->info_exist_lock' Looks good, but it's not just the smatch error, this is a real issue. This even seems to be a endless loop,

Re: [PATCH] iio: inkern: fix a static checker error

2017-04-20 Thread Lars-Peter Clausen
On 04/20/2017 11:01 PM, Peter Rosin wrote: > Avoid this smatch error: > drivers/iio/inkern.c:751 iio_read_avail_channel_raw() error: double unlock > 'mutex:>indio_dev->info_exist_lock' Looks good, but it's not just the smatch error, this is a real issue. This even seems to be a endless loop,

Re: [PATCH] iio: core: Fix IIO_VAL_FRACTIONAL_LOG2 for negative values

2017-04-02 Thread Lars-Peter Clausen
check this one please. It's in the category of very > risky of both Nikolaus and I have missed something! It's the same as this: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/iio/industrialio-core.c?id=171c0091837c81ed5c949fec6966bb5afff2d1cf Should be OK. Rev

Re: [PATCH] iio: core: Fix IIO_VAL_FRACTIONAL_LOG2 for negative values

2017-04-02 Thread Lars-Peter Clausen
very > risky of both Nikolaus and I have missed something! It's the same as this: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/iio/industrialio-core.c?id=171c0091837c81ed5c949fec6966bb5afff2d1cf Should be OK. Reviewed-by: Lars-Peter Clausen > > Th

Re: [PATCH v2] iio:adc: Driver for Linear Technology LTC2497 ADC

2017-04-02 Thread Lars-Peter Clausen
On 04/02/2017 11:30 AM, Jonathan Cameron wrote: > On 27/03/17 08:23, michael.henner...@analog.com wrote: >> From: Michael Hennerich >> >> This patch adds support for the Analog Devices / Linear Technology >> LTC2497 ADCs. The LTC2497 is a 16-channel (eight

Re: [PATCH v2] iio:adc: Driver for Linear Technology LTC2497 ADC

2017-04-02 Thread Lars-Peter Clausen
On 04/02/2017 11:30 AM, Jonathan Cameron wrote: > On 27/03/17 08:23, michael.henner...@analog.com wrote: >> From: Michael Hennerich >> >> This patch adds support for the Analog Devices / Linear Technology >> LTC2497 ADCs. The LTC2497 is a 16-channel (eight differential), >> 16-bit, high

Re: [Outreachy kernel] [PATCH 4/4] iio: light: si1145: Replace ternary operator with min macro

2017-03-29 Thread Lars-Peter Clausen
On 03/29/2017 02:40 PM, Julia Lawall wrote: > > > On Wed, 29 Mar 2017, simran singhal wrote: > >> Use macro min() to get the minimum of two values for brevity and >> readability. >> >> Signed-off-by: simran singhal >> --- >> drivers/iio/light/si1145.c | 2 +- >> 1

Re: [Outreachy kernel] [PATCH 4/4] iio: light: si1145: Replace ternary operator with min macro

2017-03-29 Thread Lars-Peter Clausen
On 03/29/2017 02:40 PM, Julia Lawall wrote: > > > On Wed, 29 Mar 2017, simran singhal wrote: > >> Use macro min() to get the minimum of two values for brevity and >> readability. >> >> Signed-off-by: simran singhal >> --- >> drivers/iio/light/si1145.c | 2 +- >> 1 file changed, 1

Re: [PATCH] staging: tsl2x7x: Moved contents of the header to the source file.

2017-03-23 Thread Lars-Peter Clausen
On 03/23/2017 12:53 PM, Arushi Singhal wrote: > Moved the contents of the header(tsl2x7x.h) into the source file > tsl2x7x_core.c with the exception of the platform data struct which is > supposed to be used from somewhere else other than the driver. The platform_data struct uses the other

Re: [PATCH] staging: tsl2x7x: Moved contents of the header to the source file.

2017-03-23 Thread Lars-Peter Clausen
On 03/23/2017 12:53 PM, Arushi Singhal wrote: > Moved the contents of the header(tsl2x7x.h) into the source file > tsl2x7x_core.c with the exception of the platform data struct which is > supposed to be used from somewhere else other than the driver. The platform_data struct uses the other

Re: [PATCH] staging: ad7746: Moved contents of the header to the source file.

2017-03-23 Thread Lars-Peter Clausen
On 03/23/2017 12:36 PM, Arushi Singhal wrote: > Moved the contents of the header(ad7746.h) into the source file > ad7746.c with the exception of the platform data struct which is > supposed to be used from somewhere else other than the driver. > > Signed-off-by: Arushi Singhal

Re: [PATCH] staging: ad7746: Moved contents of the header to the source file.

2017-03-23 Thread Lars-Peter Clausen
On 03/23/2017 12:36 PM, Arushi Singhal wrote: > Moved the contents of the header(ad7746.h) into the source file > ad7746.c with the exception of the platform data struct which is > supposed to be used from somewhere else other than the driver. > > Signed-off-by: Arushi Singhal > --- >

Re: [PATCH] iio/adc/ltc2497: Driver for Linear Technology LTC2497 ADC

2017-03-23 Thread Lars-Peter Clausen
The subject should follow the standard subsystem subject scheme. E.g. in this case "iio: adc: Add driver for ..." On 03/23/2017 11:35 AM, michael.henner...@analog.com wrote: > From: Michael Hennerich Needs a commit message. > > Signed-off-by: Michael Hennerich

Re: [PATCH] iio/adc/ltc2497: Driver for Linear Technology LTC2497 ADC

2017-03-23 Thread Lars-Peter Clausen
The subject should follow the standard subsystem subject scheme. E.g. in this case "iio: adc: Add driver for ..." On 03/23/2017 11:35 AM, michael.henner...@analog.com wrote: > From: Michael Hennerich Needs a commit message. > > Signed-off-by: Michael Hennerich > --- >

Re: [PATCH v2] staging: iio: Replace a bit shift by a use of BIT.

2017-03-22 Thread Lars-Peter Clausen
On 03/22/2017 09:38 AM, Arushi Singhal wrote: > This patch replaces bit shifting on 1 with the BIT(x) macro. > This was done with coccinelle: > @@ > constant c; > @@ > > -1 << c > +BIT(c) When it comes to doing this type of conversion semantics, i.e. the meaning of the value, are important. The

Re: [PATCH v2] staging: iio: Replace a bit shift by a use of BIT.

2017-03-22 Thread Lars-Peter Clausen
On 03/22/2017 09:38 AM, Arushi Singhal wrote: > This patch replaces bit shifting on 1 with the BIT(x) macro. > This was done with coccinelle: > @@ > constant c; > @@ > > -1 << c > +BIT(c) When it comes to doing this type of conversion semantics, i.e. the meaning of the value, are important. The

Re: [PATCH 4/4] iio: accel: adxl345: Add support for triggered buffer

2017-03-20 Thread Lars-Peter Clausen
On 03/15/2017 10:50 PM, Jonathan Cameron wrote: > On 13/03/17 12:16, Andy Shevchenko wrote: >> On Mon, Mar 13, 2017 at 1:11 PM, Eva Rachel Retuya >> wrote: >>> Provide an all-axes read for triggered buffering. >> >> Better description is needed. >> >>> -static int

Re: [PATCH 4/4] iio: accel: adxl345: Add support for triggered buffer

2017-03-20 Thread Lars-Peter Clausen
On 03/15/2017 10:50 PM, Jonathan Cameron wrote: > On 13/03/17 12:16, Andy Shevchenko wrote: >> On Mon, Mar 13, 2017 at 1:11 PM, Eva Rachel Retuya >> wrote: >>> Provide an all-axes read for triggered buffering. >> >> Better description is needed. >> >>> -static int adxl345_get_triple(struct

Re: [PATCH v3] staging: ad7606: Replace mlock with driver private lock

2017-03-20 Thread Lars-Peter Clausen
On 03/20/2017 07:56 PM, Arushi Singhal wrote: [...] > @@ -413,6 +413,7 @@ int ad7606_probe(struct device *dev, int irq, void > __iomem *base_address, > st = iio_priv(indio_dev); > > st->dev = dev; > + mutex_init(>lock); This is nitpicking, but putting this in the middle of the

Re: [PATCH v3] staging: ad7606: Replace mlock with driver private lock

2017-03-20 Thread Lars-Peter Clausen
On 03/20/2017 07:56 PM, Arushi Singhal wrote: [...] > @@ -413,6 +413,7 @@ int ad7606_probe(struct device *dev, int irq, void > __iomem *base_address, > st = iio_priv(indio_dev); > > st->dev = dev; > + mutex_init(>lock); This is nitpicking, but putting this in the middle of the

Re: [RESEND PATCH] staging: ad7606: Replace mlock with driver private lock

2017-03-20 Thread Lars-Peter Clausen
On 03/20/2017 04:22 PM, Arushi Singhal wrote: > The IIO subsystem is redefining iio_dev->mlock to be used by > the IIO core only for protecting device operating mode changes. > ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* modes. > > In this driver, mlock was being used to protect

Re: [RESEND PATCH] staging: ad7606: Replace mlock with driver private lock

2017-03-20 Thread Lars-Peter Clausen
On 03/20/2017 04:22 PM, Arushi Singhal wrote: > The IIO subsystem is redefining iio_dev->mlock to be used by > the IIO core only for protecting device operating mode changes. > ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* modes. > > In this driver, mlock was being used to protect

Re: [PATCH v2] ARM: zynq: Add #io-channel-cells to (x)adc node for iio-hwmon

2017-03-20 Thread Lars-Peter Clausen
On 03/20/2017 04:33 PM, Michal Simek wrote: > On 17.3.2017 07:46, Michal Simek wrote: >> On 16.3.2017 22:20, Lars-Peter Clausen wrote: >>> On 03/16/2017 07:06 PM, Michal Simek wrote: >>>> On 16.3.2017 17:51, Lars-Peter Clausen wrote: >>>>&g

Re: [PATCH v2] ARM: zynq: Add #io-channel-cells to (x)adc node for iio-hwmon

2017-03-20 Thread Lars-Peter Clausen
On 03/20/2017 04:33 PM, Michal Simek wrote: > On 17.3.2017 07:46, Michal Simek wrote: >> On 16.3.2017 22:20, Lars-Peter Clausen wrote: >>> On 03/16/2017 07:06 PM, Michal Simek wrote: >>>> On 16.3.2017 17:51, Lars-Peter Clausen wrote: >>>>&g

Re: [PATCH v2] ARM: zynq: Add #io-channel-cells to (x)adc node for iio-hwmon

2017-03-16 Thread Lars-Peter Clausen
On 03/16/2017 06:54 PM, Moritz Fischer wrote: > Hi Lars, > > On Thu, Mar 16, 2017 at 9:51 AM, Lars-Peter Clausen <l...@metafoo.de> wrote: >> On 03/16/2017 05:45 PM, Michal Simek wrote: >>> On 16.3.2017 17:39, Moritz Fischer wrote: >>>> On Thu, Mar 16

Re: [PATCH v2] ARM: zynq: Add #io-channel-cells to (x)adc node for iio-hwmon

2017-03-16 Thread Lars-Peter Clausen
On 03/16/2017 06:54 PM, Moritz Fischer wrote: > Hi Lars, > > On Thu, Mar 16, 2017 at 9:51 AM, Lars-Peter Clausen wrote: >> On 03/16/2017 05:45 PM, Michal Simek wrote: >>> On 16.3.2017 17:39, Moritz Fischer wrote: >>>> On Thu, Mar 16, 2017 at 9:16 AM,

Re: [PATCH v2] ARM: zynq: Add #io-channel-cells to (x)adc node for iio-hwmon

2017-03-16 Thread Lars-Peter Clausen
On 03/16/2017 07:06 PM, Michal Simek wrote: > On 16.3.2017 17:51, Lars-Peter Clausen wrote: >> On 03/16/2017 05:45 PM, Michal Simek wrote: >>> On 16.3.2017 17:39, Moritz Fischer wrote: >>>> On Thu, Mar 16, 2017 at 9:16 AM, Michal Simek <michal.si...@

Re: [PATCH v2] ARM: zynq: Add #io-channel-cells to (x)adc node for iio-hwmon

2017-03-16 Thread Lars-Peter Clausen
On 03/16/2017 07:06 PM, Michal Simek wrote: > On 16.3.2017 17:51, Lars-Peter Clausen wrote: >> On 03/16/2017 05:45 PM, Michal Simek wrote: >>> On 16.3.2017 17:39, Moritz Fischer wrote: >>>> On Thu, Mar 16, 2017 at 9:16 AM, Michal Simek >>>> wrote: >&

Re: [PATCH v2] ARM: zynq: Add #io-channel-cells to (x)adc node for iio-hwmon

2017-03-16 Thread Lars-Peter Clausen
On 03/16/2017 05:45 PM, Michal Simek wrote: > On 16.3.2017 17:39, Moritz Fischer wrote: >> On Thu, Mar 16, 2017 at 9:16 AM, Michal Simek >> wrote: >>> Hi, >>> >>> On 8.3.2017 21:11, Moritz Fischer wrote: Fix OF: /iio_hwmon: could not get #io-channel-cells

Re: [PATCH v2] ARM: zynq: Add #io-channel-cells to (x)adc node for iio-hwmon

2017-03-16 Thread Lars-Peter Clausen
On 03/16/2017 05:45 PM, Michal Simek wrote: > On 16.3.2017 17:39, Moritz Fischer wrote: >> On Thu, Mar 16, 2017 at 9:16 AM, Michal Simek >> wrote: >>> Hi, >>> >>> On 8.3.2017 21:11, Moritz Fischer wrote: Fix OF: /iio_hwmon: could not get #io-channel-cells for

Re: [PATCH] staging: iio: ade7753: replace mlock with driver private lock

2017-03-13 Thread Lars-Peter Clausen
On 03/13/2017 01:33 PM, SIMRAN SINGHAL wrote: > On Mon, Mar 13, 2017 at 5:30 PM, Lars-Peter Clausen <l...@metafoo.de> wrote: >> On 03/12/2017 02:32 PM, simran singhal wrote: >>> The IIO subsystem is redefining iio_dev->mlock to be used by >>> the IIO core only

Re: [PATCH] staging: iio: ade7753: replace mlock with driver private lock

2017-03-13 Thread Lars-Peter Clausen
On 03/13/2017 01:33 PM, SIMRAN SINGHAL wrote: > On Mon, Mar 13, 2017 at 5:30 PM, Lars-Peter Clausen wrote: >> On 03/12/2017 02:32 PM, simran singhal wrote: >>> The IIO subsystem is redefining iio_dev->mlock to be used by >>> the IIO core only for protecting device

Re: [PATCH] staging: adis16060_core: Use private driver lock instead of mlock

2017-03-13 Thread Lars-Peter Clausen
On 03/12/2017 02:10 PM, simran singhal wrote: > The IIO subsystem is redefining iio_dev->mlock to be used by > the IIO core only for protecting device operating mode changes. > ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* modes. > > In this driver, mlock was being used to protect

Re: [PATCH] staging: adis16060_core: Use private driver lock instead of mlock

2017-03-13 Thread Lars-Peter Clausen
On 03/12/2017 02:10 PM, simran singhal wrote: > The IIO subsystem is redefining iio_dev->mlock to be used by > the IIO core only for protecting device operating mode changes. > ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* modes. > > In this driver, mlock was being used to protect

Re: [PATCH] staging: iio: ade7753: replace mlock with driver private lock

2017-03-13 Thread Lars-Peter Clausen
On 03/12/2017 02:32 PM, simran singhal wrote: > The IIO subsystem is redefining iio_dev->mlock to be used by > the IIO core only for protecting device operating mode changes. > ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* modes. > > In this driver, mlock was being used to protect

Re: [PATCH] staging: iio: ade7753: replace mlock with driver private lock

2017-03-13 Thread Lars-Peter Clausen
On 03/12/2017 02:32 PM, simran singhal wrote: > The IIO subsystem is redefining iio_dev->mlock to be used by > the IIO core only for protecting device operating mode changes. > ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* modes. > > In this driver, mlock was being used to protect

Re: [Question] devm_kmalloc() for DMA ?

2017-03-08 Thread Lars-Peter Clausen
On 03/08/2017 10:19 PM, Russell King - ARM Linux wrote: > On Wed, Mar 08, 2017 at 09:44:17PM +0100, Lars-Peter Clausen wrote: >> On 03/08/2017 08:59 PM, Russell King - ARM Linux wrote: >>> On Wed, Mar 08, 2017 at 08:48:31PM +0100, Lars-Peter Clausen wrote: >>>>

Re: [Question] devm_kmalloc() for DMA ?

2017-03-08 Thread Lars-Peter Clausen
On 03/08/2017 10:19 PM, Russell King - ARM Linux wrote: > On Wed, Mar 08, 2017 at 09:44:17PM +0100, Lars-Peter Clausen wrote: >> On 03/08/2017 08:59 PM, Russell King - ARM Linux wrote: >>> On Wed, Mar 08, 2017 at 08:48:31PM +0100, Lars-Peter Clausen wrote: >>>>

Re: [Question] devm_kmalloc() for DMA ?

2017-03-08 Thread Lars-Peter Clausen
On 03/08/2017 07:06 PM, Masahiro Yamada wrote: > Hi Robin, > > > 2017-03-08 20:15 GMT+09:00 Robin Murphy : >> On 08/03/17 10:59, Masahiro Yamada wrote: >>> Hi experts, >>> >>> I have a question about >>> how to allocate DMA-safe buffer. >>> >>> >>> In my understanding,

Re: [Question] devm_kmalloc() for DMA ?

2017-03-08 Thread Lars-Peter Clausen
On 03/08/2017 07:06 PM, Masahiro Yamada wrote: > Hi Robin, > > > 2017-03-08 20:15 GMT+09:00 Robin Murphy : >> On 08/03/17 10:59, Masahiro Yamada wrote: >>> Hi experts, >>> >>> I have a question about >>> how to allocate DMA-safe buffer. >>> >>> >>> In my understanding, kmalloc() returns >>>

Re: [Question] devm_kmalloc() for DMA ?

2017-03-08 Thread Lars-Peter Clausen
On 03/08/2017 08:59 PM, Russell King - ARM Linux wrote: > On Wed, Mar 08, 2017 at 08:48:31PM +0100, Lars-Peter Clausen wrote: >> When the DMA memory is mapped for reading from the device the associated >> cachelines are invalidated without writeback. There is no guarantee that >

Re: [Question] devm_kmalloc() for DMA ?

2017-03-08 Thread Lars-Peter Clausen
On 03/08/2017 08:59 PM, Russell King - ARM Linux wrote: > On Wed, Mar 08, 2017 at 08:48:31PM +0100, Lars-Peter Clausen wrote: >> When the DMA memory is mapped for reading from the device the associated >> cachelines are invalidated without writeback. There is no guarantee that >

Re: [alsa-devel] [PATCH 2/3] ASoC: dio2125: add dio2125 amp driver

2017-03-07 Thread Lars-Peter Clausen
On 03/07/2017 02:13 PM, Jerome Brunet wrote: > On Tue, 2017-03-07 at 13:36 +0100, Mark Brown wrote: >> On Mon, Mar 06, 2017 at 06:44:50PM +0100, Jerome Brunet wrote: >> >>> + gpiod_set_value(priv->gpiod_enable, val); >> >> You should use gpiod_set_value_cansleep() so that the driver can work >>

Re: [alsa-devel] [PATCH 2/3] ASoC: dio2125: add dio2125 amp driver

2017-03-07 Thread Lars-Peter Clausen
On 03/07/2017 02:13 PM, Jerome Brunet wrote: > On Tue, 2017-03-07 at 13:36 +0100, Mark Brown wrote: >> On Mon, Mar 06, 2017 at 06:44:50PM +0100, Jerome Brunet wrote: >> >>> + gpiod_set_value(priv->gpiod_enable, val); >> >> You should use gpiod_set_value_cansleep() so that the driver can work >>

Re: [PATCH v3 6/6] iio: adc: stm32: add support for EXTI trigger

2017-03-03 Thread Lars-Peter Clausen
On 03/03/2017 02:00 PM, Fabrice Gasnier wrote: > On 03/03/2017 12:45 PM, Lars-Peter Clausen wrote: >> On 02/28/2017 05:51 PM, Fabrice Gasnier wrote: >>> EXTi (external interrupt) signal can be routed internally as trigger >>> source for ADC conversions: STM32F4 ADC can u

Re: [PATCH v3 6/6] iio: adc: stm32: add support for EXTI trigger

2017-03-03 Thread Lars-Peter Clausen
On 03/03/2017 02:00 PM, Fabrice Gasnier wrote: > On 03/03/2017 12:45 PM, Lars-Peter Clausen wrote: >> On 02/28/2017 05:51 PM, Fabrice Gasnier wrote: >>> EXTi (external interrupt) signal can be routed internally as trigger >>> source for ADC conversions: STM32F4 ADC can u

Re: [PATCH v3 6/6] iio: adc: stm32: add support for EXTI trigger

2017-03-03 Thread Lars-Peter Clausen
On 03/03/2017 04:46 PM, Lars-Peter Clausen wrote: > On 03/03/2017 02:00 PM, Fabrice Gasnier wrote: >> On 03/03/2017 12:45 PM, Lars-Peter Clausen wrote: >>> On 02/28/2017 05:51 PM, Fabrice Gasnier wrote: >>>> EXTi (external interrupt) signal can be routed internally

Re: [PATCH v3 6/6] iio: adc: stm32: add support for EXTI trigger

2017-03-03 Thread Lars-Peter Clausen
On 03/03/2017 04:46 PM, Lars-Peter Clausen wrote: > On 03/03/2017 02:00 PM, Fabrice Gasnier wrote: >> On 03/03/2017 12:45 PM, Lars-Peter Clausen wrote: >>> On 02/28/2017 05:51 PM, Fabrice Gasnier wrote: >>>> EXTi (external interrupt) signal can be routed internally

Re: [PATCH v3 6/6] iio: adc: stm32: add support for EXTI trigger

2017-03-03 Thread Lars-Peter Clausen
On 02/28/2017 05:51 PM, Fabrice Gasnier wrote: > EXTi (external interrupt) signal can be routed internally as trigger > source for ADC conversions: STM32F4 ADC can use EXTI11. > > Retrieve interrupt trigger from DT, so it can be muxed into ADC IP, > via extsel. Hi, Sorry, I have some trouble

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