Re: [PATCH 01/10] spi: spi-axi-spi-engine: remove usage of delay_usecs

2021-03-09 Thread Lars-Peter Clausen
On 3/10/21 8:16 AM, Alexandru Ardelean wrote: On Mon, 8 Mar 2021 at 18:42, Lars-Peter Clausen wrote: On 3/8/21 3:54 PM, Alexandru Ardelean wrote: The 'delay_usecs' field was handled for backwards compatibility in case there were some users that still configured SPI delay transfers

Re: [PATCH 01/10] spi: spi-axi-spi-engine: remove usage of delay_usecs

2021-03-08 Thread Lars-Peter Clausen
On 3/8/21 3:54 PM, Alexandru Ardelean wrote: The 'delay_usecs' field was handled for backwards compatibility in case there were some users that still configured SPI delay transfers with this field. They should all be removed by now. Signed-off-by: Alexandru Ardelean --- drivers/spi/spi-axi-s

Re: static analysis bug report in drivers/staging/iio/dac/ad5380.c

2019-08-15 Thread Lars-Peter Clausen
On 8/15/19 12:21 PM, Colin Ian King wrote: > Hi, > > Static analysis with Coverity Scan has detected a potential assignment > bug in ad5380.c: > > 217case IIO_CHAN_INFO_CALIBBIAS: > 218ret = regmap_read(st->regmap, > AD5380_REG_OFFSET(chan->address), > 219

Re: [PATCH] staging: iio: ad7780: update voltage on read

2018-10-25 Thread Lars-Peter Clausen
On 10/25/2018 04:55 PM, Himanshu Jha wrote: > On Thu, Oct 25, 2018 at 11:26:36AM -0300, Renato Lui Geh wrote: >> Hi, >> >> Thanks for the quick review. :) >> >>> But please create one patch per issue and do not put unrelated changes into >>> the same patch. >> >> Should I resend this patch as a pat

Re: [PATCH] staging: iio: ad7780: update voltage on read

2018-10-25 Thread Lars-Peter Clausen
On 10/25/2018 03:32 PM, Renato Lui Geh wrote: > The ad7780 driver previously did not read the correct device output. > This patch fixes two issues. > > - The driver read an outdated value set at initialization. It now > updates its voltage on read. > - Variable val subtracted an uninitialized valu

Re: [PATCH 1/2] staging: iio: ad7606: Move out of staging

