[PATCH v2 6/9] iio: adc: at91-sama5d2_adc: use devm_iio_triggered_buffer_setup_ext()

2020-09-29 Thread Alexandru Ardelean
This change switches to the new devm_iio_triggered_buffer_setup_ext() function and removes the iio_buffer_set_attrs() call, for assigning the HW FIFO attributes to the buffer. Signed-off-by: Alexandru Ardelean --- drivers/iio/adc/at91-sama5d2_adc.c | 12 1 file changed, 8

[PATCH v2 5/9] iio: accel: bmc150: use iio_triggered_buffer_setup_ext()

2020-09-29 Thread Alexandru Ardelean
This change switches to the new iio_triggered_buffer_setup_ext() function and removes the iio_buffer_set_attrs() call, for assigning the HW FIFO attributes to the buffer. Signed-off-by: Alexandru Ardelean --- drivers/iio/accel/bmc150-accel-core.c | 25 ++--- 1 file changed

[PATCH v2 1/9] iio: buffer: dmaengine: unwrap the use of iio_buffer_set_attrs()

2020-09-29 Thread Alexandru Ardelean
The iio_buffer_set_attrs() helper will be removed in this series. So, just assign the attributes of the DMAEngine buffer logic directly. This is IIO buffer core context, so there is direct access to the buffer->attrs object. Signed-off-by: Alexandru Ardelean --- drivers/iio/buffer/industria

[PATCH v2 9/9] iio: buffer: remove iio_buffer_set_attrs() helper

2020-09-29 Thread Alexandru Ardelean
The iio_buffer_set_attrs() is no longer used in the drivers, so it can be removed now. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-buffer.c | 12 include/linux/iio/buffer.h| 3 --- 2 files changed, 15 deletions(-) diff --git a/drivers/iio/industrialio

[PATCH v2 3/9] iio: triggered-buffer: add {devm_}iio_triggered_buffer_setup_ext variants

2020-09-29 Thread Alexandru Ardelean
is what this change does. At this moment, buffers allocated with {devm_}iio_triggered_buffer_setup() are the only ones in mainline IIO to call iio_buffer_set_attrs(). Signed-off-by: Alexandru Ardelean --- .../buffer/industrialio-triggered-buffer.c| 31 --- include/li

[PATCH v2 7/9] iio: cros_ec: use devm_iio_triggered_buffer_setup_ext()

2020-09-29 Thread Alexandru Ardelean
This change switches to the new devm_iio_triggered_buffer_setup_ext() function and removes the iio_buffer_set_attrs() call, for assigning the HW FIFO attributes to the buffer. Signed-off-by: Alexandru Ardelean --- .../common/cros_ec_sensors/cros_ec_sensors_core.c | 15 +-- 1 file

[PATCH v2 8/9] iio: hid-sensors: use iio_triggered_buffer_setup_ext()

2020-09-29 Thread Alexandru Ardelean
This change switches to the new iio_triggered_buffer_setup_ext() function and removes the iio_buffer_set_attrs() call, for assigning the HW FIFO attributes to the buffer. Signed-off-by: Alexandru Ardelean --- .../common/hid-sensors/hid-sensor-trigger.c | 22 --- 1 file changed

[PATCH v2 2/9] iio: adc: at91-sama5d2_adc: merge buffer & trigger init into a function

2020-09-29 Thread Alexandru Ardelean
to the parent device vs the IIO device object. Also, the new at91_adc_buffer_and_trigger_init() function was moved after the definition of the 'at91_adc_fifo_attributes'. Signed-off-by: Alexandru Ardelean --- drivers/iio/adc/at91-sama5d2_adc.c | 78 ++ 1 file changed, 36

[PATCH 2/2] iio: adc: at91_adc: const-ify some driver data

2020-09-28 Thread Alexandru Ardelean
), but that cast is not touched in this patch, since the old platform_data should be removed/cleaned-away. Also, that cast deals with converting a kernel_ulong_t type to a pointer. So, updating that cast doesn't yield any benefit. Signed-off-by: Alexandru Ardelean --- drivers/iio/adc/at91_adc.c | 8

[PATCH 1/2] iio: adc: at91_adc: use of_device_get_match_data() helper

2020-09-28 Thread Alexandru Ardelean
E_TEST dependency to driver"), which put this driver on the lkp's bot radar. Reported-by: kernel test robot Signed-off-by: Alexandru Ardelean --- drivers/iio/adc/at91_adc.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/iio/adc/at91_adc.c b/drivers/ii

Re: [RFC PATCH 0/5] iio: remove iio_buffer_set_attrs() and assign buffer attrs during alloc

2020-09-28 Thread Alexandru Ardelean
On Sat, Sep 26, 2020 at 7:20 PM Jonathan Cameron wrote: > > On Fri, 25 Sep 2020 11:37:38 +0300 > Alexandru Ardelean wrote: > > > I've been mulling this over for a while, and I am still not 100% convinced > > that this is the best approach, but this feels closer to someth

[RFC PATCH 5/5] iio: remove iio_buffer_set_attrs() and assign buffer attrs during alloc

2020-09-25 Thread Alexandru Ardelean
to place iio_buffer_set_attrs() inside IIO core. Signed-off-by: Alexandru Ardelean --- drivers/iio/accel/adxl372.c | 5 ++-- drivers/iio/accel/bmc150-accel-core.c | 19 -- drivers/iio/adc/at91-sama5d2_adc.c| 25 +++ .../buffer

[RFC PATCH 0/5] iio: remove iio_buffer_set_attrs() and assign buffer attrs during alloc

