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

Re: [PATCH 2/5] dmaengine: axi-dmac: move clock enable earlier

2020-08-25 Thread Alexandru Ardelean
On Tue, Aug 25, 2020 at 2:24 PM Vinod Koul wrote: > > On 19-08-20, 10:16, Alexandru Ardelean wrote: > > 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 p

Re: [PATCH] iio: adc: adi-axi-adc: Use kobj_to_dev() instead of container_of()

2020-08-20 Thread Alexandru Ardelean
On Thu, Aug 20, 2020 at 6:04 AM Tian Tao wrote: > > Use kobj_to_dev() instead of container_of() > Good point. Acked-by: Alexandru Ardelean > Signed-off-by: Tian Tao > --- > drivers/iio/adc/adi-axi-adc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > d

[PATCH 3/5] dmaengine: axi-dmac: wrap entire dt parse in a function

2020-08-19 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 | 39 -- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/drivers

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

2020-08-19 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 2/5] dmaengine: axi-dmac: move clock enable earlier

2020-08-19 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 | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

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

2020-08-19 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 4/5] dmaengine: axi-dmac: wrap channel parameter adjust into function

2020-08-19 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 473c4a159c89..95aea2b423ac 100644 --- a/drivers

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

2020-08-10 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 v2 6/6] clk: axi-clkgen: Add support for FPGA info

2020-08-10 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 v2 4/6] clk: axi-clkgen: Respect ZYNQMP PFD/VCO frequency limits

2020-08-10 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 v2 5/6] include: fpga: adi-axi-common.h: add definitions for supported FPGAs

2020-08-10 Thread Alexandru Ardelean
-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..5c7d212a5d4a 100644 --- a/include/linux/fpga/adi-axi

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

2020-08-10 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 v2 2/6] clk: axi-clkgen: Set power bits for fractional mode

2020-08-10 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 v2 6/6] clk: axi-clkgen: Add support for FPGA info

2020-08-10 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 v2 5/6] include: fpga: adi-axi-common.h: add definitions for supported FPGAs

2020-08-10 Thread Alexandru Ardelean
-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..5c7d212a5d4a 100644 --- a/include/linux/fpga/adi-axi

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

2020-08-10 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 v2 1/6] clk: axi-clkgen: Add support for fractional dividers

2020-08-10 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 v2 0/6] clk: axi-clk-gen: misc updates to the driver

2020-08-10 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) *

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

2020-08-10 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 v2 3/6] clk: axi-clkgen: add support for ZynqMP (UltraScale)

2020-08-10 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 v2 0/6] clk: axi-clk-gen: misc updates to the driver

2020-08-10 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) *

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

2020-08-04 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 0/6] clk: axi-clk-gen: misc updates to the driver

2020-08-04 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) *

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

2020-08-04 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 4/6] clk: axi-clkgen: Respect ZYNQMP PFD/VCO frequency limits

2020-08-04 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 5/6] include: fpga: adi-axi-common.h: add definitions for supported FPGAs

2020-08-04 Thread Alexandru Ardelean
-off-by: Alexandru Ardelean --- include/linux/fpga/adi-axi-common.h | 37 + 1 file changed, 37 insertions(+) diff --git a/include/linux/fpga/adi-axi-common.h b/include/linux/fpga/adi-axi-common.h index 141ac3f251e6..7cca2d62cc45 100644 --- a/include/linux/fpga/adi-axi

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

2020-08-04 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 1/6] clk: axi-clkgen: Add support for fractional dividers

2020-08-04 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 2/2] iio: imu: adis16480: Add the option to enable/disable burst mode

2020-08-04 Thread Alexandru Ardelean
to be able to switch between the two modes. Signed-off-by: Stefan Popa Signed-off-by: Alexandru Ardelean --- drivers/iio/imu/adis16480.c | 48 + 1 file changed, 48 insertions(+) diff --git a/drivers/iio/imu/adis16480.c b/drivers/iio/imu/adis16480.c index 9b100c8fb744