2018-10-18 Thread Lars-Peter Clausen
On 10/18/2018 02:55 PM, Dan Carpenter wrote: > On Thu, Oct 18, 2018 at 12:10:32PM +0300, Stefan Popa wrote: >> +static int ad7606_read_samples(struct ad7606_state *st) >> +{ >> +unsigned int num = st->chip_info->num_channels; >> +u16 *data = st->data; >> +int ret; >> + >> +/* >> +

Re: [PATCH v2] staging: iio: ad7816: Switch to the gpio descriptor interface

2018-10-18 Thread Lars-Peter Clausen
On 10/18/2018 09:28 AM, Phil Reid wrote: [...] >> +    chip->rdwr_pin = devm_gpiod_get(&spi_dev->dev, "rdwr", GPIOD_IN); >> +    if (IS_ERR(chip->rdwr_pin)) { >> +    ret = PTR_ERR(chip->rdwr_pin); >> +    dev_err(&spi_dev->dev, "Failed to request rdwr GPIO: %d\n", >> +    ret); >>

Re: [PATCH v2] staging: iio: ad7816: Switch to the gpio descriptor interface

2018-10-17 Thread Lars-Peter Clausen
On 10/17/2018 04:47 PM, Nishad Kamdar wrote: > Use the gpiod interface for rdwr_pin, convert_pin and busy_pin > instead of the deprecated old non-descriptor interface. > > Signed-off-by: Nishad Kamdar Acked-by: Lars-Peter Clausen Thanks. > --- > Changes in v2: > - Corre

Re: [PATCH] staging: iio: ad7816: Switch to the gpio descriptor interface

2018-10-16 Thread Lars-Peter Clausen
On 10/16/2018 04:46 PM, Nishad Kamdar wrote: > Use the gpiod interface for rdwr_pin, convert_pin and busy_pin > instead of the deprecated old non-descriptor interface. > > Signed-off-by: Nishad Kamdar Hi, Thanks for the patch, this looks good. One thing about the error messages though. > +

Re: [PATCH 1/2] staging: iio: cdc: ad7150: use pointer to shorten the line length

2018-10-04 Thread Lars-Peter Clausen
On 10/01/2018 09:33 PM, Slawomir Stepien wrote: > By using the pointer to channel attribute, we can now make the lines > short enough to eliminate the checkpatch.pl problem: > > CHECK: Alignment should match open parenthesis > > Signed-off-by: Slawomir Stepien Hi, Thanks for the patch. Thi

Re: [PATCH] staging: iio: adc: add missing spaces around minus sign

2018-10-01 Thread Lars-Peter Clausen
On 10/01/2018 02:52 PM, Dan Carpenter wrote: > On Mon, Oct 01, 2018 at 02:28:34PM +0200, Slawomir Stepien wrote: >> The checkpatch.pl tool detected coding style problem: >> >> CHECK: spaces preferred around that '-' (ctx:VxV) >> >> in two files inside the adc directory. This patch will remove t

Re: [PATCH] staging:iio:adc:ad7280a: Use GFP_ATOMIC in interrupt handler

2018-06-28 Thread Lars-Peter Clausen
On 06/29/2018 01:55 AM, Karim Eshapa wrote: > Use GFP_ATOMIC rather GFP_KERNEL in interrupt handler, > as GFP_KERNEL may sleep according to slab allocator. This is a threaded interrupt. Sleeping is OK. > > Signed-off-by: Karim Eshapa > --- > drivers/staging/iio/adc/ad7280a.c | 2 +- > 1 file c

Re: [PATCH] staging:iio:adc:ad7816: Backward resources cleanups in probe

2018-06-18 Thread Lars-Peter Clausen
On 06/19/2018 01:38 AM, Karim Eshapa wrote: > Backward cleanups for all resources allocated in probing > in case of failure at any regestering or allocation step. Hi, Thanks for the patch. Resources that are allocated with devm_ are freed automatically in case of an error, so this patch should n

Re: [PATCH 1/3] Staging: iio: adis16209: Use SPDX identifier

2018-02-18 Thread Lars-Peter Clausen
On 02/18/2018 01:02 PM, Jonathan Cameron wrote: > On Sun, 18 Feb 2018 17:07:57 +0530 > Shreeya Patel wrote: > >> On Sun, 2018-02-18 at 17:01 +0530, Himanshu Jha wrote: >>> Hi Shreeya, >>> >> Hi Himanshu, >> >>> On Sat, Feb 17, 2018 at 09:34:56PM +0530, Shreeya Patel wrote: Use SPDX

Re: [PATCH 1/3] Staging: iio: adis16209: Use SPDX identifier

2018-02-18 Thread Lars-Peter Clausen
On 02/18/2018 01:08 PM, Lars-Peter Clausen wrote: > On 02/18/2018 01:02 PM, Jonathan Cameron wrote: >> On Sun, 18 Feb 2018 17:07:57 +0530 >> Shreeya Patel wrote: >> >>> On Sun, 2018-02-18 at 17:01 +0530, Himanshu Jha wrote: >>>> Hi Shreeya, >>>

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
tefan 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 conversion of argument to str

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 speci

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 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(-) as preferred according to kernel >>> coding style. >>>

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 (!indio_dev->dev.

Re: New Driver for electrical energy measurement

2017-07-14 Thread Lars-Peter Clausen
On 07/14/2017 11:00 AM, Guenter Roeck wrote: > On 07/14/2017 01:07 AM, Jonathan Cameron wrote: >> On Wed, 12 Jul 2017 15:19:40 +0200 >> Christian Gromm wrote: >> >>> On Wed, 12 Jul 2017 14:51:01 +0200 >>> Greg KH wrote: >>> On Wed, Jul 12, 2017 at 02:18:54PM +0200, Christian Gromm wrote: >>>

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

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 > --- > drivers/st

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 B

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(&st->lock); This is nitpicking, but putting this in the middle of t

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 hardware

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 hardware

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 hardware

Re: [PATCH v2] staging: iio: accel: Move header file content to source file

2017-02-28 Thread Lars-Peter Clausen
On 02/28/2017 08:32 PM, SIMRAN SINGHAL wrote: > On Wed, Mar 1, 2017 at 12:53 AM, Jonathan Cameron wrote: >> On 28/02/17 19:17, Jonathan Cameron wrote: >>> On 28/02/17 18:51, simran singhal wrote: The contents of the header file are used only by this single source file. Move content into

Re: [PATCH v2] iio: trigger: free trigger resource correctly

2017-01-22 Thread Lars-Peter Clausen
On 01/22/2017 03:25 PM, Jonathan Cameron wrote: > On 20/01/17 03:47, Alison Schofield wrote: >> These stand-alone trigger drivers were using iio_trigger_put() >> where they should have been using iio_trigger_free(). The >> iio_trigger_put() adds a module_put which is bad since they >> never did a

Re: [PATCH v4] staging: iio: ad7606: replace range/range_available with corresponding scale

2017-01-07 Thread Lars-Peter Clausen
to hold the available scale values. > > Signed-off-by: Eva Rachel Retuya Looks good, thanks. Acked-by: Lars-Peter Clausen ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v3 2/2] staging: iio: ad7606: move out of staging

2017-01-02 Thread Lars-Peter Clausen
On 12/30/2016 09:16 PM, Jonathan Cameron wrote: > On 11/12/16 02:47, Eva Rachel Retuya wrote: >> Move the ad7606 driver from staging/iio/adc to iio/adc. Also, update the >> corresponding Makefile and Kconfig associated with the change. >> >> Signed-off-by: Eva Rachel Retuya > Personally (and this

Re: [PATCH v3 1/2] staging: iio: ad7606: replace range/range_available with corresponding scale

2017-01-02 Thread Lars-Peter Clausen
n improvement over the current situation. But there is still the open issue that we don't know the scale setting if pin is hardwired. I'd like to see that addressed before the driver is moved out of staging. Similar for the oversampling ratio. Consider this Acked-by: Lars-Peter Clausen

Re: [PATCH 1/6] staging: iio: set proper supply name to devm_regulator_get()

2016-11-01 Thread Lars-Peter Clausen
On 11/01/2016 05:03 AM, Matt Ranostay wrote: > On Mon, Oct 31, 2016 at 10:04 AM, Eva Rachel Retuya > wrote: >> The name passed to devm_regulator_get() should match the name of the >> supply as specified in the device datasheet. This makes it clear what >> power supply is being referred to in case

Re: [PATCH v3] staging: iio: cdc: ad7746: add additional config defines

2016-10-30 Thread Lars-Peter Clausen
ff-by: Eva Rachel Retuya > Looks good to me. > > Lars could you sanity check this one as well? Acked-by: Lars-Peter Clausen ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: iio: cdc: ad7746: set ret on IIO_VOLTAGE case

2016-10-25 Thread Lars-Peter Clausen
On 10/25/2016 08:44 PM, Colin King wrote: > From: Colin Ian King > > For a IIO_VOLTAGE case, ret is not being set causing an > uninitialized value being returned by ad7746_read_raw. Fix > this by setting ret to IIO_VAL_INT for this specific case. > > Signed-off-by: Colin Ian King Arnd did beat

Re: [PATCH] [v2] staging: iio: ad5933: avoid uninitialized variable in error case

2016-10-25 Thread Lars-Peter Clausen
in this function [-Wmaybe-uninitialized] >> >> This adds minimal error handling so we only evaluate the >> data if it was correctly read. >> >> Link: https://patchwork.kernel.org/patch/8110281/ >> Signed-off-by: Arnd Bergmann > Looks good to me. > >

Re: [PATCH v2] stagging:iio:ad9834: add devicetree property support

2016-09-19 Thread Lars-Peter Clausen
On 09/18/2016 10:52 AM, Gwenhael Goavec-Merou wrote: [...] > +#if defined(CONFIG_OF) > +static struct ad9834_platform_data *ad9834_parse_dt(struct spi_device *spi) > +{ > + struct ad9834_platform_data *pdata; > + struct device_node *np = spi->dev.of_node; > + > + pdata = devm_kzalloc(&s

Re: [PATCH] stagging:iio:ad9834: add devicetree property support

2016-09-12 Thread Lars-Peter Clausen
Hi, Thanks for the patch. On 09/11/2016 12:52 PM, Gwenhael Goavec-Merou wrote: > +static struct ad9834_platform_data *ad9834_parse_dt(struct spi_device *spi) > +{ > + struct ad9834_platform_data *pdata; > + struct device_node *np = spi->dev.of_node; > + > + pdata = devm_kzalloc(&spi->

Re: [PATCH v2] staging: iio: ad5933: fix order of cycle conditions

2016-06-11 Thread Lars-Peter Clausen
on the Table 13 at the bottom of Page 25 of the Data Sheet: >> http://www.analog.com/media/en/technical-documentation/data-sheets/AD5933.pdf >> >> Signed-off-by: Luis de Bethencourt >> Reviewed-by: Lars-Peter Clausen > While Lars did review, it I'm not seeing a

Re: [PATCH] staging: iio: ad5933: fix handling of settling time cycles

2016-06-01 Thread Lars-Peter Clausen
On 06/01/2016 05:55 PM, Luis de Bethencourt wrote: > Correctly handle the settling time cycles value. The else branch was an > impossible condition (> 1022 in the else branch of > 511) and the handling > of the values was dividing by 2 and 4, with a left shift, instead of > multiplying. > > Based

Re: [PATCH v2] staging: iio: ad7606: use iio_device_{claim|release}_direct_mode()

2016-04-06 Thread Lars-Peter Clausen
On 04/06/2016 06:11 AM, Alison Schofield wrote: > Replace the code that guarantees the device stays in direct mode with > iio_device_{claim|release}_direct_mode() which does same. > > Signed-off-by: Alison Schofield Looks good, thanks. Acked-by: Lars-Peter Clausen > ---

Re: [PATCH] staging: iio: ad7606: use iio_device_{claim|release}_direct_mode()

2016-04-06 Thread Lars-Peter Clausen
On 04/03/2016 11:09 AM, Jonathan Cameron wrote: > On 01/04/16 17:53, Alison Schofield wrote: >> Two instances are moved to the new claim/release API: >> >> In the first instance, the driver was using mlock followed by >> iio_buffer_enabled(). Replace that code with the new API to guarantee >> the d

Re: [PATCH v5 21/50] mtd: nand: jz4740: switch to mtd_ooblayout_ops

2016-03-30 Thread Lars-Peter Clausen
On 03/30/2016 06:14 PM, Boris Brezillon wrote: > Implementing the mtd_ooblayout_ops interface is the new way of exposing > ECC/OOB layout to MTD users. > > Signed-off-by: Boris Brezillon Acked-by: Lars-Peter Clausen ___ devel mai

Re: [RFC PATCH 1/2] iio: core: implement iio_{claim|release}_direct_mode()

2016-03-02 Thread Lars-Peter Clausen
On 03/01/2016 08:02 PM, Alison Schofield wrote: > It is often the case that the driver wants to be sure a device stays > in direct mode while it is executing a task or series of tasks. To > accomplish this today, the driver performs this sequence: 1) take the > device state lock, 2)verify it is no

Re: [PATCH 2/2] Staging: iio: adc: Prefer using the BIT macro

2016-02-08 Thread Lars-Peter Clausen
On 02/08/2016 07:48 AM, Bhumika Goyal wrote: > This patch replaces bit shifting on 1 with the BIT(x) macro. > > This was done with coccinelle: > > @@ int g; @@ > > -(1 << g) > +BIT(g) > > Signed-off-by: Bhumika Goyal Hi, Thanks for the patch. This looks good. > --- > drivers/staging/iio/ad

Re: [PATCH 1/2] Staging:iio:Prefer using BIT macro

2016-02-08 Thread Lars-Peter Clausen
On 02/08/2016 07:48 AM, Bhumika Goyal wrote: > This patch replaces bit shifting on 1 with the BIT(x) macro. > This was done with coccinelle: > @@ int g; @@ > -(1 << g) > +BIT(g) > > Signed-off-by: Bhumika Goyal Hi, Thanks for the patch. > --- > drivers/staging/iio/adc/ad7816.c | 2 +- > 1 fi

Re: [RFC PATCH 1/2] iio: hmc5843 Add channel attribute for bias configuration

2016-02-04 Thread Lars-Peter Clausen
On 02/04/2016 03:50 PM, Cristina Moraru wrote: > Replace non standard meas_conf attribute with the standard IIO > calibbias attribute. > > API for setting bias measurement configuration: > > 0 - Normal measurement configuration (default): In normal measurement > configuration the device follo

Re: [PATCH 1/2] staging:iio:adc:added space around '-'

2016-01-30 Thread Lars-Peter Clausen
On 01/30/2016 04:12 PM, Dan Carpenter wrote: > We could make checkpatch.pl not complain if the line says checkpatch: on > it. It would look like this. > > - in_voltage-voltage_thresh_low_value, > + in_voltage-voltage_thresh_low_value, /* checkpatch: not math > */ > >

Re: [PATCH] staging: iio: ad5933: avoid uninitialized variable in error case

2016-01-30 Thread Lars-Peter Clausen
On 01/30/2016 03:18 PM, Jonathan Cameron wrote: > On 25/01/16 15:50, Arnd Bergmann wrote: >> The ad5933_i2c_read function returns an error code to indicate >> whether it could read data or not. However ad5933_work() ignores >> this return code and just accesses the data unconditionally, >> which ge

[PATCH resend] staging: rts5208: Remove unnecessary synchronize_irq() before free_irq()

2016-01-30 Thread Lars-Peter Clausen
. Patch was generated using the following semantic patch: // @@ expression irq; @@ -synchronize_irq(irq); free_irq(irq, ...); // Signed-off-by: Lars-Peter Clausen --- drivers/staging/rts5208/rtsx.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging

Re: [PATCH 1/2] staging:iio:adc:added space around '-'

2016-01-24 Thread Lars-Peter Clausen
On 01/24/2016 05:36 PM, Jonathan Cameron wrote: > On 20/01/16 14:21, Dan Carpenter wrote: >> On Fri, Jan 15, 2016 at 09:15:52PM +0100, Lars-Peter Clausen wrote: >>> On 01/15/2016 08:42 PM, Bhumika Goyal wrote: >>>> This patch adds apace around '-&

Re: [PATCH 1/2] staging:iio:adc:added space around '-'

2016-01-15 Thread Lars-Peter Clausen
On 01/15/2016 08:42 PM, Bhumika Goyal wrote: > This patch adds apace around '-' operator.Found using checkpatch.pl > > Signed-off-by: Bhumika Goyal > --- > drivers/staging/iio/adc/ad7280a.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/iio/adc/ad72

[PATCH] staging: rts5208: Remove unnecessary synchronize_irq() before free_irq()

2015-11-21 Thread Lars-Peter Clausen
. Patch was generated using the following semantic patch: // @@ expression irq; @@ -synchronize_irq(irq); free_irq(irq, ...); // Signed-off-by: Lars-Peter Clausen --- drivers/staging/rts5208/rtsx.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging

Re: [PATCH] Staging: iio: iio_simple_dummy_buffer: Typo in comments area

2015-11-14 Thread Lars-Peter Clausen
On 11/14/2015 03:44 AM, Nizam Haider wrote: > Fix simple typo in comments > > Signed-off-by: Nizam Haider Thanks for the patch. > --- > drivers/staging/iio/iio_simple_dummy_buffer.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/iio/iio_simple_dummy_b

Re: [PATCH] staging: iio: adc: fix comment block coding style issue

2015-10-04 Thread Lars-Peter Clausen
On 10/03/2015 08:32 PM, Hugo Camboulive wrote: > This patch to ad7746.c makes the comment block end with a */ > on a separate line. > > Signed-off-by: Hugo Camboulive > --- > drivers/staging/iio/cdc/ad7746.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/stagin

Re: [PATCH 1/2] Staging: iio: cdc: Prefer using the BIT macro

2015-09-26 Thread Lars-Peter Clausen
On 09/25/2015 07:23 PM, Shraddha Barke wrote: > Replace bit shifting on 1 with the BIT(x) macro > > Signed-off-by: Shraddha Barke Acked-by: Lars-Peter Clausen ___ devel mailing list de...@linuxdriverproject

Re: [PATCH 2/2] Staging: iio: cdc: Remove unnecessary dev_info

2015-09-26 Thread Lars-Peter Clausen
On 09/25/2015 07:23 PM, Shraddha Barke wrote: > Remove dev_info as the information can be obtained by other means > > Signed-off-by: Shraddha Barke Acked-by: Lars-Peter Clausen ___ devel mailing list de...@linuxdriverproject

Re: [PATCH 05/19] staging: iio: Remove unnecessary externs

2015-08-15 Thread Lars-Peter Clausen
On 08/15/2015 09:57 PM, Jonathan Cameron wrote: > On 11/08/15 19:43, Lars-Peter Clausen wrote: >> On 08/10/2015 11:51 PM, Joe Perches wrote: >>> Using 'extern' is not necessary for function prototypes. >>> >>> Signed-off-by: Joe Perches >>

Re: [PATCH v2] staging: iio: hmc5843: Set iio name dynamically

2015-08-12 Thread Lars-Peter Clausen
gt; > With this patch, the iio name will be the same as the i2c device name > > Signed-off-by: Yong Li Looks good. Reviewed-by: Lars-Peter Clausen ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v1] staging: iio: hmc5843: Set iio name dynamically based on i2c name

