Re: [PATCH v3 06/11] iio: core: merge buffer/ & scan_elements/ attributes

2021-02-04 Thread Alexandru Ardelean
On Wed, Feb 3, 2021 at 12:04 PM Andy Shevchenko wrote: > > On Mon, Feb 1, 2021 at 5:28 PM Alexandru Ardelean > wrote: > > > > With this change, we create a new directory for the IIO device called > > buffer0, under which both the old buffer/ and scan_elements/ are s

[PATCH v3 00/11] iio: core,buffer: add support for multiple IIO buffers per IIO device

2021-02-01 Thread Alexandru Ardelean
he rest of the iio_buffer attributes, it means we need to wrap them into iio_dev_attr One thing to be determined: if IIO_BUFFER_GET_FD_IOCTL for buffer0 should return an FD or not. Right now, it's returning 0. Alexandru Ardelean (11): docs: ioctl-number.rst: reserve IIO subsystem ioctl() space ii

[PATCH v3 03/11] iio: core-trigger: make iio_device_register_trigger_consumer() an int return

2021-02-01 Thread Alexandru Ardelean
Oddly enough the noop function is an int-return. This one seems to be void. This change converts it to int, because we want to change how groups are registered. With that change this function could error out with -ENOMEM. Signed-off-by: Alexandru Ardelean --- drivers/iio/iio_core_trigger.h

[PATCH v3 01/11] docs: ioctl-number.rst: reserve IIO subsystem ioctl() space

2021-02-01 Thread Alexandru Ardelean
is reserved for IIO ioctl() calls. Signed-off-by: Alexandru Ardelean --- Documentation/userspace-api/ioctl/ioctl-number.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/userspace-api/ioctl/ioctl-number.rst b/Documentation/userspace-api/ioctl/ioctl-number.rst index a4c75a28c839

[PATCH v3 02/11] iio: core: register chardev only if needed

2021-02-01 Thread Alexandru Ardelean
zed, cdev_device_add() behaves like device_add(). Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-core.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index 7db761afa578..0a6fd299a

[PATCH v3 04/11] iio: core: rework iio device group creation

2021-02-01 Thread Alexandru Ardelean
nnoy a few people since that would make the system less configurable. Signed-off-by: Alexandru Ardelean --- drivers/iio/iio_core.h | 3 +++ drivers/iio/industrialio-buffer.c | 12 +-- drivers/iio/industrialio-core.c| 32 +++--- drivers/iio/industri

[PATCH v3 05/11] iio: buffer: group attr count and attr alloc

2021-02-01 Thread Alexandru Ardelean
to the allocation of the scan_elements/ attributes to make grouping easier. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-buffer.c | 71 --- 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio

[PATCH v3 06/11] iio: core: merge buffer/ & scan_elements/ attributes

2021-02-01 Thread Alexandru Ardelean
IIO device object. This way the IIO buffer can have just a single attribute_group object, saving a bit of memory when adding multiple IIO buffers. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-buffer.c | 111 +++--- include/linux/iio/buffer_impl.h |

[PATCH v3 07/11] iio: add reference to iio buffer on iio_dev_attr

2021-02-01 Thread Alexandru Ardelean
by 1. This looks like it could do with a bit of a re-think. Signed-off-by: Alexandru Ardelean --- drivers/iio/iio_core.h| 2 ++ drivers/iio/industrialio-buffer.c | 4 drivers/iio/industrialio-core.c | 6 ++ drivers/iio/industrialio-event.c | 1 + include/linux/iio/sysfs.h

[PATCH v3 09/11] iio: core: wrap iio device & buffer into struct for character devices

2021-02-01 Thread Alexandru Ardelean
need to pass another buffer object than 'indio_dev->buffer'. Since we'll also open some chardevs via anon inodes, we can pass extra buffers in that function by assigning another object to the iio_dev_buffer_pair object. Signed-off-by: Alexandru Ardelean --- drivers/iio/iio_core.h

[PATCH v3 08/11] iio: buffer: wrap all buffer attributes into iio_dev_attr

2021-02-01 Thread Alexandru Ardelean
erging (or finalizing the merge) of the buffer/ & scan_elements/ attributes internally. Accessing these new buffer attributes can now be done via 'to_iio_dev_attr(attr)->buffer' inside the show/store handlers. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-

[PATCH v3 11/11] iio: buffer: add ioctl() to support opening extra buffers for IIO device

2021-02-01 Thread Alexandru Ardelean
name of_node power scan_elements subsystem uevent --- iio:device0 has some fake kfifo buffers attached to an IIO device. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-buffer.c | 118 +++

[PATCH v3 1/4] clk: axi-clkgen: replace ARCH dependencies with driver deps

2021-02-01 Thread Alexandru Ardelean
-by: Dragos Bogdan Signed-off-by: Alexandru Ardelean --- drivers/clk/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig index 85856cff506c..cee1d4e657bc 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -247,7 +247,8

[PATCH v3 3/4] dt-bindings: clock: adi,axi-clkgen: add compatible string for ZynqMP support