[PATCH 1/2] iio: imu: adis16480: Add support for burst read function

2020-08-04 Thread Alexandru Ardelean
ature from userspace. Also, the CRC code is not checked. This will be added in a future patch as well. Signed-off-by: Stefan Popa Signed-off-by: Alexandru Ardelean --- drivers/iio/imu/adis16480.c | 106 +++- 1 file changed, 105 insertions(+), 1 deletion(-)

[PATCH] hwmon: axi-fan-control: remove duplicate macros

2020-08-02 Thread Alexandru Ardelean
These macros are also present in the "include/linux/fpga/adi-axi-common.h" file which is included in this driver. This patch removes them from the AXI Fan Control driver. No sense in having them in 2 places. Signed-off-by: Alexandru Ardelean --- drivers/hwmon/axi-fan-control.c | 4 --

[PATCH v2] iio: adxl372_i2c: Add OF device ID table

2020-07-22 Thread Alexandru Ardelean
From: Stefan Popa The driver does not have a struct of_device_id table, but supported devices are registered via Device Trees. This patch adds OF device ID table. Signed-off-by: Stefan Popa Signed-off-by: Alexandru Ardelean --- Changelog v1 -> v2: * use linux/mod_devicetable.h incl

[PATCH v2] iio: adxl372_spi: change indentation for of_table

2020-07-22 Thread Alexandru Ardelean
The change is mostly stylistic. The table should be indented with tabs instead of spaces. Signed-off-by: Alexandru Ardelean --- Changelog v1 -> v2: * remove trailing comma at null terminator drivers/iio/accel/adxl372_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --

[PATCH v2] iio: frequency: ad9523: convert rest of driver to device managed functions

2020-07-22 Thread Alexandru Ardelean
The driver pretty much uses device managed functions. The only left-over is the iio_device_register() function, which also requires an action-or-reset hook to disable the regulator on the remove and error path. Signed-off-by: Alexandru Ardelean --- Changelog v1 -> v2: * removed 'probed' mess

Re: [PATCH] iio: accel: adxl372: Add OF device ID table

2020-07-22 Thread Alexandru Ardelean
On Tue, Jul 21, 2020 at 9:39 PM Andy Shevchenko wrote: > > On Mon, Jul 20, 2020 at 4:48 PM Alexandru Ardelean > wrote: > > > > From: Stefan Popa > > > > The driver does not have a struct of_device_id table, but supported > > devices are registered via Dev

Re: [PATCH] iio: adc: ad7124: move chip ID & name on the chip_info table

2020-07-22 Thread Alexandru Ardelean
On Tue, Jul 21, 2020 at 9:41 PM Andy Shevchenko wrote: > > On Mon, Jul 20, 2020 at 2:30 PM Jonathan Cameron wrote: > > > > On Tue, 14 Jul 2020 08:11:11 +0300 > > Alexandru Ardelean wrote: > > > > > This change does the following: > > > * remove

Re: [PATCH] iio: frequency: ad9523: convert rest of driver to device managed functions

2020-07-22 Thread Alexandru Ardelean
On Tue, Jul 21, 2020 at 10:34 PM Andy Shevchenko wrote: > > On Tue, Jul 21, 2020 at 2:27 PM Alexandru Ardelean > wrote: > > > > The driver pretty much uses device managed functions. The only left-over is > > the iio_device_register() function, which also requires

[PATCH] iio: frequency: ad9523: convert rest of driver to device managed functions

2020-07-21 Thread Alexandru Ardelean
The driver pretty much uses device managed functions. The only left-over is the iio_device_register() function, which also requires an action-or-reset hook to disable the regulator on the remove and error path. Signed-off-by: Alexandru Ardelean --- drivers/iio/frequency/ad9523.c | 60

[PATCH] iio: core: fix/re-introduce back parent assignment