2015-08-12 Thread Lars-Peter Clausen
On 08/12/2015 10:20 AM, sdliy...@gmail.com wrote: > From: Yong Li > > Load the driver using the below command: > echo hmc5983 0x1e > /sys/bus/i2c/devices/i2c-?/new_device > > In sysfs, the iio name is hmc5843, however the i2c name is hmc5983, > they are inconsistent. > > With this patch, the ii

Re: [PATCH 05/19] staging: iio: Remove unnecessary externs

2015-08-11 Thread Lars-Peter Clausen
On 08/10/2015 11:51 PM, Joe Perches wrote: > Using 'extern' is not necessary for function prototypes. > > Signed-off-by: Joe Perches Acked-by: Lars-Peter Clausen Thanks. > --- > drivers/staging/iio/meter/ade7854.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 de

Re: [PATCH] staging: iio: ad7606_par: Constify platform_device_id

2015-05-02 Thread Lars-Peter Clausen
On 05/01/2015 05:43 PM, Krzysztof Kozlowski wrote: The platform_device_id is not modified by the driver and core uses it as const. Signed-off-by: Krzysztof Kozlowski Acked-by: Lars-Peter Clausen Thanks. --- drivers/staging/iio/adc/ad7606_par.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH] staging: iio: ad2s1200: Fix sign extension

