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

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

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(_dev->dev, "rdwr", GPIOD_IN); >> +    if (IS_ERR(chip->rdwr_pin)) { >> +    ret = PTR_ERR(chip->rdwr_pin); >> +    dev_err(_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] iio: adc: Fix potential integer overflow

2018-09-24 Thread Lars-Peter Clausen
On 09/24/2018 07:18 PM, Lars-Peter Clausen wrote: > On 09/22/2018 03:42 PM, Jonathan Cameron wrote: >> On Tue, 18 Sep 2018 07:53:14 -0500 >> "Gustavo A. R. Silva" wrote: >> >>> Cast factor to s64 in order to give the compiler complete information >>

Re: [PATCH] iio: adc: Fix potential integer overflow

2018-09-24 Thread Lars-Peter Clausen
On 09/22/2018 03:42 PM, Jonathan Cameron wrote: > On Tue, 18 Sep 2018 07:53:14 -0500 > "Gustavo A. R. Silva" wrote: > >> Cast factor to s64 in order to give the compiler complete information >> about the proper arithmetic to use and avoid a potential integer >> overflow. Notice that such

Re: [PATCH 1/1] axi-i2s: set period size register

2018-08-27 Thread Lars-Peter Clausen
On 08/27/2018 06:22 PM, Luca Ceresoli wrote: > Hi, > > thanks for your feedback. > > [Adding Michal Simek (Xilinx maintainer) in Cc] > > On 27/08/2018 14:27, Lars-Peter Clausen wrote: >> On 08/24/2018 06:04 PM, Luca Ceresoli wrote: >>> The default v

Re: [PATCH 1/1] axi-i2s: set period size register

2018-08-27 Thread Lars-Peter Clausen
On 08/24/2018 06:04 PM, Luca Ceresoli wrote: > The default value of the PERIOD_LEN register is 0 and results in > axi-i2s keeping TLAST always asserted in its AXI Stream output. > > When the AXI Stream is sent to a Xilinx AXI-DMA, this results in the > DMA generating an interrupt flood and ALSA

Re: [PATCH 1/3] iio: adxl372: Provide validate_trigger and validate_device callbacks

2018-08-20 Thread Lars-Peter Clausen
On 08/20/2018 04:53 PM, Stefan Popa wrote: > This patch provides a validate_device callback for the trigger which makes > sure that other devices are rejected. > > Signed-off-by: Stefan Popa --- > drivers/iio/accel/adxl372.c | 13 + > 1 file changed, 13 insertions(+) > > diff --git

Re: [alsa-devel] [PATCH] ASoC: adav80x: mark expected switch fall-through

2018-08-09 Thread Lars-Peter Clausen
order the code to look like case 5400: if (source != ADAV80X_PLL_SRC_XIN) return -EINVAL; pll_ctrl1 |= ADAV80X_PLL_CTRL1_PLLDIV; break; It is just as many lines added when adding the /* fall through */, but it makes it more obvious what is going on. Either way: Acked-by: Lars-Peter Clausen

Re: [alsa-devel] [PATCH] ASoC: adau1761: Mark expected switch fall-though

2018-08-09 Thread Lars-Peter Clausen
ret = snd_soc_dapm_add_routes(dapm, adau1761_no_dmic_routes, >> ARRAY_SIZE(adau1761_no_dmic_routes)); >> if (ret) > > Again, are you *sure* here? Well, it says so in the comment next to it :) Acked-by: Lars-Peter Clausen

Re: [PATCH 00/46] Use dmaenginem_async_device_register to simplify code

2018-08-03 Thread Lars-Peter Clausen
On 08/03/2018 09:19 AM, Huang Shijie wrote: > All the patches are using dmaenginem_async_device_register to simplify code > except the last one: > dmaengine: add COMPILE_TEST for the drivers > > I use the last one to do the compiler test. > There are still 20 drivers which do not use the >

Re: [PATCH 3/4] iio: adc: xilinx: Check for return values in clk related functions

2018-07-19 Thread Lars-Peter Clausen
On 07/18/2018 01:12 PM, Manish Narani wrote: > This patch adds check for return values from clock related functions. > This was reported by static code analysis tool. This patch seems to do something else. > > Signed-off-by: Manish Narani > --- > drivers/iio/adc/xilinx-xadc-core.c | 24

Re: [PATCH 4/4] iio: adc: xilinx: Use devm_ functions while requesting irq