2020-09-25 Thread Alexandru Ardelean
s 6 arguments, which feels a bit much Alexandru Ardelean (5): [1] iio: cros_ec: unify hw fifo attributes into the core file [2] iio: buffer: dmaengine: unwrap the use of iio_buffer_set_attrs() [3] iio: triggered-buffer: add sysfs buffer attributes as args for setup [4] iio: buffer: extend

[RFC PATCH 2/5] iio: buffer: dmaengine: unwrap the use of iio_buffer_set_attrs()

2020-09-25 Thread Alexandru Ardelean
The iio_buffer_set_attrs() helper will be re-purposed. So, just assign the attributes of the DMAEngine buffer logic directly. This is IIO buffer core context, so there should be access to the buffer->attrs object. Signed-off-by: Alexandru Ardelean --- drivers/iio/buffer/industrialio-buf

[RFC PATCH 4/5] iio: buffer: extend arg list for {devm_}iio_triggered_buffer_setup()

2020-09-25 Thread Alexandru Ardelean
extra attributes. On the other hand, it's not a good idea to enforce that the extra attributes be assigned to all IIO buffers. Some may not need/want them. Signed-off-by: Alexandru Ardelean --- drivers/iio/accel/adxl372.c | 2 +- drivers/iio/accel/bma180.c

[RFC PATCH 1/5] iio: cros_ec: unify hw fifo attributes into the core file

2020-09-25 Thread Alexandru Ardelean
uffers at some point. Right now, the current IIO framework works fine for the '1 IIO device == 1 IIO buffer' case (that is now). Signed-off-by: Alexandru Ardelean --- drivers/iio/accel/cros_ec_accel_legacy.c | 2 +- .../iio/common/cros_ec_sensors/cros_ec_lid_angle.c| 3 ++- drive

[RFC PATCH 3/5] iio: triggered-buffer: add sysfs buffer attributes as args for setup

2020-09-25 Thread Alexandru Ardelean
() are the only ones in mainline IIO to call iio_buffer_set_attrs(), and this works well for the single-buffer-per-IIO-device case. Signed-off-by: Alexandru Ardelean --- drivers/iio/buffer/industrialio-triggered-buffer.c | 12 +--- include/linux/iio/triggered_buffer.h | 7 +-- 2

Re: [PATCH v3 6/6] clk: axi-clkgen: Add support for FPGA info

2020-09-24 Thread Alexandru Ardelean
On Thu, Sep 24, 2020 at 5:21 PM Moritz Fischer wrote: > > On Thu, Sep 24, 2020 at 09:50:12AM +0300, Alexandru Ardelean wrote: > > From: Mircea Caprioru > > > > This patch adds support for vco maximum and minimum ranges in accordance > > with fpga speed grade, volta

[PATCH 2/3] iio: Kconfig: Provide title for IIO_TRIGGERED_EVENT symbol

2020-09-24 Thread Alexandru Ardelean
to be selected by potentially unused/un-needed drivers. Albeit, the IIO_TRIGGERED_EVENT is used by a single mainline driver, this could allow for some out-of-tree drivers to use this kmod. This change adds a title to the IIO_TRIGGERED_EVENT Kconfig symbol. Signed-off-by: Alexandru Ardelean --- drivers/iio

[PATCH 0/3] iio: add titles to some Kconfig symbols

2020-09-24 Thread Alexandru Ardelean
ible that for some out-of-tree drivers this could be useful. Alexandru Ardelean (3): iio: dma-buffer: Kconfig: Provide titles for IIO DMA Kconfig symbols iio: Kconfig: Provide title for IIO_TRIGGERED_EVENT symbol iio: buffer: Kconfig: add title for IIO_TRIGGERED_BUFFER symbol drivers/iio/Kco

[PATCH 3/3] iio: buffer: Kconfig: add title for IIO_TRIGGERED_BUFFER symbol

2020-09-24 Thread Alexandru Ardelean
to be selected by potentially unused/un-needed drivers. This change adds a title to the IIO_TRIGGERED_BUFFER Kconfig symbol. Signed-off-by: Alexandru Ardelean --- drivers/iio/buffer/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/buffer/Kconfig b/drivers/iio/buffer

[PATCH 1/3] iio: dma-buffer: Kconfig: Provide titles for IIO DMA Kconfig symbols

2020-09-24 Thread Alexandru Ardelean
to be selected by potentially unused/un-needed drivers. This change adds titles to the IIO DMA Kconfig symbols to address this. This change also updates DMAengine -> DMAEngine, which is the correct/nitpick-y name of the framework. Signed-off-by: Alexandru Ardelean --- drivers/iio/buffer/Kconfig

[PATCH] iio: adc: at91-sama5d2_adc: merge buffer & trigger init into a function

2020-09-24 Thread Alexandru Ardelean
to the parent device vs the IIO device object. Also, the new at91_adc_buffer_and_trigger_init() function was moved after the definition of the 'at91_adc_fifo_attributes'. Signed-off-by: Alexandru Ardelean --- drivers/iio/adc/at91-sama5d2_adc.c | 78 ++ 1 file changed, 36

[PATCH] iio: core: centralize ioctl() calls to the main chardev

2020-09-24 Thread Alexandru Ardelean
-alexandru.ardel...@analog.com/ Patch 2: iio: core: use new common ioctl() mechanism Link: https://lore.kernel.org/linux-iio/20200427131100.50845-7-alexandru.ardel...@analog.com/ Signed-off-by: Alexandru Ardelean --- Note: since this is a change to the IIO core, we don't need to put this in right now