2015-01-23 Thread Lars-Peter Clausen
is promoted to int before the inner shift. sign_extend32 works equally well for 8 and 16 bits types, so use that. Signed-off-by: Rasmus Villemoes Acked-by: Lars-Peter Clausen ___ devel mailing list de...@linuxdriverproject.org http://driverdev.

Re: [PATCH] staging: iio: ad5933: fix format string warnings

2015-01-20 Thread Lars-Peter Clausen
int'. [drivers/staging/iio/impedance-analyzer/ad5933.c:367]: (warning) %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'. [drivers/staging/iio/impedance-analyzer/ad5933.c:367]: (warning) %d in format string (no. 4) requires 'int' b

[PATCH] staging: virtpci: Remove no-op suspend/resume functions

2015-01-11 Thread Lars-Peter Clausen
The virtpci bus driver still uses the legacy suspend/resume callbacks. In their current implementation these callbacks only contain a macro that always expands to 'do { } while(0)'. So instead of converting them to dev PM ops just remove them. Signed-off-by: Lars-Peter Clausen --

Re: [PATCH 1/2] iio: Add support for waveform output

2014-12-01 Thread Lars-Peter Clausen
On 12/01/2014 03:57 PM, George McCollister wrote: On Wed, Nov 26, 2014 at 4:06 PM, Lars-Peter Clausen wrote: On 11/26/2014 10:45 PM, George McCollister wrote: Output can be held high or low for a specified period of time. Support for waveform capture could be added in the future. That