2020-07-21 Thread Alexandru Ardelean
and ends up breaking devicetree bindings of IIO clients. This change adds back the parent assignment. Fixes 6d4ebd565d15f: ("iio: core: wrap IIO device into an iio_dev_opaque object") Reported-by: Dmitry Baryshkov Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-c

Re: [PATCH v4 2/7] iio: core: wrap IIO device into an iio_dev_opaque object

2020-07-21 Thread Alexandru Ardelean
On Tue, Jul 21, 2020 at 12:47 PM Dmitry Baryshkov wrote: > > Hello, > > On Tue, Jun 30, 2020 at 07:57:03AM +0300, Alexandru Ardelean wrote: > > There are plenty of bad designs we want to discourage or not have to review > > manually usually about accessing private (ma

[PATCH] iio: Kconfig: ad8366: add entry for HMC1119 chip

2020-07-20 Thread Alexandru Ardelean
The change is mostly cosmetic. When looking into the menuconfig help of the ad8366 driver, the HMC1119 chip should also show up (since the driver supports it). Signed-off-by: Alexandru Ardelean --- drivers/iio/amplifiers/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iio

[PATCH v2] iio: trigger: make stub functions static inline

2020-07-20 Thread Alexandru Ardelean
Signed-off-by: Alexandru Ardelean --- Changelog v1 -> v2: * fix commit description & title * added proper Fixes tag drivers/iio/iio_core_trigger.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/iio_core_trigger.h b/drivers/iio/iio_core_trigger.h index 9d1a92cc6

[PATCH] iio: accel: adxl372: Add OF device ID table

2020-07-20 Thread Alexandru Ardelean
From: Stefan Popa The driver does not have a struct of_device_id table, but supported devices are registered via Device Trees. This patch adds OF device ID table. Signed-off-by: Stefan Popa Signed-off-by: Alexandru Ardelean --- drivers/iio/accel/adxl372_i2c.c | 9 + 1 file changed, 9

[PATCH] iio: adxl372: change indentation for of_table

2020-07-20 Thread Alexandru Ardelean
The change is mostly stylistic. The table should be indented with tabs instead of spaces. Signed-off-by: Alexandru Ardelean --- drivers/iio/accel/adxl372_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/accel/adxl372_spi.c b/drivers/iio/accel

Re: [PATCH] iio: adc: ad7124: move chip ID & name on the chip_info table

2020-07-20 Thread Alexandru Ardelean
On Mon, Jul 20, 2020 at 2:30 PM Jonathan Cameron wrote: > > On Tue, 14 Jul 2020 08:11:11 +0300 > Alexandru Ardelean wrote: > > > This change does the following: > > * removes the SPI device table in favor of the OF device table > > * adds 'name' && 'chip_id

[PATCH] iio: buffer: fix attach/detach pollfunc order

2020-07-14 Thread Alexandru Ardelean
hook. While the drivers were updated to take this into account, the change to the IIO core was somehow omitted and was made wrong. This change fixes the order to the proper form. Fixes f11d59d87b862: ("iio: Move attach/detach of the poll func to the core") Signed-off-by: Alexandru Arde

[PATCH] iio: trigger: Staticise stub functions

2020-07-14 Thread Alexandru Ardelean
Signed-off-by: Alexandru Ardelean --- FWIW: we can skip the Fixes tag from my side; this has been present for a while. I just bumped into it while sync-ing the ADI tree with some upstream stuff. drivers/iio/iio_core_trigger.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/d

[PATCH] iio: adc: ad7124: move chip ID & name on the chip_info table

2020-07-13 Thread Alexandru Ardelean
but at least the silicon revision isn't 0, so a non-zero value can be used to check that "a" device is on the SPI bus; it's probably the best way to narrow it down to one of the 2 AD7124 chip IDs Signed-off-by: Alexandru Ardelean --- drivers/iio/adc/ad7124.c | 73 ++

[PATCH 3/3] iio: dac: ad5592r: localize locks only where needed in ad5592r_read_raw()

2020-07-06 Thread Alexandru Ardelean
reworks the switch statements to do direct returns vs caching the return value on a variable. Signed-off-by: Alexandru Ardelean --- drivers/iio/dac/ad5592r-base.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/iio/dac/ad5592r-base.c b

[PATCH 2/3] iio: dac: ad5592r: un-indent code-block for scale read

2020-07-06 Thread Alexandru Ardelean
The next rework may require an unindentation of a code block in ad5592r_read_raw(), which would make review a bit more difficult. This change unindents the code block for reading the scale of the non-temperature channels. Signed-off-by: Alexandru Ardelean --- drivers/iio/dac/ad5592r-base.c

[PATCH 1/3] iio: dac: ad5592r: fix unbalanced mutex unlocks in ad5592r_read_raw()

2020-07-06 Thread Alexandru Ardelean
56ca9db862bf3: ("iio: dac: Add support for the AD5592R/AD5593R ADCs/DACs") Signed-off-by: Alexandru Ardelean --- drivers/iio/dac/ad5592r-base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/dac/ad5592r-base.c b/drivers/iio/dac/ad5592r-base.c index 5c

[PATCH v4 6/7] iio: core: move iio_dev's buffer_list to the private iio device object

2020-06-29 Thread Alexandru Ardelean
This change moves the 'buffer_list' away from the public IIO device object into the private part. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron --- drivers/iio/industrialio-buffer.c | 38 +++ drivers/iio/industrialio-core.c | 2 +- include

[PATCH v4 7/7] iio: core: move event interface on the opaque struct

2020-06-29 Thread Alexandru Ardelean
Same as with other private fields, this moves the event interface reference to the opaque IIO device object, to be invisible to drivers. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron --- drivers/iio/industrialio-core.c | 5 ++- drivers/iio/industrialio-event.c | 68

[PATCH v4 3/7] iio: core: remove padding from private information

2020-06-29 Thread Alexandru Ardelean
to iio_dev_opaque. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron --- drivers/iio/industrialio-core.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index 33e2953cf021..27005ba4d09c 100644 --- a/drivers/iio

[PATCH v4 5/7] iio: core: move channel list & group to private iio device object

2020-06-29 Thread Alexandru Ardelean
This change bit straightforward and simple, since the 'channel_attr_list' & 'chan_attr_group' fields are only used in 'industrialio-core.c'. This change moves to the private IIO device object Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron --- drivers/iio/industrialio-co

[PATCH v4 4/7] iio: core: move debugfs data on the private iio dev info

2020-06-29 Thread Alexandru Ardelean
symbol, when it isn't defined. We do want to keep the inline definition in the iio.h header, so that the compiler can better infer when to compile out debugfs code that is related to the IIO debugfs directory. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-core.c | 46

[PATCH v4 2/7] iio: core: wrap IIO device into an iio_dev_opaque object

2020-06-29 Thread Alexandru Ardelean
red for some debugging or some special needs, it can be made available via this header. Otherwise, only the IIO core files should include this file. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron --- drivers/iio/industrialio-core.c | 19 +-- include/linux/iio/

[PATCH v4 1/7] iio: core: remove iio_priv_to_dev() helper

2020-06-29 Thread Alexandru Ardelean
All users of this helper have been updated to not use it. Remove it now, so that we don't need to move it when creating the iio_dev_opaque structure. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron --- include/linux/iio/iio.h | 6 -- 1 file changed, 6 deletions(-) diff

[PATCH v4 0/7] iio: core: wrap IIO device into an iio_dev_opaque object

2020-06-29 Thread Alexandru Ardelean
still be an optionif there are some opinions in that direction Alexandru Ardelean (7): iio: core: remove iio_priv_to_dev() helper iio: core: wrap IIO device into an iio_dev_opaque object iio: core: remove padding from private information iio: core: move debugfs data on the private iio dev info ii

[PATCH v3 4/7] iio: core: move debugfs data on the private iio dev info

2020-06-21 Thread Alexandru Ardelean
This change moves all iio_dev debugfs fields to the iio_dev_priv object. It's not the biggest advantage yet (to the whole thing of abstractization) but it's a start. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-core.c | 40 ++--- include/linux/iio

[PATCH v3 0/7] iio: core: wrap IIO device into an iio_dev_opaque object

2020-06-21 Thread Alexandru Ardelean
que() container is in the 'include/linux/iio/iio-opaque.h' header; it's still implemented with some pointer arithmetic; one idea was to do it via an 'indio_dev->opaque' field; that may still be an optionif there are some opinions in that direction Alexandru Ardelean (7): iio: core: remove iio_pr

[PATCH v3 3/7] iio: core: remove padding from private information

2020-06-21 Thread Alexandru Ardelean
to iio_dev_opaque. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-core.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index 33e2953cf021..27005ba4d09c 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio

[PATCH v3 2/7] iio: core: wrap IIO device into an iio_dev_opaque object

2020-06-21 Thread Alexandru Ardelean
via this header. Otherwise, only the IIO core files should include this file. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-core.c | 19 +-- include/linux/iio/iio-opaque.h | 17 + include/linux/iio/iio.h | 6 +- 3 files changed, 35 inserti

[PATCH v3 7/7] iio: core: move event interface on the opaque struct

2020-06-21 Thread Alexandru Ardelean
Same as with other private fields, this moves the event interface reference to the opaque IIO device object, to be invisible to drivers. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-core.c | 5 ++- drivers/iio/industrialio-event.c | 68

[PATCH v3 1/7] iio: core: remove iio_priv_to_dev() helper

2020-06-21 Thread Alexandru Ardelean
All users of this helper have been updated to not use it. Remove it now, so that we don't need to move it when creating the iio_dev_opaque structure. Signed-off-by: Alexandru Ardelean --- include/linux/iio/iio.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/include/linux/iio/iio.h b

[PATCH v3 5/7] iio: core: move channel list & group to private iio device object

2020-06-21 Thread Alexandru Ardelean
This change bit straightforward and simple, since the 'channel_attr_list' & 'chan_attr_group' fields are only used in 'industrialio-core.c'. This change moves to the private IIO device object Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-core.c

[PATCH v3 6/7] iio: core: move iio_dev's buffer_list to the private iio device object

2020-06-21 Thread Alexandru Ardelean
This change moves the 'buffer_list' away from the public IIO device object into the private part. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-buffer.c | 38 +++ drivers/iio/industrialio-core.c | 2 +- include/linux/iio/iio-opaque.h| 2

Re: [PATCH v2 0/6] iio: core: pass parent device as parameter during allocation

2020-06-08 Thread Alexandru Ardelean
On Sat, Jun 6, 2020 at 7:03 PM Jonathan Cameron wrote: > > On Thu, 4 Jun 2020 18:34:40 +0100 > Jonathan Cameron wrote: > > > On Wed, 3 Jun 2020 11:41:52 + > > "Ardelean, Alexandru" wrote: > > > > > On Wed, 2020-06-03 at 14:40 +0300, Ale

[PATCH v2 5/6] iio: light: lm3533-als: use iio_device_set_parent() to assign parent

2020-06-03 Thread Alexandru Ardelean
ere the parent needs to be different, the iio_device_set_parent helper should be used. That makes things a bit more obvious about the new behavior of devm_iio_device_alloc() and makes it clearer that iio_device_set_parent() should be used. Signed-off-by: Alexandru Ardelean --- drivers/iio/light/lm3

[PATCH v2 4/6] iio: remove left-over comments about parent assignment

2020-06-03 Thread Alexandru Ardelean
hem are removed by the semantic patch, as the comment removed (by spatch) would be for an empty line. Signed-off-by: Alexandru Ardelean --- drivers/iio/adc/ad7476.c | 1 - drivers/iio/adc/ad7887.c | 1 - drivers/iio/dac/ad5446.c | 1 - drivers/staging/iio/cdc/ad7746.c | 1 - 4 fi

[PATCH v2 2/6] iio: core: add iio_device_set_parent() helper

2020-06-03 Thread Alexandru Ardelean
, hence the requirement to call this between allocation & registration. This pattern/requirement is not very common in the IIO space, and it may be cleaned up later. But until then, assigning the parent manually between allocation & registration is slightly easier. Signed-off-by: Alexandru

[PATCH v2 6/6] iio: remove left-over parent assignments

2020-06-03 Thread Alexandru Ardelean
)" fi done --- The output is bearable [after the semantic patch is applied]. There is a mix of trigger assignments with some iio device parent assignments that are removed via this patch. Signed-off-by: Alexandru Ardelean --- drivers/iio/accel/kxcjk-1013.c| 1 - driv