2018-07-19 Thread Lars-Peter Clausen
> @@ -1310,7 +1308,6 @@ static int xadc_remove(struct platform_device *pdev) > { > struct iio_dev *indio_dev = platform_get_drvdata(pdev); > struct xadc *xadc = iio_priv(indio_dev); > - int irq = platform_get_irq(pdev, 0); > > iio_device_unregister(indio_dev); > if

Re: [DISCUSSION] spi multi chipselect support

2018-07-18 Thread Lars-Peter Clausen
On 07/18/2018 06:35 PM, Sebastian Reichel wrote: > Hi Mark, > > Some SPI slave devices have more than one chip select [0]. Rob suggested > to use the following DT notation for this [1]: > > spi-controller { > slave@0 { > reg = <0>, <1>; > }; > }; > > I think this makes sense

Re: [PATCH 1/4] iio: adc: xilinx: Rename 'channels' variable name to 'iio_xadc_channels'

2018-07-18 Thread Lars-Peter Clausen
On 07/18/2018 01:12 PM, Manish Narani wrote: > This patch fix the following checkpatch warning in xadc driver. > - Reusing the krealloc arg is almost always a bug. > > Renamed the 'channels' variable as 'iio_xadc_channels' to fix the above > warning. > This is a bug in checkpatch and should be

Re: [PATCH 1/5] iio: adxl372: New driver for Analog Devices ADXL372 Accelerometer

2018-07-16 Thread Lars-Peter Clausen
On 07/15/2018 11:51 AM, Jonathan Cameron wrote: > On Thu, 12 Jul 2018 18:34:23 +0300 > Stefan Popa wrote: > >> This patch adds basic support for Analog Devices ADXL372 SPI-Bus >> Three-Axis Digital Accelerometer. >> >> The device is probed and configured the with some initial default >> values.

Re: [PATCH 5/5] iio:adxl372: Add filter bandwidth support

2018-07-15 Thread Lars-Peter Clausen
On 07/15/2018 12:36 PM, Jonathan Cameron wrote: > On Thu, 12 Jul 2018 18:36:58 +0300 > Stefan Popa wrote: > >> This patch adds the option for the user to select the filter bandwidth. The >> user can also read the available bandwidths which are always adjusted to be >> at most half of the

Re: [PATCH 1/2] mux:adgs1408/1409: New driver for Analog Devices ADGS1408/1409 mux …

2018-07-14 Thread Lars-Peter Clausen
On 07/14/2018 02:04 PM, Peter Rosin wrote: [...] >> +static int adgs140x_spi_reg_write(struct spi_device *spi, >> +u8 reg_addr, u8 reg_data) >> +{ >> +u8 tx_buf[2]; >> + >> +tx_buf[0] = reg_addr; >> +tx_buf[1] = reg_data; >> + >> +return

Re: [PATCH 4/5] iio:adxl372: Add sampling frequency support

2018-07-12 Thread Lars-Peter Clausen
On 07/12/2018 08:25 PM, Andy Shevchenko wrote: > On Thu, Jul 12, 2018 at 6:36 PM, Stefan Popa wrote: >> This patch adds the option for the user to select the sampling frequency. >> Also, the user can read the available frequencies and read the currently >> set frequency via the read_raw function.

Re: [PATCH] iio: add channel type for frequency

2018-07-01 Thread Lars-Peter Clausen
On 07/01/2018 04:59 AM, David Lechner wrote: > This adds a new type for frequency to the IIO channel type enumeration. > > Units are in Hz. > Documentation? We already have the altvoltage channel type with the frequency attribute. Difficult to say if there are any overlaps without

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

Re: [PATCH 16/26] dmaengine: Convert to new IDA API

2018-06-24 Thread Lars-Peter Clausen
On 06/21/2018 11:28 PM, Matthew Wilcox wrote: > Simpler and shorter code. > > Signed-off-by: Matthew Wilcox > --- [...]> { > - int rc; > - > - do { > - if (!ida_pre_get(_ida, GFP_KERNEL)) > - return -ENOMEM; > - mutex_lock(_list_mutex); > -

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

Re: Revert "dmaengine: pl330: add DMA_PAUSE feature"

2018-05-17 Thread Lars-Peter Clausen
On 05/17/2018 06:20 PM, Frank Mori Hess wrote: > Sorry to keep coming back to this, but I'm experiencing a bit of > incredulity that you are saying what you seem to be saying. You seem > to be saying dmaengine provides no way to permanently stop a transfer > safely other than transferring the

Re: Using LIBIIO sending DATA to DAC and capturing the output from DAC

2018-05-09 Thread Lars-Peter Clausen
Same question was also posted on the ADI support forums, we'll discuss it there since this is a ADI product specific question. See https://ez.analog.com/thread/106116 On 05/09/2018 03:14 AM, Randy Dunlap wrote: > [adding linux-iio mailing list] > > On 05/08/2018 06:12 PM, jarul wrote: >> I

Re: [PATCH v2] dmaengine: axi-dmac: Request IRQ with IRQF_SHARED

2018-04-27 Thread Lars-Peter Clausen
On 04/27/2018 05:15 PM, Moritz Fischer wrote: > Hi Vinod, > > On Fri, Apr 27, 2018 at 12:08 AM, Vinod Koul <vinod.k...@intel.com> wrote: >> On Fri, Apr 27, 2018 at 08:53:39AM +0200, Lars-Peter Clausen wrote: >>> On 04/27/2018 07:11 AM, Vinod Koul wrote: >>&

Re: [PATCH v2] dmaengine: axi-dmac: Request IRQ with IRQF_SHARED

2018-04-27 Thread Lars-Peter Clausen
les usecases where the line is shared. > >> >> Acked-by: Lars-Peter Clausen <l...@metafoo.de> >> Signed-off-by: Moritz Fischer <m...@kernel.org> >> --- >> Changes from v1: >> - Added Lars' Acked-by >> - Dropped patch [1/2] and changed accordingl

Re: [PATCH 2/2] dmaengine: axi-dmac: Request IRQ with IRQF_SHARED

2018-04-26 Thread Lars-Peter Clausen
On 04/26/2018 06:12 PM, Moritz Fischer wrote: > Request IRQ with IRQF_SHARED flag. This works since the interrupt > handler already checks if there is an actual IRQ pending and returns > IRQ_NONE otherwise. > > Signed-off-by: Moritz Fischer <m...@kernel.org> Acked-by:

Re: [PATCH 1/2] dmaengine: axi-dmac: Use devm_request_irq()

2018-04-26 Thread Lars-Peter Clausen
On 04/26/2018 06:12 PM, Moritz Fischer wrote: > Use devm_request_irq() instead of request_irq() to request the IRQ. > > Signed-off-by: Moritz Fischer > --- > > Hi Lars, > > was there a specific reason not to use devm_request_irq() ? Yes, it is wrong :) This reorders the

Re: [RFC 2/6] dmaengine: xilinx_dma: Pass AXI4-Stream control words to netdev dma client

2018-04-18 Thread Lars-Peter Clausen
On 04/18/2018 08:31 AM, Peter Ujfalusi wrote: > > On 2018-04-17 18:54, Lars-Peter Clausen wrote: >> On 04/17/2018 04:53 PM, Peter Ujfalusi wrote: >>> On 2018-04-17 16:58, Lars-Peter Clausen wrote: >>>>>> There are two options. >>>>>> >&g

Re: [PATCH v3 06/11] iio: inkern: add module put/get on iio dev module when requesting channels

2018-04-18 Thread Lars-Peter Clausen
umer will fail ungraciously. >> >> This is the root of the issue. The consumer should be prepared to handle >> errors from producer. >> >>> I can change the perspective from "best effort" to "mandatory" to get a >>> refere

Re: [RFC 2/6] dmaengine: xilinx_dma: Pass AXI4-Stream control words to netdev dma client

2018-04-17 Thread Lars-Peter Clausen
On 04/17/2018 04:53 PM, Peter Ujfalusi wrote: > On 2018-04-17 16:58, Lars-Peter Clausen wrote: >>>> There are two options. >>>> >>>> Either you extend the generic interfaces so it can cover your usecase in a >>>> generic way. E.g. the ability t

Re: [RFC 2/6] dmaengine: xilinx_dma: Pass AXI4-Stream control words to netdev dma client

2018-04-17 Thread Lars-Peter Clausen
On 04/17/2018 05:42 PM, Vinod Koul wrote: > On Tue, Apr 17, 2018 at 04:46:43PM +0300, Peter Ujfalusi wrote: > >> @@ -709,6 +709,11 @@ struct dma_filter { >> * be called after period_len bytes have been transferred. >> * @device_prep_interleaved_dma: Transfer expression in a generic way. >>

Re: [RFC 2/6] dmaengine: xilinx_dma: Pass AXI4-Stream control words to netdev dma client

2018-04-17 Thread Lars-Peter Clausen
On 04/17/2018 03:46 PM, Peter Ujfalusi wrote: > On 2018-04-17 15:54, Lars-Peter Clausen wrote: >> On 04/17/2018 01:43 PM, Radhey Shyam Pandey wrote: >>> Hi Vinod, >>> >>>> -Original Message- >>>> From: Vinod Koul [mailto:vinod.k...@inte

Re: [RFC 2/6] dmaengine: xilinx_dma: Pass AXI4-Stream control words to netdev dma client

2018-04-17 Thread Lars-Peter Clausen
On 04/17/2018 01:43 PM, Radhey Shyam Pandey wrote: > Hi Vinod, > >> -Original Message- >> From: Vinod Koul [mailto:vinod.k...@intel.com] >> Sent: Wednesday, April 11, 2018 2:39 PM >> To: Radhey Shyam Pandey >> Cc: dan.j.willi...@intel.com; michal.si...@xilinx.com;

Re: [PATCH 5/5] dmaengine: sprd: Add 'device_config' and 'device_prep_slave_sg' interfaces

2018-04-17 Thread Lars-Peter Clausen
On 04/10/2018 09:46 AM, Baolin Wang wrote: [...] > +static int sprd_dma_slave_config(struct dma_chan *chan, > + struct dma_slave_config *config) > +{ > + struct sprd_dma_chn *schan = to_sprd_dma_chan(chan); > + struct sprd_dma_config *slave_cfg = > +

Re: [PATCH 2/2] iio: afe: unit-converter: add support for adi,lt6106

2018-04-13 Thread Lars-Peter Clausen
On 04/13/2018 12:31 AM, Peter Rosin wrote: > On 2018-04-12 17:35, Andrew F. Davis wrote: >> On 04/12/2018 09:29 AM, Peter Rosin wrote: >>> On 2018-04-11 18:13, Andrew F. Davis wrote: >>>> On 04/11/2018 10:51 AM, Lars-Peter Clausen wrote: >>>>>

Re: [PATCH 2/2] iio: afe: unit-converter: add support for adi,lt6106

2018-04-11 Thread Lars-Peter Clausen
On 04/11/2018 05:43 PM, Andrew F. Davis wrote: > On 04/11/2018 09:15 AM, Peter Rosin wrote: >> This is a current sense amplifier from Analog Devices. >> >> Signed-off-by: Peter Rosin >> --- >> drivers/iio/afe/Kconfig | 3 +- >> drivers/iio/afe/iio-unit-converter.c

Re: [GIT PULL] USB/PHY driver patches for 4.17-rc1

2018-04-05 Thread Lars-Peter Clausen
On 04/05/2018 08:31 AM, Kees Cook wrote: > On Wed, Apr 4, 2018 at 3:31 AM, Greg KH <gre...@linuxfoundation.org> wrote: >> Lars-Peter Clausen (2): >> usb: gadget: ffs: Execute copy_to_user() with USER_DS set > > https://git.kernel.org/linus/4058ebf33cb0be88ca516f96

Re: [PATCH 1/1] dmaengine:jz4740:fix memory leak

2018-04-04 Thread Lars-Peter Clausen
On 04/04/2018 05:21 AM, Xidong Wang wrote: > In function jz4740_dma_probe(), the memory allocated by > clk_get() is not released on the error path that ret, which holds > the return value of dma_async_device_register(), is not NULL. > This will result in a memory leak bug. > > Signed-off-by:

Re: Nokia N900: v4.16-rc4: oops in iio when grepping sysfs

2018-03-10 Thread Lars-Peter Clausen
On 03/10/2018 12:01 AM, Pavel Machek wrote: [...] >> What file are you opening to cause this? > > Strace says: > > openat(7, "in_intensity_both_thresh_rising_en", >>> O_RDONLY|O_LARGEFILE|O_NOFOLLOW) = 3 > fstat64(3, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0 > ioctl(3, SNDCTL_TMR_TIMEBASE

Re: [PATCH v2 3/5] [RFT] ARM: dts: wheat: Fix ADV7513 address usage

2018-02-12 Thread Lars-Peter Clausen
On 02/12/2018 07:11 PM, Kieran Bingham wrote: [...] > + /* > + * The adv75xx resets its addresses to defaults during low power power > + * mode. Because we have two ADV7513 devices on the same bus, we must > + * change both of them away from the defaults so that they do not > +

Re: [PATCH v3 1/2] iio: adc: driver for ti adc081s/adc101s/adc121s

2018-01-26 Thread Lars-Peter Clausen
On 01/26/2018 07:19 PM, Andy Shevchenko wrote: > On Sun, Jan 14, 2018 at 10:32 PM, Milan Stevanovic > wrote: >> Add Linux device driver for TI single-channel CMOS >> 8/10/12-bit analog-to-digital converter with a >> high-speed serial interface. >> >>

Re: [PATCH v3 1/2] iio: adc: driver for ti adc081s/adc101s/adc121s

2018-01-26 Thread Lars-Peter Clausen
On 01/26/2018 07:25 PM, Lars-Peter Clausen wrote: > On 01/26/2018 07:19 PM, Andy Shevchenko wrote: >> On Sun, Jan 14, 2018 at 10:32 PM, Milan Stevanovic >> <milan.o.stevano...@gmail.com> wrote: >>> Add Linux device driver for TI single-channel CMOS >>

Re: [PATCH v3 1/2] iio: adc: driver for ti adc081s/adc101s/adc121s

2018-01-26 Thread Lars-Peter Clausen
On 01/26/2018 07:19 PM, Andy Shevchenko wrote: > On Sun, Jan 14, 2018 at 10:32 PM, Milan Stevanovic > wrote: >> Add Linux device driver for TI single-channel CMOS >> 8/10/12-bit analog-to-digital converter with a >> high-speed serial interface. >> >>

Re: [PATCH 1/2] regmap: fix NULL pointer dereference in regmap_name_read_file()

2018-01-24 Thread Lars-Peter Clausen
On 01/23/2018 11:53 PM, David Lechner wrote: > This fixes a possible NULL pointer dereference oops in > regmap_name_read_file() when the regmap does not have a device > associated with it. > > Signed-off-by: David Lechner > --- > drivers/base/regmap/regmap-debugfs.c | 6

Re: [PATCH 2/2] drm: adv7511: Add support for i2c_new_secondary_device

2018-01-22 Thread Lars-Peter Clausen
On 01/22/2018 01:50 PM, Kieran Bingham wrote: > The ADV7511 has four 256-byte maps that can be accessed via the main I²C > ports. Each map has it own I²C address and acts as a standard slave > device on the I²C bus. > > Allow a device tree node to override the default addresses so that > address

Re: [PATCH] iio: adc: driver for ti adc081s/adc101s/adc121s

2018-01-13 Thread Lars-Peter Clausen
On 01/12/2018 09:38 PM, Milan Stevanovic wrote: > From cb437dd49444fb12897f88ccf485369e6ed3184e Mon Sep 17 00:00:00 2001 > From: Milan Stevanovic > Date: Sun, 7 Jan 2018 21:44:33 +0100 > Subject: [PATCH] iio: adc: driver for ti adc081s/adc101s/adc121s > >     Add

Re: PM regression in next

2018-01-12 Thread Lars-Peter Clausen
On 01/12/2018 01:30 PM, Rafael J. Wysocki wrote: > On Friday, January 12, 2018 1:23:54 PM CET Rafael J. Wysocki wrote: >> On Friday, January 12, 2018 2:32:57 AM CET Tony Lindgren wrote: >>> * Tony Lindgren [180111 17:20]: Well I tried to measure suspend power consumption

Re: [PATCH 1/5] iio: buffer: use permission specific variants of DEVICE_ATTR

2018-01-06 Thread Lars-Peter Clausen
On 01/06/2018 01:35 PM, Jonathan Cameron wrote: > On Thu, 4 Jan 2018 20:07:14 +0530 > Aishwarya Pant wrote: > >> This is a clean-up patch which replaces DEVICE_ATTR macro with the file >> permission specific DEVICE_ATTR_{RO/WO/RW} macros for compaction and >> readability.

Re: [alsa-devel] WARNING in snd_pcm_hw_param_first

2018-01-01 Thread Lars-Peter Clausen
On 01/01/2018 10:03 AM, Takashi Iwai wrote: [...] >> CPU: 0 PID: 3502 Comm: syzkaller781065 Not tainted 4.15.0-rc5+ #154 >> Hardware name: Google Google Compute Engine/Google Compute Engine, >> BIOS Google 01/01/2011 >> Call Trace: >> __dump_stack lib/dump_stack.c:17 [inline] >>

Re: [PATCH 3/3] regmap: duplicate the name string stored in regmap

2017-12-13 Thread Lars-Peter Clausen
On 12/13/2017 10:28 AM, Bartosz Golaszewski wrote: > Currently we just copy over the pointer passed to regmap_init() in > the regmap config struct. To be on the safe side: duplicate the string > so that if an unaware user passes an address to a stack-allocated > buffer, we won't crash. > >

Re: [PATCH] regmap: allow to disable all locking mechanisms

2017-12-12 Thread Lars-Peter Clausen
On 12/06/2017 03:26 PM, Bartosz Golaszewski wrote: [...] > + * @disable_locking: This regmap is either protected by external means or > + * is guaranteed not be be accessed from multiple threads. To guarantee this you need to make sure that a regmap instance with this flag set

Re: [PATCH v2 1/3] Input: ad7897 - use managed allocated resources

2017-11-08 Thread Lars-Peter Clausen
On 11/08/2017 03:04 PM, Andi Shyti wrote: > Use managed allocated resources to simplify error handling during > probing failure and module exiting. > > With this all the goto labels in the probe function together with > the cleanups in the remove function are unnecessary, therefore > removed. >

Re: [PATCH v3] iio : Add cm3218 smbus ara and acpi support

2017-10-30 Thread Lars-Peter Clausen
On 10/30/2017 11:54 AM, Lars-Peter Clausen wrote: > On 10/27/2017 03:20 PM, Marc CAPDEVILLE wrote: >> On asus T100, Capella cm3218 chip is implemented as ambiant light >> sensor. This chip expose an smbus ARA protocol device on standard >> address 0x0c. The chip is not functio

Re: [PATCH v3] iio : Add cm3218 smbus ara and acpi support

2017-10-30 Thread Lars-Peter Clausen
On 10/27/2017 03:20 PM, Marc CAPDEVILLE wrote: > On asus T100, Capella cm3218 chip is implemented as ambiant light > sensor. This chip expose an smbus ARA protocol device on standard > address 0x0c. The chip is not functional before all alerts are > acknowledged. > On asus T100, this device is

Re: [PATCH 3/3] spi: spi-axi: take extra controller reference before deregistration

2017-10-30 Thread Lars-Peter Clausen
is code be replicated in other > drivers. > > Cc: Lars-Peter Clausen <l...@metafoo.de> > Signed-off-by: Johan Hovold <jo...@kernel.org> Acked-by: Lars-Peter Clausen <l...@metafoo.de> Thanks.

Re: [PATCH v2] iio: dummy: evgen: use irq_sim

2017-09-29 Thread Lars-Peter Clausen
On 09/28/2017 12:56 PM, Bartosz Golaszewski wrote: > Switch to using the recently added interrupt simulator for dummy irqs. > > Signed-off-by: Bartosz Golaszewski <b...@bgdev.pl> Reviewed-by: Lars-Peter Clausen <l...@metafoo.de> Tested-by: Lars-Peter Clausen <l...@meta

Re: [PATCH] iio: dummy: evgen: use irq_sim

2017-09-28 Thread Lars-Peter Clausen
On 09/27/2017 09:23 PM, Bartosz Golaszewski wrote: >>> return ret; >>> - } >>> - iio_evgen->chip.name = iio_evgen_name; >>> - iio_evgen->chip.irq_mask = _dummy_event_irqmask; >>> - iio_evgen->chip.irq_unmask = _dummy_event_irqunmask; >>> - for (i = 0; i <

Re: [PATCH] iio: dummy: evgen: use irq_sim

2017-09-27 Thread Lars-Peter Clausen
On 09/26/2017 06:49 PM, Bartosz Golaszewski wrote: > Switch to using the recently added interrupt simulator for dummy irqs. > > Signed-off-by: Bartosz Golaszewski Thanks for doing this. [...] > static int iio_dummy_evgen_create(void) > { > - int ret, i; > + int ret; >

Re: [alsa-devel] [PATCH] ASoC: dapm: Fix typos in comment

2017-09-27 Thread Lars-Peter Clausen
On 09/27/2017 04:35 PM, Peng Donglin wrote: > Signed-off-by: Peng Donglin > --- > sound/soc/soc-dapm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c > index dcef67a..0867eaa 100644 > ---

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

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 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: [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] 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: [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 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 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: 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 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: [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 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] 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] 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] 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: 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: [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] 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] 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 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: [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: [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] 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 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 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

  1   2   3   4   5   6   7   8   9   10   >