Re: [PATCH 1/2] iio: Add support for waveform output

2014-11-26 Thread Lars-Peter Clausen
On 11/26/2014 10:45 PM, George McCollister wrote: Output can be held high or low for a specified period of time. Support for waveform capture could be added in the future. That's a PWM device? ___ devel mailing list de...@linuxdriverproject.org http:

Re: [PATCH] staging: iio: adc: mxs-lradc.c: sparse warning of incorrect type

2014-09-04 Thread Lars-Peter Clausen
On 09/04/2014 07:12 PM, Sudip Mukherjee wrote: On Thu, Sep 04, 2014 at 06:50:05PM +0200, Lars-Peter Clausen wrote: On 09/04/2014 06:45 PM, Sudip Mukherjee wrote: fixed sparse warning : incorrect type in argument 1 (different address spaces) Signed-off-by: Sudip

Re: [PATCH] staging: iio: adc: mxs-lradc.c: sparse warning of incorrect type

2014-09-04 Thread Lars-Peter Clausen
On 09/04/2014 06:45 PM, Sudip Mukherjee wrote: fixed sparse warning : incorrect type in argument 1 (different address spaces) Signed-off-by: Sudip Mukherjee --- drivers/staging/iio/adc/mxs-lradc.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --g

Re: [PATCH] staging:iio: moved platform_data into include/linux/iio