2021-02-01 Thread Alexandru Ardelean
The axi-clkgen driver now supports ZynqMP (UltraScale) as well, however the driver needs to use different PFD & VCO limits. For ZynqMP, these needs to be selected by using the 'adi,zynqmp-axi-clkgen-2.00.a' string. Signed-off-by: Alexandru Ardelean --- Documentation/devicetree/bindings/c

[PATCH v3 2/4] clk: clk-axiclkgen: add ZynqMP PFD and VCO limits

2021-02-01 Thread Alexandru Ardelean
-off-by: Alexandru Ardelean --- drivers/clk/clk-axi-clkgen.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/clk/clk-axi-clkgen.c b/drivers/clk/clk-axi-clkgen.c index ad86e031ba3e..9d1b0fc56c73 100644 --- a/drivers/clk/clk-axi-clkgen.c +++ b/drivers/clk/clk-axi-clkgen.c

[PATCH v3 4/4] clk: axi-clkgen: use devm_platform_ioremap_resource() short-hand

2021-02-01 Thread Alexandru Ardelean
No major functional change. Noticed while checking the driver code that this could be used. Saves two lines. Signed-off-by: Alexandru Ardelean --- drivers/clk/clk-axi-clkgen.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clk/clk-axi-clkgen.c b/drivers/clk/clk

[PATCH v3 0/4] clk: clk-axiclgen: add support for ZynqMP

2021-02-01 Thread Alexandru Ardelean
https://lore.kernel.org/linux-clk/20210126110826.24221-1-alexandru.ardel...@analog.com/ Changelog v2 -> v3: * added HAS_IOMEM || COMPILE_TEST and OF dependencies to driver in Kconfig * added patch 'clk: axi-clkgen: use devm_platform_ioremap_resource() short-hand' Alexandru Ardelean (4):

[PATCH v3 10/11] iio: buffer: introduce support for attaching more IIO buffers

2021-02-01 Thread Alexandru Ardelean
-ed for more buffers. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-buffer.c | 80 +-- include/linux/iio/buffer.h| 4 +- include/linux/iio/buffer_impl.h | 3 ++ include/linux/iio/iio-opaque.h| 4 ++ 4 files changed, 74 insertions(+), 17

[PATCH v2 1/3] clk: axi-clkgen: remove ARCH dependency in Kconfig

2021-01-26 Thread Alexandru Ardelean
with a ZynqMP/Zynq/Microblaze connected via PCIe. To accommodate for these cases, this change removes the limitation for this driver to be compilable only on Zynq/Microblaze architectures. Signed-off-by: Dragos Bogdan Signed-off-by: Alexandru Ardelean --- drivers/clk/Kconfig | 1 - 1 file

[PATCH v2 0/3] clk: clk-axiclgen: add support for ZynqMP

2021-01-26 Thread Alexandru Ardelean
PFD and VCO limits * essentially removed the 'adi,zynq-axi-clkgen-2.00.a' compat string * removed architecture dependency on build for driver; the driver should be usable also on PCIe setups Alexandru Ardelean (3): clk: axi-clkgen: remove ARCH dependency in Kconfig clk: clk-axiclkgen: add Zyn

[PATCH v2 3/3] dt-bindings: clock: adi,axi-clkgen: add compatible string for ZynqMP support

2021-01-26 Thread Alexandru Ardelean
The axi-clkgen driver now supports ZynqMP (UltraScale) as well, however the driver needs to use different PFD & VCO limits. For ZynqMP, these needs to be selected by using the 'adi,zynqmp-axi-clkgen-2.00.a' string. Signed-off-by: Alexandru Ardelean --- Documentation/devicetree/bindings/c

[PATCH v2 2/3] clk: clk-axiclkgen: add ZynqMP PFD and VCO limits

2021-01-26 Thread Alexandru Ardelean
-off-by: Alexandru Ardelean --- drivers/clk/clk-axi-clkgen.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/clk/clk-axi-clkgen.c b/drivers/clk/clk-axi-clkgen.c index ad86e031ba3e..9d1b0fc56c73 100644 --- a/drivers/clk/clk-axi-clkgen.c +++ b/drivers/clk/clk-axi-clkgen.c

Re: [PATCH v2 03/12][RESEND] iio: buffer: rework buffer & scan_elements dir creation

2021-01-26 Thread Alexandru Ardelean
On Mon, Jan 25, 2021 at 9:32 PM Greg Kroah-Hartman wrote: > > On Sun, Jan 24, 2021 at 06:11:26PM +, Jonathan Cameron wrote: > > On Fri, 22 Jan 2021 18:25:20 +0200 > > Alexandru Ardelean wrote: > > > > > When adding more than one IIO buffer per IIO devi

Re: [PATCH v2 12/12][RESEND] iio: buffer: add ioctl() to support opening extra buffers for IIO device

2021-01-24 Thread Alexandru Ardelean
On Sun, Jan 24, 2021 at 8:41 PM Jonathan Cameron wrote: > > On Fri, 22 Jan 2021 18:25:29 +0200 > Alexandru Ardelean wrote: > > > With this change, an ioctl() call is added to open a character device for a > > buffer. > > The ioctl() will return a 0 FD for the first

Re: [PATCH v2 03/12][RESEND] iio: buffer: rework buffer & scan_elements dir creation