[PATCH v2 0/6] iio: core: pass parent device as parameter during allocation

2020-06-03 Thread Alexandru Ardelean
ssed to devm_iio_device_alloc(), OR the parent assignment is moved to a separate function than where devm_iio_device_alloc() is called. Changelog v1 -> v2: * added iio_device_set_parent() helper (new commit) * update commit for lm3533-als to use iio_device_set_parent() Alexandru Ardelean (6): iio: core: pass

[PATCH v2 1/6] iio: core: pass parent device as parameter during allocation

2020-06-03 Thread Alexandru Ardelean
all devm_iio_device_alloc() calls will be handled. Acked-by: Andy Shevchenko Signed-off-by: Alexandru Ardelean --- drivers/iio/dummy/iio_simple_dummy.c | 14 -- drivers/iio/industrialio-core.c | 11 ++- drivers/platform/x86/toshiba_acpi.c | 3

[PATCH v3] iio: stm32-adc: remove usage of iio_priv_to_dev() helper

2020-05-26 Thread Alexandru Ardelean
. For this driver, not using iio_priv_to_dev(), means reworking some paths to pass the iio device and using iio_priv() to access the private information. Signed-off-by: Alexandru Ardelean --- Changelog v2 -> v3: - update doc-strings; warnings show-up during build with W=1 arg Changelog v1 -&