[PATCH v3 3/4] iio: adc: ad9467: add support for AD9265 high-speed ADC

2020-09-24 Thread Alexandru Ardelean
-by: Michael Hennerich Signed-off-by: Alexandru Ardelean --- drivers/iio/adc/ad9467.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/iio/adc/ad9467.c b/drivers/iio/adc/ad9467.c index 54a5864bc698..19a45dd43796 100644 --- a/drivers/iio/adc/ad9467.c +++ b

[PATCH v3 2/4] iio: adc: ad9467: add support for AD9434 high-speed ADC

2020-09-24 Thread Alexandru Ardelean
output data timing. Link: https://www.analog.com/media/en/technical-documentation/data-sheets/AD9434.pdf The driver supports the same register set as the AD9467, so the support for this chip is added to the 'ad9467' driver. Signed-off-by: Michael Hennerich Signed-off-by: Alexandru Ardelean

[PATCH v3 4/4] dt-bindings: iio: ad9467: add entries for for AD9434 & AD9265 ADCs

2020-09-24 Thread Alexandru Ardelean
Add entries for the AD9434 & AD9265 high-speed ADCs which are supported by the 'ad9467' driver. Better describe the family of ADCs similar to AD9467 in the description. Signed-off-by: Alexandru Ardelean --- .../devicetree/bindings/iio/adc/adi,ad9467.yaml | 15 --- 1 file cha

[PATCH v3 1/4] iio: adc: ad9467: wrap a axi-adc chip-info into a ad9467_chip_info type

2020-09-24 Thread Alexandru Ardelean
, they are updated in a single place and propagated in both switch statements. Signed-off-by: Alexandru Ardelean --- drivers/iio/adc/ad9467.c | 62 +++- 1 file changed, 29 insertions(+), 33 deletions(-) diff --git a/drivers/iio/adc/ad9467.c b/drivers/iio/adc/ad9467

[PATCH v3 0/4] iio: adc: ad9467: add support for AD9434 & AD9265

2020-09-24 Thread Alexandru Ardelean
* merge dt-bindings patches from v2 into a single one * polish the dt-bindings docs to better cover/describe new parts Changelog v1 -> v2: * add AD9265 support * wrap axi-adc chip-info, to also define vref_mask & default_output_mode in the chip-info table Alexandru Ardelean (2): iio:

Re: [PATCH v2 3/5] dt-bindings: iio: ad9467: add entry for for AD9434 ADC

2020-09-24 Thread Alexandru Ardelean
On Wed, Sep 23, 2020 at 11:42 PM Jonathan Cameron wrote: > > On Tue, 22 Sep 2020 16:25:57 +0300 > Alexandru Ardelean wrote: > > > Add entry for the AD9434 high-speed ADC which is supported by the 'ad9467' > > driver. > > > > Signed-off-by: Alexandru Ardele

Re: [PATCH 1/2 v2] iio: event: use short-hand variable in iio_device_{un}register_eventset functions

2020-09-24 Thread Alexandru Ardelean
On Wed, Sep 23, 2020 at 11:13 PM Jonathan Cameron wrote: > > On Mon, 21 Sep 2020 13:31:55 +0300 > Alexandru Ardelean wrote: > > > With the recent 'iio_dev_opaque' variable name, these two functions are > > looking a bit ugly. > > > > This change uses an 'ev_i

[PATCH v3 3/6] clk: axi-clkgen: add support for ZynqMP (UltraScale)

2020-09-24 Thread Alexandru Ardelean
From: Dragos Bogdan This IP core also works and is supported on the Xilinx ZynqMP (UltraScale) FPGA boards. This patch enables the driver to be available on these platforms as well. Signed-off-by: Dragos Bogdan Signed-off-by: Alexandru Ardelean --- drivers/clk/Kconfig | 2 +- 1 file changed

[PATCH v3 6/6] clk: axi-clkgen: Add support for FPGA info

2020-09-24 Thread Alexandru Ardelean
, which are stored in the 'include/linux/fpga/adi-axi-common.h' file as they are common to all ADI FPGA cores. Signed-off-by: Mircea Caprioru Signed-off-by: Alexandru Ardelean --- drivers/clk/clk-axi-clkgen.c | 67 +++- 1 file changed, 59 insertions(+), 8 deletions

[PATCH v3 2/6] clk: axi-clkgen: Set power bits for fractional mode

2020-09-24 Thread Alexandru Ardelean
mode. Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean --- drivers/clk/clk-axi-clkgen.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/clk/clk-axi-clkgen.c b/drivers/clk/clk-axi-clkgen.c index 1df03cc6d089..14d803e6af62 100644 --- a/drivers/clk/clk-axi

[PATCH v3 4/6] clk: axi-clkgen: Respect ZYNQMP PFD/VCO frequency limits

2020-09-24 Thread Alexandru Ardelean
From: Mathias Tausen Since axi-clkgen is now supported on ZYNQMP, make sure the max/min frequencies of the PFD and VCO are respected. Signed-off-by: Mathias Tausen Signed-off-by: Alexandru Ardelean --- drivers/clk/clk-axi-clkgen.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH v3 1/6] clk: axi-clkgen: Add support for fractional dividers

2020-09-24 Thread Alexandru Ardelean
to be the recommended mode of operation. Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean --- drivers/clk/clk-axi-clkgen.c | 180 +-- 1 file changed, 129 insertions(+), 51 deletions(-) diff --git a/drivers/clk/clk-axi-clkgen.c b/drivers/clk/clk