2014-08-25 Thread Lars-Peter Clausen
On 08/25/2014 01:49 PM, Sharma, Sanjeev wrote: -Original Message- From: Lars-Peter Clausen [mailto:l...@metafoo.de] Sent: Monday, August 25, 2014 1:39 PM To: Sharma, Sanjeev; sanjeev sharma Cc: ji...@kernel.org; gregkh; linux-...@vger.kernel.org; devel; linux-kernel Subject: Re: [PATCH

Re: [PATCH] staging:iio: moved platform_data into include/linux/iio

2014-08-25 Thread Lars-Peter Clausen
A few of them are OK codestyle wise, but do have ABI issues which need to be resolved before they can be moved. - Lars Regards Sanjeev Sharma -Original Message- From: Lars-Peter Clausen [mailto:l...@metafoo.de] Sent: Wednesday, August 20, 2014 12:20 PM To: sanjeev sharma Cc: S

Re: [PATCH] staging:iio: moved platform_data into include/linux/iio

2014-08-19 Thread Lars-Peter Clausen
On 08/20/2014 08:44 AM, sanjeev sharma wrote: Hi, This was the action item(TO-DO). IMO, it make sense to move into include/linux/iio because IIO complete subsystem may take some time. The code that is in staging is not supposed to 'leak' outside of staging. So either you move the driver as a

Re: [PATCH] staging:iio: moved platform_data into include/linux/iio

2014-08-19 Thread Lars-Peter Clausen
On 08/20/2014 08:41 AM, Sanjeev Sharma wrote: This is a patch to the iio which will move all platform_data into include/linux/iio. It should be moved together with the driver. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxd

Re: [PATCH] staging: iio: adis16203: Use devm_iio_device_register

2014-07-17 Thread Lars-Peter Clausen
On 07/17/2014 10:40 PM, Himangi Saraogi wrote: This patch introduces the use of iio_device_register and does away with the call to the corressponding unregister function in the probe and remove functions of the driver respectively. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall No, yo

Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-17 Thread Lars-Peter Clausen
On 07/17/2014 11:20 AM, Arnd Bergmann wrote: On Thursday 17 July 2014 09:27:58 Chen Gang wrote: gfp_t gfp_mask, unsigned int order); extern void devm_free_pages(struct device *dev, unsigned long addr); +#ifdef CONFIG_HAS_IOMEM void __iomem *devm_ior