[PATCH] iio: dac: ad5592r: remove usage of iio_priv_to_dev() helper

2020-05-25 Thread Alexandru Ardelean
This was partially removed when the mlock cleanup was done. Only one more call is left in the ad5592r_alloc_channels() function. This one is simple. We just need to pass the iio_dev object and get the state via iio_priv(). Signed-off-by: Alexandru Ardelean --- drivers/iio/dac/ad5592r-base.c | 6

[PATCH v2 3/3] iio: remove iio_triggered_buffer_postenable()/iio_triggered_buffer_predisable()

2020-05-25 Thread Alexandru Ardelean
From: Lars-Peter Clausen This patch should be squashed into the first one, as the first one is breaking the build (intentionally) to make the IIO core files easier to review. Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean --- drivers/iio/accel/adxl372.c

[PATCH v2 1/3] iio: Move attach/detach of the poll func to the core

2020-05-25 Thread Alexandru Ardelean
/detach the poll-function in the same order. Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean --- Changelog v1 -> v2: - drivers/iio/accel/st_accel_buffer.c - remove err2 var and return directly - drivers/iio/gyro/st_gyro_buffer.c - return earlier if st_sensors_set_ena

[PATCH v2 2/3] iio: adc: at91-sama5d2_adc: remove predisable/postenable hooks