[PATCH v3 5/6] include: fpga: adi-axi-common.h: add definitions for supported FPGAs

2020-09-24 Thread Alexandru Ardelean
-by: Mircea Caprioru Signed-off-by: Alexandru Ardelean --- include/linux/fpga/adi-axi-common.h | 103 1 file changed, 103 insertions(+) diff --git a/include/linux/fpga/adi-axi-common.h b/include/linux/fpga/adi-axi-common.h index 141ac3f251e6..1a7f18e3a384 100644

[PATCH v3 0/6] clk: axi-clk-gen: misc updates to the driver

2020-09-24 Thread Alexandru Ardelean
These patches synchronize the driver with the current state in the Analog Devices Linux tree: https://github.com/analogdevicesinc/linux/ They have been in the tree for about 2-3, so they did receive some testing. Highlights are: * Add support for fractional dividers (Lars-Peter Clausen) *

Re: [PATCH v2 0/6] clk: axi-clk-gen: misc updates to the driver

2020-09-23 Thread Alexandru Ardelean
On Thu, Sep 24, 2020 at 7:53 AM Moritz Fischer wrote: > > Hi Stephen, > > On Wed, Sep 23, 2020 at 04:58:33PM -0700, Stephen Boyd wrote: > > Quoting Alexandru Ardelean (2020-09-22 23:22:33) > > > On Tue, Sep 22, 2020 at 10:42 PM Stephen Boyd wrote: > > > >

[PATCH] iio: cros_ec: unify hw fifo attributes into the core file

2020-09-23 Thread Alexandru Ardelean
uffers at some point. Right now, the current IIO framework works fine for the '1 IIO device == 1 IIO buffer' case (that is now). Signed-off-by: Alexandru Ardelean --- drivers/iio/accel/cros_ec_accel_legacy.c | 2 +- .../iio/common/cros_ec_sensors/cros_ec_lid_angle.c| 3 ++- drive

[PATCH] iio: buffer-dmaengine: remove non managed alloc/free

2020-09-23 Thread Alexandru Ardelean
This is to encourage the use of devm_iio_dmaengine_buffer_alloc(). Currently the managed version of the DMAEngine buffer alloc is the only function used from this part of the framework. Signed-off-by: Alexandru Ardelean --- drivers/iio/buffer/industrialio-buffer-dmaengine.c | 6 ++ include

Re: [PATCH v2 0/6] clk: axi-clk-gen: misc updates to the driver

2020-09-23 Thread Alexandru Ardelean
On Tue, Sep 22, 2020 at 10:42 PM Stephen Boyd wrote: > > Quoting Moritz Fischer (2020-09-14 19:41:38) > > On Mon, Sep 14, 2020 at 11:11:05AM +0300, Alexandru Ardelean wrote: > > > On Mon, Aug 10, 2020 at 4:41 PM Alexandru Ardelean > > > wrote: > > > > &g

[PATCH v2 3/5] dt-bindings: iio: ad9467: add entry for for AD9434 ADC

2020-09-22 Thread Alexandru Ardelean
Add entry for the AD9434 high-speed ADC which is supported by the 'ad9467' driver. Signed-off-by: Alexandru Ardelean --- Documentation/devicetree/bindings/iio/adc/adi,ad9467.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad9467.yaml b

[PATCH v2 5/5] dt-bindings: iio: ad9467: add entry for for AD9265 ADC

2020-09-22 Thread Alexandru Ardelean
Add entry for the AD9265 high-speed ADC which is supported by the 'ad9467' driver. Signed-off-by: Alexandru Ardelean --- Documentation/devicetree/bindings/iio/adc/adi,ad9467.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad9467.yaml b

[PATCH v2 4/5] iio: adc: ad9467: add support for AD9265 high-speed ADC

2020-09-22 Thread Alexandru Ardelean
-by: Michael Hennerich Signed-off-by: Alexandru Ardelean --- drivers/iio/adc/ad9467.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/iio/adc/ad9467.c b/drivers/iio/adc/ad9467.c index 54a5864bc698..19a45dd43796 100644 --- a/drivers/iio/adc/ad9467.c +++ b

[PATCH v2 1/5] iio: adc: ad9467: wrap a axi-adc chip-info into a ad9467_chip_info type

2020-09-22 Thread Alexandru Ardelean
, they are updated in a single place and propagated in both switch statements. Signed-off-by: Alexandru Ardelean --- drivers/iio/adc/ad9467.c | 62 +++- 1 file changed, 29 insertions(+), 33 deletions(-) diff --git a/drivers/iio/adc/ad9467.c b/drivers/iio/adc/ad9467

[PATCH v2 0/5] iio: adc: ad9467: add support for AD9434 & AD9265

2020-09-22 Thread Alexandru Ardelean
noticed that some things could be a bit more unified for vref_mask & default_output_mode. Changelog v1 -> v2: * add AD9265 support * wrap axi-adc chip-info, to also define vref_mask & default_output_mode in the chip-info table Alexandru Ardelean (3): iio: adc: ad9467: wrap a axi-ad

[PATCH v2 2/5] iio: adc: ad9467: add support for AD9434 high-speed ADC

2020-09-22 Thread Alexandru Ardelean
output data timing. Link: https://www.analog.com/media/en/technical-documentation/data-sheets/AD9434.pdf The driver supports the same register set as the AD9467, so the support for this chip is added to the 'ad9467' driver. Signed-off-by: Michael Hennerich Signed-off-by: Alexandru Ardelean

Re: [PATCH 1/2] iio: adc ad9467: add support for AD9434 high-speed ADC