Re: question regarding drivers/staging/iio/adc/ad7280a.c

2014-07-16 Thread Lars-Peter Clausen
On 07/15/2014 07:31 PM, Jonathan Cameron wrote: On 14/07/14 21:31, Himangi Saraogi wrote: Hi, The code seems to have a memory leak. The function ad7280_attr_init calls kasprintf a number of times, which calls kmalloc (or more precisely kmalloc_track_caller), but this data does not ever seem to

Re: [PATCH v3 2/5] staging:iio:hmc5843: Split hmc5843.c to multiple files

2014-07-14 Thread Lars-Peter Clausen
On 07/08/2014 03:39 PM, Josef Gajdusek wrote: [...] diff --git a/drivers/staging/iio/magnetometer/Kconfig b/drivers/staging/iio/magnetometer/Kconfig index ad88d61..28c2612 100644 --- a/drivers/staging/iio/magnetometer/Kconfig +++ b/drivers/staging/iio/magnetometer/Kconfig @@ -5,15 +5,23 @@ menu

Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-14 Thread Lars-Peter Clausen
On 07/14/2014 10:31 AM, Richard Weinberger wrote: Am 13.07.2014 22:17, schrieb Greg Kroah-Hartman: On Sun, Jul 13, 2014 at 09:33:38PM +0200, Richard Weinberger wrote: Maybe we could add COMPILE_TEST to the version string too? Just to detect such kernels fast in user bug reports... What kind o

Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Lars-Peter Clausen
On 07/13/2014 04:03 PM, Richard Weinberger wrote: Am 13.07.2014 15:56, schrieb Lars-Peter Clausen: On 07/13/2014 03:40 PM, Richard Weinberger wrote: Am 13.07.2014 15:26, schrieb Lars-Peter Clausen: On 07/13/2014 11:45 AM, Richard Weinberger wrote: Am 13.07.2014 11:27, schrieb Lennox Wu: As

Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Lars-Peter Clausen
On 07/13/2014 03:40 PM, Richard Weinberger wrote: Am 13.07.2014 15:26, schrieb Lars-Peter Clausen: On 07/13/2014 11:45 AM, Richard Weinberger wrote: Am 13.07.2014 11:27, schrieb Lennox Wu: As I said before, some configurations don't make sense. If such a configuration can be achieved

Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Lars-Peter Clausen
On 07/13/2014 11:45 AM, Richard Weinberger wrote: Am 13.07.2014 11:27, schrieb Lennox Wu: As I said before, some configurations don't make sense. If such a configuration can be achieved using allmod/yesconfig it has to be fixed. Chen's fixes seem reasonable as not all architectures support io