2021-01-24 Thread Alexandru Ardelean
On Sun, Jan 24, 2021 at 8:13 PM Jonathan Cameron wrote: > > On Fri, 22 Jan 2021 18:25:20 +0200 > Alexandru Ardelean wrote: > > > When adding more than one IIO buffer per IIO device, we will need to create > > a buffer & scan_elements directory for each buff

[PATCH v2 05/12] iio: core: split __iio_device_attr_init() to init only the attr object

2021-01-22 Thread Alexandru Ardelean
the creation of the attribute name. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-core.c | 43 + 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index 95d66745f118

[PATCH v2 03/12] iio: buffer: rework buffer & scan_elements dir creation

2021-01-22 Thread Alexandru Ardelean
gned-off-by: Alexandru Ardelean --- drivers/iio/industrialio-buffer.c | 195 +++--- drivers/iio/industrialio-core.c | 24 ++-- include/linux/iio/buffer_impl.h | 14 ++- include/linux/iio/iio.h | 2 +- 4 files changed, 200 insertions(+), 35 deletions(-) di

[PATCH v2 04/12] iio: buffer: add index to the first IIO buffer dir and symlink it back

2021-01-22 Thread Alexandru Ardelean
This change makes it so that the first buffer directory is named 'buffer0' and moves the 'scan_elements' under it. For backwards compatibility these folders are symlinked back to the original folders. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-buffer.c | 66

[PATCH v2 00/12] iio: core,buffer: add support for multiple IIO buffers per IIO device

2021-01-22 Thread Alexandru Ardelean
is also bad; Alexandru Ardelean (12): iio: core: register chardev only if needed iio: buffer: add back-ref from iio_buffer to iio_dev iio: buffer: rework buffer & scan_elements dir creation iio: buffer: add index to the first IIO buffer dir and symlink it back iio:

[PATCH v2 02/12] iio: buffer: add back-ref from iio_buffer to iio_dev

2021-01-22 Thread Alexandru Ardelean
to the IIO device [from the IIO buffer]. This change adds that. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-buffer.c | 2 ++ include/linux/iio/buffer_impl.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio

[PATCH v2 01/12] iio: core: register chardev only if needed

2021-01-22 Thread Alexandru Ardelean
zed, cdev_device_add() behaves like device_add(). Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-core.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index 7db761afa578..0a6fd299a

[PATCH v2 09/12][RESEND] iio: re-route all buffer attributes through new buffer kobj_type

2021-01-22 Thread Alexandru Ardelean
weird at first, as most of them will just pass back their reference to the IIO device. But this can also allow for newer (maybe more interesting) uses. Signed-off-by: Alexandru Ardelean --- drivers/iio/accel/adxl372.c | 36 - drivers/iio/accel/bmc150-accel-core.c

[PATCH v2 11/12][RESEND] iio: buffer: introduce support for attaching more IIO buffers

2021-01-22 Thread Alexandru Ardelean
-ed for more buffers. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-buffer.c | 67 --- include/linux/iio/buffer.h| 4 +- include/linux/iio/buffer_impl.h | 3 ++ include/linux/iio/iio-opaque.h| 4 ++ 4 files changed, 62 insertions(+), 16

[PATCH v2 08/12][RESEND] iio: buffer: add helper to get the IIO device to which a buffer belongs

2021-01-22 Thread Alexandru Ardelean
This is useful for drivers that may have a reference to an IIO buffer, to be able to get a reference back to the IIO device. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-buffer.c | 14 ++ include/linux/iio/buffer.h| 2 ++ 2 files changed, 16 insertions

[PATCH v2 07/12][RESEND] iio: buffer: re-route core buffer attributes via it's new kobj_type

2021-01-22 Thread Alexandru Ardelean
For the buffer attributes that are present inside the IIO core buffer logic we can re-route them to expand the attribute into iio_buffer objects. The rest, will still expand to device_attributes. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-buffer.c | 113

[PATCH v2 10/12][RESEND] iio: core: wrap iio device & buffer into struct for character devices

2021-01-22 Thread Alexandru Ardelean
need to pass another buffer object than 'indio_dev->buffer'. Since we'll also open some chardevs via anon inodes, we can pass extra buffers in that function by assigning another object to the iio_dev_buffer_pair object. Signed-off-by: Alexandru Ardelean --- drivers/iio/iio_core.h

[PATCH v2 02/12][RESEND] iio: buffer: add back-ref from iio_buffer to iio_dev

2021-01-22 Thread Alexandru Ardelean
to the IIO device [from the IIO buffer]. This change adds that. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-buffer.c | 2 ++ include/linux/iio/buffer_impl.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio

[PATCH v2 12/12][RESEND] iio: buffer: add ioctl() to support opening extra buffers for IIO device

2021-01-22 Thread Alexandru Ardelean
name of_node power scan_elements subsystem uevent --- iio:device0 has some fake kfifo buffers attached to an IIO device. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-buffer.c | 119 ++ drivers/iio/industrialio-core.c | 8 ++ include/linux/iio/buffer_im

[PATCH v2 06/12][RESEND] iio: buffer: re-route scan_elements via it's kobj_type