2020-09-22 Thread Alexandru Ardelean
On Mon, Sep 21, 2020 at 1:29 PM Alexandru Ardelean wrote: > > From: Michael Hennerich > > The AD9434 is a 12-bit monolithic sampling analog-to-digital converter > (ADC) optimized for high performance, low power, and ease of use. The part > operates at up to a 500 MS

[PATCH 1/2 v2] iio: event: use short-hand variable in iio_device_{un}register_eventset functions

2020-09-21 Thread Alexandru Ardelean
With the recent 'iio_dev_opaque' variable name, these two functions are looking a bit ugly. This change uses an 'ev_int' variable for the iio_device_{un}register_eventset functions to make the code a little easier to read. Signed-off-by: Alexandru Ardelean --- Changelog v1 -> v2: * m

[PATCH 2/2 v2] iio: event: NULL-ify IIO device's event_interface ref during unregister

2020-09-21 Thread Alexandru Ardelean
decide to implement this at some point later. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-event.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-event.c index a85919eb7c4a..99ba657b8568 100644 --- a/drivers/iio

[PATCH 1/2] iio: adc ad9467: add support for AD9434 high-speed ADC

2020-09-21 Thread Alexandru Ardelean
output data timing. Link: https://www.analog.com/media/en/technical-documentation/data-sheets/AD9434.pdf The driver supports the same register set as the AD9467, so the support for this chip is added to the 'ad9467' driver. Signed-off-by: Michael Hennerich Signed-off-by: Alexandru Ardelean

[PATCH 2/2] dt-bindings: iio: ad9467: add entry for for AD9434 ADC

2020-09-21 Thread Alexandru Ardelean
Add entry for the AD9434 high-speed ADC which is supported by the 'ad9467' driver. Signed-off-by: Alexandru Ardelean --- Documentation/devicetree/bindings/iio/adc/adi,ad9467.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad9467.yaml b

Re: [PATCH 1/2] iio: event: use short-hand variable in iio_device_{un}register_eventset functions

2020-09-18 Thread Alexandru Ardelean
On Fri, Sep 18, 2020 at 1:34 PM Alexandru Ardelean wrote: > > With the recent 'iio_dev_opaque' variable name, these two functions are > looking a bit ugly. > > This change uses an 'ev_int' variable for the > iio_device_{un}register_eventset functions to make the code a littl

[PATCH 2/2] iio: event: NULL-ify IIO device's event_interface ref during unregister

2020-09-18 Thread Alexandru Ardelean
decide to implement this at some point later. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-event.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-event.c index 96b7fa63f96c..2b5f1d84d321 100644 --- a/drivers/iio

[PATCH 1/2] iio: event: use short-hand variable in iio_device_{un}register_eventset functions

2020-09-18 Thread Alexandru Ardelean
With the recent 'iio_dev_opaque' variable name, these two functions are looking a bit ugly. This change uses an 'ev_int' variable for the iio_device_{un}register_eventset functions to make the code a little easier to read. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-event.c

Re: [PATCH] iio: buffer: split buffer sysfs creation to take buffer as primary arg

2020-09-18 Thread Alexandru Ardelean
On Thu, Sep 17, 2020 at 8:56 PM Jonathan Cameron wrote: > > On Thu, 17 Sep 2020 20:41:08 +0300 > Alexandru Ardelean wrote: > > > On Thu, Sep 17, 2020 at 8:18 PM Jonathan Cameron wrote: > > > > > > On Thu, 17 Sep 2020 15:59:51 +0300 > > > Alexa

Re: [PATCH] iio: buffer: split buffer sysfs creation to take buffer as primary arg

2020-09-17 Thread Alexandru Ardelean
On Thu, Sep 17, 2020 at 8:18 PM Jonathan Cameron wrote: > > On Thu, 17 Sep 2020 15:59:51 +0300 > Alexandru Ardelean wrote: > > > Currently the iio_buffer_{alloc,free}_sysfs_and_mask() take 'indio_dev' as > > primary argument. This change splits the main logic

[PATCH] iio: buffer: split buffer sysfs creation to take buffer as primary arg

2020-09-17 Thread Alexandru Ardelean
-by: Alexandru Ardelean --- drivers/iio/industrialio-buffer.c | 46 --- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c index a7d7e5143ed2..a4f6bb96d4f4 100644 --- a/drivers/iio

[PATCH v2] iio: adc: exynos_adc: Replace indio_dev->mlock with own device lock

2020-09-16 Thread Alexandru Ardelean
A+U=dsoo6yabe5odlp+efnpgfdjk5zeqecegkqjxxcvehlw...@mail.gmail.com/ Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sergiu Cuciurean Signed-off-by: Alexandru Ardelean --- drivers/iio/adc/exynos_adc.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/iio/

[PATCH v2] iio: adc: fsl-imx25-gcq: Replace indio_dev->mlock with own device lock

2020-09-16 Thread Alexandru Ardelean
res that no other read occurs until it completes. This is part of a bigger cleanup. Link: https://lore.kernel.org/linux-iio/CA+U=dsoo6yabe5odlp+efnpgfdjk5zeqecegkqjxxcvehlw...@mail.gmail.com/ Signed-off-by: Sergiu Cuciurean Signed-off-by: Alexandru Ardelean --- drivers/iio/adc/fsl-imx25-gcq.c |

[PATCH v2] iio: frequency: adf4350: Replace indio_dev->mlock with own device lock