2020-05-25 Thread Alexandru Ardelean
This should be squashed into the first patch, but it's the more peculiar of the changes. I am not sure whether this is correct. The touchscreen channels shouldn't be enabled by the IIO framework. So, we may need a different way to handle those if needed. Signed-off-by: Alexandru Ardelean

[PATCH] iio: at91-sama5d2_adc: remove usage of iio_priv_to_dev() helper

2020-05-25 Thread Alexandru Ardelean
been a slightly bigger change, which may not be worth it (for just the debugging purpose and given that we need the back-ref to the IIO device anyway). Signed-off-by: Alexandru Ardelean --- drivers/iio/adc/at91-sama5d2_adc.c | 30 +- 1 file changed, 17 insertions(+)

[PATCH] iio: Kconfig: at91_adc: add COMPILE_TEST dependency to driver

2020-05-25 Thread Alexandru Ardelean
a change for this. Signed-off-by: Alexandru Ardelean --- drivers/iio/adc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig index c48c0005..c1f4c0aec265 100644 --- a/drivers/iio/adc/Kconfig +++ b/drivers/iio/adc/Kconfig @

[PATCH] iio: at91_adc: remove usage of iio_priv_to_dev() helper

2020-05-25 Thread Alexandru Ardelean
. For this driver, not using iio_priv_to_dev(), means reworking some paths to pass the iio device and using iio_priv() to access the private information. Signed-off-by: Alexandru Ardelean --- drivers/iio/adc/at91_adc.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions

[PATCH v2] iio: stm32-adc: remove usage of iio_priv_to_dev() helper

2020-05-25 Thread Alexandru Ardelean
. For this driver, not using iio_priv_to_dev(), means reworking some paths to pass the iio device and using iio_priv() to access the private information. Signed-off-by: Alexandru Ardelean --- drivers/iio/adc/stm32-adc.c | 108 +++- 1 file changed, 58 insertions(+), 50

[PATCH v2] iio: stm32-dfsdm-adc: remove usage of iio_priv_to_dev() helper

2020-05-25 Thread Alexandru Ardelean
. For this driver, not using iio_priv_to_dev(), means reworking some paths to pass the iio device and using iio_priv() to access the private information. Signed-off-by: Alexandru Ardelean --- Changelog v1 -> v2: * changed some paths to pass a reference to ref to iio device and access private st

[PATCH] iio: stm32-dfsdm-adc: keep a reference to the iio device on the state struct

2020-05-22 Thread Alexandru Ardelean
to the IIO device on the state struct. Signed-off-by: Alexandru Ardelean --- drivers/iio/adc/stm32-dfsdm-adc.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/iio/adc/stm32-dfsdm-adc.c b/drivers/iio/adc/stm32-dfsdm-adc.c index 76a60d93fe23

[PATCH] iio: stm32-adc: keep a reference to the iio device on the state struct

2020-05-22 Thread Alexandru Ardelean
to the IIO device on the state struct. Signed-off-by: Alexandru Ardelean --- drivers/iio/adc/stm32-adc.c | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/drivers/iio/adc/stm32-adc.c b/drivers/iio/adc/stm32-adc.c index ae622ee6d08c..7e58c4443e3f 100644

[PATCH 3/3] iio: remove iio_triggered_buffer_postenable()/iio_triggered_buffer_predisable()

2020-05-22 Thread Alexandru Ardelean
From: Lars-Peter Clausen This patch should be squashed into the first one, as the first one is breaking the build (intentionally) to make the IIO core files easier to review. Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean --- drivers/iio/accel/adxl372.c

[PATCH 1/3] iio: Move attach/detach of the poll func to the core

2020-05-22 Thread Alexandru Ardelean
/detach the poll-function in the same order. Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean --- .../buffer/industrialio-triggered-buffer.c| 10 + drivers/iio/iio_core_trigger.h| 17 ++ drivers/iio/industrialio-buffer.c | 13

[PATCH 2/3] iio: adc: at91-sama5d2_adc: remove predisable/postenable hooks

2020-05-22 Thread Alexandru Ardelean
This should be squashed into the first patch, but it's the more peculiar of the changes. I am not sure whether this is correct. The touchscreen channels shouldn't be enabled by the IIO framework. So, we may need a different way to handle those if needed. Signed-off-by: Alexandru Ardelean