2021-01-22 Thread Alexandru Ardelean
need to the 'kobj' to expand from the 'bufferX' directory back to an IIO buffer. kobjects are simpler to manage. Signed-off-by: Alexandru Ardelean --- drivers/iio/iio_core.h| 5 + drivers/iio/industrialio-buffer.c | 160 +++--- drivers/iio/industrialio-core.c | 1

[PATCH v2 03/12][RESEND] iio: buffer: rework buffer & scan_elements dir creation

2021-01-22 Thread Alexandru Ardelean
gned-off-by: Alexandru Ardelean --- drivers/iio/industrialio-buffer.c | 195 +++--- drivers/iio/industrialio-core.c | 24 ++-- include/linux/iio/buffer_impl.h | 14 ++- include/linux/iio/iio.h | 2 +- 4 files changed, 200 insertions(+), 35 deletions(-) di

[PATCH v2 04/12][RESEND] iio: buffer: add index to the first IIO buffer dir and symlink it back

2021-01-22 Thread Alexandru Ardelean
This change makes it so that the first buffer directory is named 'buffer0' and moves the 'scan_elements' under it. For backwards compatibility these folders are symlinked back to the original folders. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-buffer.c | 66

[PATCH v2 05/12][RESEND] iio: core: split __iio_device_attr_init() to init only the attr object

2021-01-22 Thread Alexandru Ardelean
the creation of the attribute name. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-core.c | 43 + 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index 95d66745f118

[PATCH v2 01/12][RESEND] iio: core: register chardev only if needed

2021-01-22 Thread Alexandru Ardelean
zed, cdev_device_add() behaves like device_add(). Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-core.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index 7db761afa578..0a6fd299a

[PATCH v2 00/12][RESEND] iio: core,buffer: add support for multiple IIO buffers per IIO device

2021-01-22 Thread Alexandru Ardelean
is also bad; Alexandru Ardelean (12): iio: core: register chardev only if needed iio: buffer: add back-ref from iio_buffer to iio_dev iio: buffer: rework buffer & scan_elements dir creation iio: buffer: add index to the first IIO buffer dir and symlink it back iio:

Re: [PATCH v2 06/12] iio: buffer: re-route scan_elements via it's kobj_type

2021-01-22 Thread Alexandru Ardelean
On Fri, Jan 22, 2021 at 5:57 PM Alexandru Ardelean wrote: > > The scan_elements attributes are solely located inside > 'industrialio-buffer-sysfs.c'. In order to support more than one buffer per > IIO device, we need to expand scan_elements attributes directly to IIO >

[PATCH v2 07/12] iio: buffer: re-route core buffer attributes via it's new kobj_type

2021-01-22 Thread Alexandru Ardelean
For the buffer attributes that are present inside the IIO core buffer logic we can re-route them to expand the attribute into iio_buffer objects. The rest, will still expand to device_attributes. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-buffer.c | 113

[PATCH v2 09/12] iio: re-route all buffer attributes through new buffer kobj_type

2021-01-22 Thread Alexandru Ardelean
weird at first, as most of them will just pass back their reference to the IIO device. But this can also allow for newer (maybe more interesting) uses. Signed-off-by: Alexandru Ardelean --- drivers/iio/accel/adxl372.c | 36 - drivers/iio/accel/bmc150-accel-core.c

[PATCH v2 11/12] iio: buffer: introduce support for attaching more IIO buffers

2021-01-22 Thread Alexandru Ardelean
-ed for more buffers. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-buffer.c | 67 --- include/linux/iio/buffer.h| 4 +- include/linux/iio/buffer_impl.h | 3 ++ include/linux/iio/iio-opaque.h| 4 ++ 4 files changed, 62 insertions(+), 16

[PATCH v2 12/12] iio: buffer: add ioctl() to support opening extra buffers for IIO device

2021-01-22 Thread Alexandru Ardelean
name of_node power scan_elements subsystem uevent --- iio:device0 has some fake kfifo buffers attached to an IIO device. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-buffer.c | 119 ++ drivers/iio/industrialio-core.c | 8 ++ include/linux/iio/buffer_im

[PATCH v2 10/12] iio: core: wrap iio device & buffer into struct for character devices

2021-01-22 Thread Alexandru Ardelean
need to pass another buffer object than 'indio_dev->buffer'. Since we'll also open some chardevs via anon inodes, we can pass extra buffers in that function by assigning another object to the iio_dev_buffer_pair object. Signed-off-by: Alexandru Ardelean --- drivers/iio/iio_core.h

[PATCH v2 06/12] iio: buffer: re-route scan_elements via it's kobj_type

2021-01-22 Thread Alexandru Ardelean
need to the 'kobj' to expand from the 'bufferX' directory back to an IIO buffer. kobjects are simpler to manage. Signed-off-by: Alexandru Ardelean --- drivers/iio/iio_core.h| 5 + drivers/iio/industrialio-buffer.c | 160 +++--- drivers/iio/industrialio-core.c | 1

[PATCH v2 08/12] iio: buffer: add helper to get the IIO device to which a buffer belongs

2021-01-22 Thread Alexandru Ardelean
This is useful for drivers that may have a reference to an IIO buffer, to be able to get a reference back to the IIO device. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-buffer.c | 14 ++ include/linux/iio/buffer.h| 2 ++ 2 files changed, 16 insertions

Re: [PATCH v2] iio: core: register chardev only if needed