2020-09-16 Thread Alexandru Ardelean
art of another sequence before another one has finished. This is part of a bigger cleanup. Link: https://lore.kernel.org/linux-iio/CA+U=dsoo6yabe5odlp+efnpgfdjk5zeqecegkqjxxcvehlw...@mail.gmail.com/ Signed-off-by: Sergiu Cuciurean Signed-off-by: Alexandru Ardelean --- drivers/iio/frequency/adf435

[PATCH v2] iio: dac: ti-dac7612: Replace indio_dev->mlock with own device lock

2020-09-16 Thread Alexandru Ardelean
ect the sanity of the entire sequence of operation. This is part of a bigger cleanup. Link: https://lore.kernel.org/linux-iio/CA+U=dsoo6yabe5odlp+efnpgfdjk5zeqecegkqjxxcvehlw...@mail.gmail.com/ Signed-off-by: Sergiu Cuciurean Signed-off-by: Alexandru Ardelean --- drivers/iio/dac/ti-dac7612.c |

[PATCH v2] iio: stm32-dac: Replace indio_dev->mlock with own device lock

2020-09-16 Thread Alexandru Ardelean
art of a bigger cleanup. Link: https://lore.kernel.org/linux-iio/CA+U=dsoo6yabe5odlp+efnpgfdjk5zeqecegkqjxxcvehlw...@mail.gmail.com/ Signed-off-by: Sergiu Cuciurean Signed-off-by: Alexandru Ardelean --- drivers/iio/dac/stm32-dac.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) d

[PATCH] iio: adc: ad9467: refine mismatch vs unknown chip-id messages

2020-09-16 Thread Alexandru Ardelean
We should probably print what the expected chip-ID is. We already have that information available, based on the device specified via device-tree. Signed-off-by: Alexandru Ardelean --- drivers/iio/adc/ad9467.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iio/adc

[PATCH] iio: adc: ad9467: return ENODEV vs EINVAL in ad9467_setup()

2020-09-16 Thread Alexandru Ardelean
The proper error code should be ENODEV (vs EINVAL) in case the chip ID isn't recognized. Signed-off-by: Alexandru Ardelean --- drivers/iio/adc/ad9467.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/ad9467.c b/drivers/iio/adc/ad9467.c index 1e8fd83b9bc2

Re: [PATCH v2 0/6] clk: axi-clk-gen: misc updates to the driver

2020-09-14 Thread Alexandru Ardelean
On Mon, Aug 10, 2020 at 4:41 PM Alexandru Ardelean wrote: > > These patches synchronize the driver with the current state in the > Analog Devices Linux tree: > https://github.com/analogdevicesinc/linux/ > > They have been in the tree for about 2-3, so they did receive som

Re: [PATCH v3 1/2] MAINTAINERS: Consolidate Analog Devices IIO entries and remove Beniamin Bia

2020-09-04 Thread Alexandru Ardelean
On Thu, Sep 3, 2020 at 10:42 PM Andy Shevchenko wrote: > > On Thu, Sep 3, 2020 at 9:19 PM Krzysztof Kozlowski wrote: > > > > Emails to Beniamin Bia bounce with no such address so remove him from > > maintainers. After this removal, many entries for Analog Devices Inc > > IIO drivers look

Re: [PATCH v2] iio: stm32-dac: Replace indio_dev->mlock with own device lock

2020-09-02 Thread Alexandru Ardelean
On Sat, Aug 29, 2020 at 6:46 PM Jonathan Cameron wrote: > > On Thu, 27 Aug 2020 13:00:36 +0300 > Alexandru Ardelean wrote: > > > On Thu, Aug 27, 2020 at 12:03 PM Fabrice Gasnier > > wrote: > > > > > > On 8/27/20 10:55 AM, Alexandru Ardelean wrot

Re: [PATCH v2] iio: stm32-dac: Replace indio_dev->mlock with own device lock

2020-08-27 Thread Alexandru Ardelean
On Thu, Aug 27, 2020 at 12:03 PM Fabrice Gasnier wrote: > > On 8/27/20 10:55 AM, Alexandru Ardelean wrote: > > On Wed, Aug 26, 2020 at 3:03 PM Alexandru Ardelean > > wrote: > >> From: Sergiu Cuciurean > >> > >> As part of the general clea

Re: [PATCH v2] iio: stm32-dac: Replace indio_dev->mlock with own device lock

2020-08-27 Thread Alexandru Ardelean
On Wed, Aug 26, 2020 at 3:03 PM Alexandru Ardelean wrote: > > From: Sergiu Cuciurean > > As part of the general cleanup of indio_dev->mlock, this change replaces > it with a local lock. The lock protects against potential races when > reading the CR reg and then updati

Re: [PATCH] iio: adc: exynos_adc: Replace indio_dev->mlock with own device lock

2020-08-27 Thread Alexandru Ardelean
On Thu, Aug 27, 2020 at 9:57 AM Krzysztof Kozlowski wrote: > > On Wed, Aug 26, 2020 at 04:22:03PM +0300, Alexandru Ardelean wrote: > > From: Sergiu Cuciurean > > > > As part of the general cleanup of indio_dev->mlock, this change replaces > > it with a local lock

[PATCH] iio: adc: exynos_adc: Replace indio_dev->mlock with own device lock

2020-08-26 Thread Alexandru Ardelean
From: Sergiu Cuciurean As part of the general cleanup of indio_dev->mlock, this change replaces it with a local lock, to protect potential concurrent access to the completion callback during a conversion. Signed-off-by: Sergiu Cuciurean Signed-off-by: Alexandru Ardelean --- drivers/iio/