[PATCH 5/5] iio: remove left-over parent assignments

2020-05-22 Thread Alexandru Ardelean
)" fi done --- The output is bearable [after the semantic patch is applied]. There is a mix of trigger assignments with some iio device parent assignments that are removed via this patch. Signed-off-by: Alexandru Ardelean --- drivers/iio/accel/kxcjk-1013.c| 1 - driv

[PATCH 3/5] iio: remove left-over comments about parent assignment

2020-05-22 Thread Alexandru Ardelean
hem are removed by the semantic patch, as the comment removed (by spatch) would be for an empty line. Signed-off-by: Alexandru Ardelean --- drivers/iio/adc/ad7476.c | 1 - drivers/iio/adc/ad7887.c | 1 - drivers/iio/dac/ad5446.c | 1 - drivers/staging/iio/cdc/ad7746.c | 1 - 4 fi

[PATCH 4/5] iio: light: lm3533-als: remove explicit parent assignment

2020-05-22 Thread Alexandru Ardelean
This assignment is the more peculiar of the bunch as it assigns the parent of the platform-device's device (i.e. pdev->dev.parent) as the IIO device's parent. It's unclear whether this is intentional or not. Hence it is in it's own patch. Signed-off-by: Alexandru Ardelean --- drivers/iio/li

[PATCH 1/5] iio: core: pass parent device as parameter during allocation

2020-05-22 Thread Alexandru Ardelean
all devm_iio_device_alloc() calls will be handled. Signed-off-by: Alexandru Ardelean --- drivers/iio/dummy/iio_simple_dummy.c | 14 -- drivers/iio/industrialio-core.c | 11 ++- drivers/platform/x86/toshiba_acpi.c | 3 +-- drivers/staging/iio

[PATCH] iio: light: tsl2563: pass iio device as i2c_client private data

2020-05-22 Thread Alexandru Ardelean
. The implementation of iio_priv() will not be affected by the rework/hiding of iio_priv_to_dev(). Signed-off-by: Alexandru Ardelean --- drivers/iio/light/tsl2563.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/iio/light/tsl2563.c b/drivers/iio/light/tsl2563.c index

[PATCH] iio: humidity: hts221: remove usage of iio_priv_to_dev()

2020-05-22 Thread Alexandru Ardelean
on hts221_allocate_buffers() & hts221_allocate_trigger(). Signed-off-by: Alexandru Ardelean --- drivers/iio/humidity/hts221.h| 4 ++-- drivers/iio/humidity/hts221_buffer.c | 7 +++ drivers/iio/humidity/hts221_core.c | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff -

[PATCH] iio: light: iqs621: remove usage of iio_priv_to_dev()

2020-05-22 Thread Alexandru Ardelean
. Signed-off-by: Alexandru Ardelean --- drivers/iio/light/iqs621-als.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/iio/light/iqs621-als.c b/drivers/iio/light/iqs621-als.c index b2988a782bd0..1a056e2446ab 100644 --- a/drivers/iio/light/iqs621-als.c +++ b/drivers

[PATCH] iio: position: iqs624: remove usage of iio_priv_to_dev()

2020-05-22 Thread Alexandru Ardelean
. Signed-off-by: Alexandru Ardelean --- drivers/iio/position/iqs624-pos.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/iio/position/iqs624-pos.c b/drivers/iio/position/iqs624-pos.c index 77096c31c2ba..520dafbdc48f 100644 --- a/drivers/iio/position/iqs624

[PATCH v2] iio: proximity: ping: pass reference to IIO device as param to ping_read()

2020-05-18 Thread Alexandru Ardelean
iio_priv() which is a preferred practice than going back-n-forth (getting the state-struct, then using iio_priv_to_dev() to get the indio_dev object back). Signed-off-by: Alexandru Ardelean --- Changelog v1 -> v2: * split away from series * pass 'indio_dev' to ping_read() and get the info

<    2   3   4   5   6   7   8   9   10   >