2021-01-19 Thread Alexandru Ardelean
On Sun, Dec 13, 2020 at 4:31 PM Jonathan Cameron wrote: > > On Wed, 9 Dec 2020 17:55:22 +0200 > Alexandru Ardelean wrote: > > > On Wed, Dec 9, 2020 at 5:53 PM Andy Shevchenko > > wrote: > > > > > > On Wed, Dec 9, 2020 at 5:45 PM Alexandru Ardelean >

[PATCH] spi: cadence: cache reference clock rate during probe

2021-01-14 Thread Alexandru Ardelean
From: Michael Hennerich The issue is that using SPI from a callback under the CCF lock will deadlock, since this code uses clk_get_rate(). Fixes: c474b38665463 ("spi: Add driver for Cadence SPI controller") Signed-off-by: Michael Hennerich Signed-off-by: Alexandru Ardelean --- d

Re: [PATCH v3 3/4] hwmon: (ltc2945): add support for sense resistor

2021-01-08 Thread Alexandru Ardelean
On Thu, Jan 7, 2021 at 7:35 PM Guenter Roeck wrote: > > On Thu, Jan 07, 2021 at 05:44:33PM +0200, Alexandru Ardelean wrote: > > > > > > Note that this patch doesn't compile on 32-bit targets. > > > > Yeah, my bad. > > I only tested with make al

Re: [PATCH v3 3/4] hwmon: (ltc2945): add support for sense resistor

2021-01-07 Thread Alexandru Ardelean
On Thu, Jan 7, 2021 at 5:25 PM Guenter Roeck wrote: > > On Thu, Jan 07, 2021 at 12:34:16PM +0200, Alexandru Ardelean wrote: > > The sense resistor is a parameter of the board. It should be configured in > > the driver via a device-tree / ACPI property, so that the proper curren

Re: [PATCH v3 3/4] hwmon: (ltc2945): add support for sense resistor

2021-01-07 Thread Alexandru Ardelean
ttps://github.com/0day-ci/linux/commits/Alexandru-Ardelean/hwmon-ltc2945-add-support-for-sense-resistor/20210107-183412 > base: > https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git > hwmon-next > config: openrisc-randconfig-r011-20210107 (attached as .config)

[PATCH v8] iio: Handle enumerated properties with gaps

2021-01-07 Thread Alexandru Ardelean
. A reserved values is marked by setting its entry in the items array to NULL rather than the normal descriptive string value. Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean --- Changelog v7 -> v8: * https://lore.kernel.org/linux-iio/20210107084434.35283-1-alexandru.ar

[PATCH v3 1/4] hwmon: (ltc2945): wrap regmap into an ltc2945_state struct

2021-01-07 Thread Alexandru Ardelean
The intent is to add pass the value of the sense resistor in the driver. This change wraps a 'struct ltc2945_state', and moves the regmap reference on that object. Then we can add the value of the sense resistor, or other information that would be useful for the driver. Signed-off-by: Alexandru

[PATCH v3 4/4] dt-bindings: hwmon: ltc2945: add device tree doc for ltc2945

2021-01-07 Thread Alexandru Ardelean
This change adds a device-tree binding documentation for the Linear Technology (now Analog Devices) LTC2945 Wide Range I2C Power Monitor. Reviewed-by: Rob Herring Signed-off-by: Alexandru Ardelean --- .../bindings/hwmon/adi,ltc2945.yaml | 49 +++ 1 file changed, 49

[PATCH v3 3/4] hwmon: (ltc2945): add support for sense resistor

2021-01-07 Thread Alexandru Ardelean
of the sense resistor. Signed-off-by: Alexandru Ardelean --- drivers/hwmon/ltc2945.c | 60 ++--- 1 file changed, 39 insertions(+), 21 deletions(-) diff --git a/drivers/hwmon/ltc2945.c b/drivers/hwmon/ltc2945.c index 41df2c8b7673..e60b15832b0e 100644 --- a/drivers/hwmon

[PATCH v3 2/4] hwmon: (ltc2945): clamp values before converting

2021-01-07 Thread Alexandru Ardelean
10480 Watts, which in micro-Watts ends up being around 10 billion micro-Watts. Current and voltage is represented in millis, so these can be clamped. Signed-off-by: Alexandru Ardelean --- drivers/hwmon/ltc2945.c | 48 + 1 file changed, 48 insertions

[PATCH v3 0/4] hwmon: (ltc2945): add support for sense resistor

2021-01-07 Thread Alexandru Ardelean
wer resistor value that 1 mOhm, and all resistor values need to be integer in mOhm. - added max power and max amps limits, adjusted to sense resistor * for patch 'dt-bindings: hwmon: ltc2945: add device tree doc for ltc2945 ' added 'Reviewed-by: Rob Herring ' Alexandru Ardelean (4): hw

[PATCH v7 2/2] iio: Handle enumerated properties with gaps

2021-01-07 Thread Alexandru Ardelean
. A reserved values is marked by setting its entry in the items array to NULL rather than the normal descriptive string value. Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-core.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git

[PATCH v7 1/2] lib/string.c: add __sysfs_match_string_with_gaps() helper