Re: [PATCH v2] iio:trigger: Introduce the use of devm_kzalloc

2014-07-07 Thread Lars-Peter Clausen
On 07/07/2014 02:52 PM, Julia Lawall wrote: On Mon, 7 Jul 2014, Jonathan Cameron wrote: On 01/07/14 22:19, Himangi Saraogi wrote: This patch introduces the use of the managed version of kzalloc and removes the kfrees in the probe and remove functions. More return paths are added and the labels

Re: [PATCH v2] iio:trigger: Introduce the use of devm_kzalloc

2014-07-07 Thread Lars-Peter Clausen
-by: Himangi Saraogi Looks sane, but I'd like an ack or reviewed-by from someone as Analog for this one. cc'd Lars and Michael. Acked-by: Lars-Peter Clausen Thanks. ___ devel mailing list de...@linuxdriverprojec

Re: [PATCH] staging: iio: Introduce the use of devm_ioremap_resource

2014-07-07 Thread Lars-Peter Clausen
: Himangi Saraogi Acked-by: Julia Lawall Again, looks superficially fine, but I'd like an ack from someone at Analog ideally. Cc'd Lars Acked-by: Lars-Peter Clausen Thanks. ___ devel mailing list de...@linuxdriverprojec

Re: [PATCH 2/2] gpio: gpiolib: set gpiochip_remove retval to void

2014-06-09 Thread Lars-Peter Clausen
On 06/09/2014 01:18 AM, Ben Dooks wrote: On Fri, May 30, 2014 at 08:16:59PM +0200, Lars-Peter Clausen wrote: On 05/30/2014 07:33 PM, David Daney wrote: On 05/30/2014 04:39 AM, Geert Uytterhoeven wrote: On Fri, May 30, 2014 at 1:30 PM, abdoulaye berthe wrote: --- a/drivers/gpio/gpiolib.c

Re: [PATCH 2/2] gpio: gpiolib: set gpiochip_remove retval to void

2014-05-31 Thread Lars-Peter Clausen
On 05/31/2014 01:29 AM, Greg KH wrote: On Fri, May 30, 2014 at 08:16:59PM +0200, Lars-Peter Clausen wrote: On 05/30/2014 07:33 PM, David Daney wrote: On 05/30/2014 04:39 AM, Geert Uytterhoeven wrote: On Fri, May 30, 2014 at 1:30 PM, abdoulaye berthe wrote: --- a/drivers/gpio/gpiolib.c +++ b

Re: [PATCH 2/2] gpio: gpiolib: set gpiochip_remove retval to void

2014-05-30 Thread Lars-Peter Clausen
On 05/30/2014 07:33 PM, David Daney wrote: On 05/30/2014 04:39 AM, Geert Uytterhoeven wrote: On Fri, May 30, 2014 at 1:30 PM, abdoulaye berthe wrote: --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1263,10 +1263,9 @@ static void gpiochip_irqchip_remove(struct gpio_chip *gpiochip)

Re: [PATCH] fix some coding style in drivers/staging/iio

2014-03-21 Thread Lars-Peter Clausen
[...] diff --git a/drivers/staging/iio/accel/adis16220_core.c b/drivers/staging/iio/accel/adis16220_core.c index 6f38ca9..31c7a9d 100644 --- a/drivers/staging/iio/accel/adis16220_core.c +++ b/drivers/staging/iio/accel/adis16220_core.c @@ -392,7 +392,8 @@ static const struct iio_info adis16220_in

Re: [PATCH 2/2] staging: iio: replace strict_strto*() with kstrto*()

2013-07-23 Thread Lars-Peter Clausen
On 07/23/2013 01:26 PM, Dan Carpenter wrote: > On Tue, Jul 23, 2013 at 07:19:03PM +0900, Jingoo Han wrote: >> diff --git a/drivers/staging/iio/trigger/iio-trig-bfin-timer.c >> b/drivers/staging/iio/trigger/iio-trig-bfin-timer.c >> index 38a158b..03766bb 100644 >> --- a/drivers/staging/iio/trigger/