[PATCH] iio: adc: fsl-imx25-gcq: Replace indio_dev->mlock with own device lock

2020-08-26 Thread Alexandru Ardelean
res that no other read occurs until it completes. Signed-off-by: Sergiu Cuciurean Signed-off-by: Alexandru Ardelean --- drivers/iio/adc/fsl-imx25-gcq.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/iio/adc/fsl-imx25-gcq.c b/drivers/iio/adc/fsl-imx25-gcq.c in

[PATCH v2] iio: stm32-dac: Replace indio_dev->mlock with own device lock

2020-08-26 Thread Alexandru Ardelean
off-by: Sergiu Cuciurean Signed-off-by: Alexandru Ardelean --- drivers/iio/dac/stm32-dac.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/iio/dac/stm32-dac.c b/drivers/iio/dac/stm32-dac.c index 092c796fa3d9..7a8aed476850 100644 --- a/drivers/iio/dac/stm32-da

Re: [PATCH] iio: stm32-dac: Replace indio_dev->mlock with own device lock

2020-08-26 Thread Alexandru Ardelean
On Wed, Aug 26, 2020 at 12:01 PM Fabrice Gasnier wrote: > > On 8/26/20 8:38 AM, Alexandru Ardelean wrote: > > From: Sergiu Cuciurean > > > > As part of the general cleanup of indio_dev->mlock, this change replaces > > it with a local lock on the device's state

[PATCH] iio: frequency: adf4350: Replace indio_dev->mlock with own device lock

2020-08-26 Thread Alexandru Ardelean
From: Sergiu Cuciurean As part of the general cleanup of indio_dev->mlock, this change replaces it with a local lock on the device's state structure. Signed-off-by: Sergiu Cuciurean Signed-off-by: Alexandru Ardelean --- drivers/iio/frequency/adf4350.c | 15 +-- 1 file changed

[PATCH] iio: dac: ti-dac7612: Replace indio_dev->mlock with own device lock

2020-08-26 Thread Alexandru Ardelean
From: Sergiu Cuciurean As part of the general cleanup of indio_dev->mlock, this change replaces it with a local lock on the device's state structure. Signed-off-by: Sergiu Cuciurean Signed-off-by: Alexandru Ardelean --- drivers/iio/dac/ti-dac7612.c | 7 +-- 1 file changed, 5 inserti

[PATCH] iio: stm32-dac: Replace indio_dev->mlock with own device lock

2020-08-26 Thread Alexandru Ardelean
off-by: Alexandru Ardelean --- drivers/iio/dac/stm32-dac.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/iio/dac/stm32-dac.c b/drivers/iio/dac/stm32-dac.c index 092c796fa3d9..fc636812c17e 100644 --- a/drivers/iio/dac/stm32-dac.c +++ b/drivers/iio/dac/st

Re: [PATCH v2 0/6] dmaengine: axi-dmac: add support for reading bus attributes from register

2020-08-25 Thread Alexandru Ardelean
On Tue, Aug 25, 2020 at 6:14 PM Alexandru Ardelean wrote: > > On Tue, Aug 25, 2020 at 5:46 PM Vinod Koul wrote: > > > > On 25-08-20, 15:48, Alexandru Ardelean wrote: > > > The series adds support for reading the DMA bus attributes from the > > > I

[RESEND PATCH v2 4/6] dmaengine: axi-dmac: wrap entire dt parse in a function

2020-08-25 Thread Alexandru Ardelean
All these attributes will be read from registers in newer core versions, so just wrap the logic into a function. Signed-off-by: Alexandru Ardelean --- drivers/dma/dma-axi-dmac.c | 40 +++--- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/drivers

[RESEND PATCH v2 5/6] dmaengine: axi-dmac: wrap channel parameter adjust into function

2020-08-25 Thread Alexandru Ardelean
into a separate function. Signed-off-by: Alexandru Ardelean --- drivers/dma/dma-axi-dmac.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c index 1a1e227fa935..7ee56ae60093 100644 --- a/drivers

[RESEND PATCH v2 6/6] dmaengine: axi-dmac: add support for reading bus attributes from registers

2020-08-25 Thread Alexandru Ardelean
need to read them. Bus-width values are stored in log2 values, so we just need to use them as shift values to make them equivalent to the current format. Signed-off-by: Alexandru Ardelean --- drivers/dma/dma-axi-dmac.c | 66 -- 1 file changed, 63 insertions

[RESEND PATCH v2 3/6] dmaengine: axi-dmac: move clock enable earlier

2020-08-25 Thread Alexandru Ardelean
The clock may also be required to read registers from the IP core (if it is provided and the driver needs to control it). So, move it earlier in the probe. Signed-off-by: Alexandru Ardelean --- drivers/dma/dma-axi-dmac.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions

[RESEND PATCH v2 0/6] dmaengine: axi-dmac: add support for reading bus attributes from register

2020-08-25 Thread Alexandru Ardelean
scs list init after device-tree init' the list of active_descs can be moved a bit lower in the init/probe *** BLURB HERE *** Alexandru Ardelean (6): dmaengine: axi-dmac: move version read in probe dmaengine: axi-dmac: move active_descs list init after device-tree init dmaengine: axi-d

[RESEND PATCH v2 2/6] dmaengine: axi-dmac: move active_descs list init after device-tree init

2020-08-25 Thread Alexandru Ardelean
-by: Alexandru Ardelean --- drivers/dma/dma-axi-dmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c index 088c79137398..90a99bdffa2b 100644 --- a/drivers/dma/dma-axi-dmac.c +++ b/drivers/dma/dma-axi-dmac.c @@ -850,8