2021-01-07 Thread Alexandru Ardelean
. If n > 0, the search will continue until the element is found or n is reached. If n < 0, the search will continue until the element is found or a NULL character is found. Signed-off-by: Alexandru Ardelean --- FWIW (from my side): I am not fully sure yet that implementing a new helper is th

[PATCH v2] spi: stm32: update dev_dbg() print format for SPI params

2021-01-04 Thread Alexandru Ardelean
n Rothwell Cc: Andy Shevchenko Signed-off-by: Alexandru Ardelean --- Changelog v1 -> v2: * revert to using '%d' specifiers * add !! operatior to bit-masking; this way the types are automatically re-cast * add 'Reported-by: kernel test robot ' drivers/spi/spi-stm32.c | 8 1 fi

[PATCH] spi: stm32: update dev_dbg() print format for SPI params

2021-01-04 Thread Alexandru Ardelean
for this change. Fixes: f7005142dace ("spi: uapi: unify SPI modes into a single spi.h header") Reported-by: Stephen Rothwell Cc: Andy Shevchenko Signed-off-by: Alexandru Ardelean --- drivers/spi/spi-stm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi

Re: [PATCH v6 1/2] lib/string.c: add __sysfs_match_string_with_gaps() helper

2020-12-22 Thread Alexandru Ardelean
On Tue, Dec 22, 2020 at 3:43 PM Andy Shevchenko wrote: > > On Tue, Dec 22, 2020 at 3:09 PM Alexandru Ardelean > wrote: > > > > The original docstring of the __sysfs_match_string() and match_string() > > helper, implied that -1 could be used to search through

[PATCH v6 2/2] iio: Handle enumerated properties with gaps

2020-12-22 Thread Alexandru Ardelean
. A reserved values is marked by setting its entry in the items array to NULL rather than the normal descriptive string value. Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-core.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git

[PATCH v6 1/2] lib/string.c: add __sysfs_match_string_with_gaps() helper

2020-12-22 Thread Alexandru Ardelean
. If n > 0, the search will continue until the element is found or n is reached. If n < 0, the search will continue until the element is found or a NULL character is found. Signed-off-by: Alexandru Ardelean --- Changelog v5 -> v6 * https://lore.kernel.org/linux-iio/2020122209521

Re: [PATCH v5 1/2] lib/string.c: add __sysfs_match_string_with_gaps() helper

2020-12-22 Thread Alexandru Ardelean
On Tue, Dec 22, 2020 at 1:13 PM Greg KH wrote: > > On Tue, Dec 22, 2020 at 11:52:09AM +0200, Alexandru Ardelean wrote: > > The original docstring of the __sysfs_match_string() and match_string() > > helper, implied that -1 could be used to search through NULL terminated > &

[PATCH v5 1/2] lib/string.c: add __sysfs_match_string_with_gaps() helper

2020-12-22 Thread Alexandru Ardelean
r n is reached. If n < 0, the search will continue until the element is found or a NULL character is found. Signed-off-by: Alexandru Ardelean --- Changelog v4 -> v5: * https://patchwork.kernel.org/project/linux-iio/patch/20201221151551.52511-1-alexandru.ardel...@analog.com/ * add 'lib/stri

[PATCH v5 2/2] iio: Handle enumerated properties with gaps

2020-12-22 Thread Alexandru Ardelean
. A reserved values is marked by setting its entry in the items array to NULL rather than the normal descriptive string value. Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-core.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git

Re: [PATCH v4] iio: Handle enumerated properties with gaps

2020-12-22 Thread Alexandru Ardelean
On Tue, Dec 22, 2020 at 9:21 AM Alexandru Ardelean wrote: > > On Mon, Dec 21, 2020 at 8:02 PM Andy Shevchenko > wrote: > > > > On Mon, Dec 21, 2020 at 5:11 PM Alexandru Ardelean > > wrote: > > > > > > From: Lars-Peter Clausen > > &g

Re: [PATCH v4] iio: Handle enumerated properties with gaps

2020-12-21 Thread Alexandru Ardelean
On Mon, Dec 21, 2020 at 8:02 PM Andy Shevchenko wrote: > > On Mon, Dec 21, 2020 at 5:11 PM Alexandru Ardelean > wrote: > > > > From: Lars-Peter Clausen > > > > Some enums might have gaps or reserved values in the middle of their value > > range. E.g. cons

[PATCH v6 2/3] spi: Add SPI_NO_TX/RX support

2020-12-21 Thread Alexandru Ardelean
of these two lines is missing and to adjust the transfers accordingly. Signed-off-by: Dragos Bogdan Signed-off-by: Alexandru Ardelean --- Changelog v5 -> v6: * https://patchwork.kernel.org/project/spi-devel-general/patch/20201221141906.48922-2-alexandru.ardel...@analog.com/ * merged on single l

[PATCH v6 3/3] spi: dt-bindings: document zero value for spi-{rx,tx}-bus-width properties

2020-12-21 Thread Alexandru Ardelean
Following a change to the SPI framework, providing a value of zero for 'spi-rx-bus-width' and 'spi-tx-bus-width' is now possible and will essentially mean that no RX or TX is allowed. Reviewed-by: Rob Herring Signed-off-by: Alexandru Ardelean --- Changelog v5 -> v6: * ht