[RESEND PATCH v2 1/6] dmaengine: axi-dmac: move version read in probe

2020-08-25 Thread Alexandru Ardelean
The 'version' of the IP core will be needed to adapt the driver to a new feature (i.e. reading some DMA parameters from registers). To do that, the version will be checked, so this is being moved out of the axi_dmac_detect_caps() function. Signed-off-by: Alexandru Ardelean --- drivers/dma/dma

Re: [PATCH v2 0/6] dmaengine: axi-dmac: add support for reading bus attributes from register

2020-08-25 Thread Alexandru Ardelean
On Tue, Aug 25, 2020 at 5:46 PM Vinod Koul wrote: > > On 25-08-20, 15:48, Alexandru Ardelean wrote: > > The series adds support for reading the DMA bus attributes from the > > INTERFACE_DESCRIPTION (0x10) register. > > > > The first 5 changes are a bit of rew

[PATCH v2 2/6] dmaengine: axi-dmac: move active_descs list init after device-tree init

2020-08-25 Thread Alexandru Ardelean
-by: Alexandru Ardelean --- drivers/dma/dma-axi-dmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c index 088c79137398..90a99bdffa2b 100644 --- a/drivers/dma/dma-axi-dmac.c +++ b/drivers/dma/dma-axi-dmac.c @@ -850,8

[PATCH v2 5/6] dmaengine: axi-dmac: wrap channel parameter adjust into function

2020-08-25 Thread Alexandru Ardelean
into a separate function. Signed-off-by: Alexandru Ardelean --- drivers/dma/dma-axi-dmac.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c index 1a1e227fa935..7ee56ae60093 100644 --- a/drivers

[PATCH v2 0/6] dmaengine: axi-dmac: add support for reading bus attributes from register

2020-08-25 Thread Alexandru Ardelean
scs list init after device-tree init' the list of active_descs can be moved a bit lower in the init/probe Alexandru Ardelean (6): dmaengine: axi-dmac: move version read in probe dmaengine: axi-dmac: move active_descs list init after device-tree init dmaengine: axi-dmac: move clock ena

[PATCH v2 5/6] dmaengine: axi-dmac: wrap channel parameter adjust into function

2020-08-25 Thread Alexandru Ardelean
into a separate function. Signed-off-by: Alexandru Ardelean --- drivers/dma/dma-axi-dmac.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c index 1a1e227fa935..7ee56ae60093 100644 --- a/drivers

[PATCH v2 4/6] dmaengine: axi-dmac: wrap entire dt parse in a function

2020-08-25 Thread Alexandru Ardelean
All these attributes will be read from registers in newer core versions, so just wrap the logic into a function. Signed-off-by: Alexandru Ardelean --- drivers/dma/dma-axi-dmac.c | 40 +++--- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/drivers

[PATCH v2 1/6] dmaengine: axi-dmac: move version read in probe

2020-08-25 Thread Alexandru Ardelean
The 'version' of the IP core will be needed to adapt the driver to a new feature (i.e. reading some DMA parameters from registers). To do that, the version will be checked, so this is being moved out of the axi_dmac_detect_caps() function. Signed-off-by: Alexandru Ardelean --- drivers/dma/dma

[PATCH v2 4/6] dmaengine: axi-dmac: wrap entire dt parse in a function

2020-08-25 Thread Alexandru Ardelean
All these attributes will be read from registers in newer core versions, so just wrap the logic into a function. Signed-off-by: Alexandru Ardelean --- drivers/dma/dma-axi-dmac.c | 40 +++--- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/drivers

[PATCH v2 2/6] dmaengine: axi-dmac: move active_descs list init after device-tree init

2020-08-25 Thread Alexandru Ardelean
-by: Alexandru Ardelean --- drivers/dma/dma-axi-dmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c index 088c79137398..90a99bdffa2b 100644 --- a/drivers/dma/dma-axi-dmac.c +++ b/drivers/dma/dma-axi-dmac.c @@ -850,8

[PATCH v2 3/6] dmaengine: axi-dmac: move clock enable earlier

2020-08-25 Thread Alexandru Ardelean
The clock may also be required to read registers from the IP core (if it is provided and the driver needs to control it). So, move it earlier in the probe. Signed-off-by: Alexandru Ardelean --- drivers/dma/dma-axi-dmac.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions

[PATCH v2 6/6] dmaengine: axi-dmac: add support for reading bus attributes from registers

2020-08-25 Thread Alexandru Ardelean
need to read them. Bus-width values are stored in log2 values, so we just need to use them as shift values to make them equivalent to the current format. Signed-off-by: Alexandru Ardelean --- drivers/dma/dma-axi-dmac.c | 66 -- 1 file changed, 63 insertions

[PATCH v2 1/6] dmaengine: axi-dmac: move version read in probe

2020-08-25 Thread Alexandru Ardelean
The 'version' of the IP core will be needed to adapt the driver to a new feature (i.e. reading some DMA parameters from registers). To do that, the version will be checked, so this is being moved out of the axi_dmac_detect_caps() function. Signed-off-by: Alexandru Ardelean --- drivers/dma/dma

[PATCH v2 0/6] dmaengine: axi-dmac: add support for reading bus attributes from register

2020-08-25 Thread Alexandru Ardelean
scs list init after device-tree init' the list of active_descs can be moved a bit lower in the init/probe Alexandru Ardelean (6): dmaengine: axi-dmac: move version read in probe dmaengine: axi-dmac: move active_descs list init after device-tree init dmaengine: axi-dmac: move clock ena

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