[PATCH v6 1/3] spi: uapi: unify SPI modes into a single spi.h header

2020-12-21 Thread Alexandru Ardelean
of these bitfields to _BITUL() macro. Reviewed-by: Andy Shevchenko Signed-off-by: Alexandru Ardelean --- Changelog v5 -> v6: * https://patchwork.kernel.org/project/spi-devel-general/patch/20201221141906.48922-1-alexandru.ardel...@analog.com/ * no change include/linux/spi/spi.h |

[PATCH v4] iio: Handle enumerated properties with gaps

2020-12-21 Thread Alexandru Ardelean
. A reserved values is marked by setting its entry in the items array to NULL rather than the normal descriptive string value. Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean --- Nearly 1 year and a half since I last touched this: https://lore.kernel.org/linux-iio/20190508111913.7276-3

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

2020-12-21 Thread Alexandru Ardelean
of that platform. Signed-off-by: Dragos Bogdan Signed-off-by: Mathias Tausen Signed-off-by: Alexandru Ardelean --- This is a re-spin of an older series. It needed to wait a txt -> yaml dt conversion: https://patchwork.kernel.org/project/linux-clk/patch/20201013143421.84188-1-alexandru.ar

[PATCH 2/2] dt-bindings: clock: adi,axi-clkgen: add Zynq & ZynqMP compatible strings

2020-12-21 Thread Alexandru Ardelean
have as the original compatible string (i.e. 'adi,axi-clkgen-2.00.a'). Signed-off-by: Alexandru Ardelean --- Documentation/devicetree/bindings/clock/adi,axi-clkgen.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/adi,axi-clkgen.yaml b/Documenta

[PATCH v5 1/3] spi: uapi: unify SPI modes into a single spi.h header

2020-12-21 Thread Alexandru Ardelean
of these bitfields to _BITUL() macro. Reviewed-by: Andy Shevchenko Signed-off-by: Alexandru Ardelean --- Changelog v4 -> v5: * https://lore.kernel.org/linux-spi/20201203140531.74470-1-alexandru.ardel...@analog.com/ * added 'Reviewed-by: Andy Shevchenko ' include/linux/spi/spi.h |

[PATCH v5 3/3] spi: dt-bindings: document zero value for spi-{rx,tx}-bus-width properties

2020-12-21 Thread Alexandru Ardelean
Following a change to the SPI framework, providing a value of zero for 'spi-rx-bus-width' and 'spi-tx-bus-width' is now possible and will essentially mean that no RX or TX is allowed. Reviewed-by: Rob Herring Signed-off-by: Alexandru Ardelean --- Changelog v4 -> v5: * https://lore.kernel.

[PATCH v5 2/3] spi: Add SPI_NO_TX/RX support

2020-12-21 Thread Alexandru Ardelean
of these two lines is missing and to adjust the transfers accordingly. Signed-off-by: Dragos Bogdan Signed-off-by: Alexandru Ardelean --- Changelog v4 -> v5: * https://lore.kernel.org/linux-spi/20201203140531.74470-2-alexandru.ardel...@analog.com/ * using static_assert() vs BUILD_BUG_ON() * ad

Re: [RFC PATCH 0/5] iio: move 'modes' initialization to core

2020-12-20 Thread Alexandru Ardelean
On Sat, Dec 5, 2020 at 8:42 PM Jonathan Cameron wrote: > > On Thu, 3 Dec 2020 12:04:18 +0200 > Alexandru Ardelean wrote: > > > I stumbled over this, while trying to implement some changes to the IIO > > buffer logic. > > Seems that most drivers have a IN

Re: [PATCH v2] iio: core: register chardev only if needed

2020-12-09 Thread Alexandru Ardelean
On Wed, Dec 9, 2020 at 5:53 PM Andy Shevchenko wrote: > > On Wed, Dec 9, 2020 at 5:45 PM Alexandru Ardelean > wrote: > > On Wed, Dec 9, 2020 at 5:37 PM Andy Shevchenko > > wrote: > > > On Thu, Dec 3, 2020 at 11:55 AM Alexandru Ardelean > > > wrote: > &

Re: [PATCH v2] iio: core: register chardev only if needed

2020-12-09 Thread Alexandru Ardelean
On Wed, Dec 9, 2020 at 5:37 PM Andy Shevchenko wrote: > > On Thu, Dec 3, 2020 at 11:55 AM Alexandru Ardelean > wrote: > > > > We only need a chardev if we need to support buffers and/or events. > > > > With this change, a chardev will be created only

Re: [PATCH 1/3] iio: dummy: convert all simple allocation devm_ variants

2020-12-06 Thread Alexandru Ardelean
On Sat, Dec 5, 2020 at 8:46 PM Jonathan Cameron wrote: > > On Thu, 3 Dec 2020 11:50:03 +0200 > Alexandru Ardelean wrote: > > > Since a main requirement for an IIO device is to have a parent device > > object, it makes sense to attach more of the IIO device's obj

[PATCH v4 3/3] spi: dt-bindings: document zero value for spi-{rx,tx}-bus-width properties

2020-12-03 Thread Alexandru Ardelean
Following a change to the SPI framework, providing a value of zero for 'spi-rx-bus-width' and 'spi-tx-bus-width' is now possible and will essentially mean that no RX or TX is allowed. Signed-off-by: Alexandru Ardelean --- Changelog v3 -> v4: * https://lore.kernel.org/linux-

[PATCH v4 2/3] spi: Add SPI_NO_TX/RX support

2020-12-03 Thread Alexandru Ardelean
of these two lines is missing and to adjust the transfers accordingly. Signed-off-by: Dragos Bogdan Signed-off-by: Alexandru Ardelean --- Changelog v3 -> v4: * https://lore.kernel.org/linux-spi/20201127130834.136348-2-alexandru.ardel...@analog.com/ * moved SPI_NO_TX + SPI_NO_RX to internal spi.h hea

[PATCH v4 1/3] spi: uapi: unify SPI modes into a single spi.h header

2020-12-03 Thread Alexandru Ardelean
of these bitfields to _BITUL() macro. Signed-off-by: Alexandru Ardelean --- Changelog v3 -> v4: * https://lore.kernel.org/linux-spi/20201127130834.136348-1-alexandru.ardel...@analog.com/ * uapi -> uAPI in comment * removed extra license text in 'uapi/linux/spi/spi.h' * using _BITUL() macro include

[RFC PATCH 0/5] iio: move 'modes' initialization to core

2020-12-03 Thread Alexandru Ardelean
dea is far from being ready, but I thought I'd try this RFC instead as a discussion starter in that direction. Alexandru Ardelean (5): iio: core: initialize 'modes' to INDIO_DIRECT_MODE by default iio,counter: remove modes init for INDIO_DIRECT_MODE only drivers iio: remove modes i

[RFC PATCH 4/5] iio: adc: ad7768-1: remove explicit modes initialization

2020-12-03 Thread Alexandru Ardelean
The INDIO_DIRECT_MODE mode bit will be set by iio_device_alloc() and iio_triggered_buffer_setup() will set the INDIO_BUFFER_TRIGGERED bit. Signed-off-by: Alexandru Ardelean --- drivers/iio/adc/ad7768-1.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/iio/adc/ad7768-1.c b/drivers/iio

[RFC PATCH 5/5] iio: magnetometer: rm3100: remove explicit modes initialization

2020-12-03 Thread Alexandru Ardelean
The INDIO_DIRECT_MODE mode bit will be set by iio_device_alloc() and iio_triggered_buffer_setup() will set the INDIO_BUFFER_TRIGGERED bit. Signed-off-by: Alexandru Ardelean --- drivers/iio/magnetometer/rm3100-core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/iio/magnetometer

[RFC PATCH 3/5] iio: remove modes init for INDIO_DIRECT_MODE only drivers (manual)

2020-12-03 Thread Alexandru Ardelean
initialize to INDIO_DIRECT_MODE only. Signed-off-by: Alexandru Ardelean --- drivers/iio/accel/st_accel_core.c | 1 - drivers/iio/adc/ltc2497-core.c | 1 - drivers/iio/gyro/st_gyro_core.c | 1 - drivers/iio/magnetometer/st_magn_core.c | 1 - drivers/iio/pressure

[RFC PATCH 1/5] iio: core: initialize 'modes' to INDIO_DIRECT_MODE by default

2020-12-03 Thread Alexandru Ardelean
. This would not affect any current IIO driver. Then for the IIO devices that only have direct-mode, this initialization can be removed, since it becomes boiler-plate code. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-core.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v2] iio: core: split __iio_device_attr_init() to init only the attr object

2020-12-03 Thread Alexandru Ardelean
the creation of the attribute name. Signed-off-by: Alexandru Ardelean --- Changelog v1 -> v2: * https://lore.kernel.org/linux-iio/20201117162340.43924-6-alexandru.ardel...@analog.com/ * split away from series; I don't know when I will have time to re-visit the entire original series, so mi

[PATCH v2] iio: core: register chardev only if needed

2020-12-03 Thread Alexandru Ardelean
zed, cdev_device_add() behaves like device_add(). Signed-off-by: Alexandru Ardelean --- Changelog v1 -> v2: * https://lore.kernel.org/linux-iio/20201117162340.43924-2-alexandru.ardel...@analog.com/ * split away from series; I don't know when I will have time to re-visit the entire original series, so

[PATCH 1/3] iio: dummy: convert all simple allocation devm_ variants

2020-12-03 Thread Alexandru Ardelean
with most IIO drivers. This change tackles the simple allocations, to convert them to device-managed calls, and tie them to the parent device. Signed-off-by: Alexandru Ardelean --- drivers/iio/dummy/iio_simple_dummy.c | 29 1 file changed, 8 insertions(+), 21 deletions

[PATCH 3/3] iio: dummy: use devm_iio_triggered_buffer_setup() for buffer setup

2020-12-03 Thread Alexandru Ardelean
->name'. Signed-off-by: Alexandru Ardelean --- drivers/iio/dummy/iio_simple_dummy.c| 37 +- drivers/iio/dummy/iio_simple_dummy.h| 11 +-- drivers/iio/dummy/iio_simple_dummy_buffer.c | 78 ++--- 3 files changed, 13 insertions(+), 113 deletions(-) diff --

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