,
and so can it's usage/call.
Signed-off-by: Alexandru Ardelean
---
drivers/iio/dummy/iio_simple_dummy.c| 8 +---
drivers/iio/dummy/iio_simple_dummy.h| 9 +---
drivers/iio/dummy/iio_simple_dummy_events.c | 53 +
3 files changed, 26 insertions(+), 44 dele
change implements support for these registers using the PHY
statistics mechanism.
Signed-off-by: Alexandru Ardelean
---
drivers/net/phy/adin.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/adin.c b/drivers/net/phy/adin.c
index 55a0b91816e2
The change is mostly cosmetic. No functional changes.
Since the driver now uses of_device_get_match_data() to obtain some driver
specific info, there is no need to define the OF table before the probe
function.
Signed-off-by: Alexandru Ardelean
---
drivers/clk/clk-axi-clkgen.c | 18
stored on the device-tree OF table, so that we can adjust
them via the compatible string.
Signed-off-by: Alexandru Ardelean
---
Initial send:
https://lore.kernel.org/linux-clk/20201019111809.56374-1-alexandru.ardel...@analog.com/
drivers/clk/clk-axi-clkgen.c | 48 +++-
When the conversion was done to use devm_iio_kfifo_allocate(), a call to
iio_kfifo_free() was omitted (to be removed).
This change removes it.
Fixes: 3c5308058899 ("iio: adc: ti_am335x_adc: alloc kfifo & IRQ via devm_
functions")
Signed-off-by: Alexandru Ardelean
---
Seems I was
On Mon, Oct 19, 2020 at 2:14 PM Alexandru Ardelean
wrote:
>
> Up until now the these limits were global/hard-coded, since they are
> typically limits of the fabric.
>
> However, since this is an FPGA generated clock, this may run on setups
> where one clock is on a fabri
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 than no RX or TX is allowed.
Signed-off-by: Alexandru Ardelean
---
Documentation/devicetree/bindings/spi/spi-controlle
For now, this change does a simple move; no conversions to BIT() macros are
being done at this point. This can be done later, as that requires also
another header inclusion (the 'const.h' header).
The change as-is makes this 'spi.h' header more standalone.
Signed-off-by: Alexandr
two lines is missing and to adjust the transfers accordingly.
Signed-off-by: Dragos Bogdan
Signed-off-by: Alexandru Ardelean
---
drivers/spi/spi.c| 26 +-
include/uapi/linux/spi/spi.h | 2 ++
2 files changed, 23 insertions(+), 5 deletions(-)
diff --git a
On Sat, Nov 21, 2020 at 5:38 PM Jonathan Cameron wrote:
>
> On Thu, 19 Nov 2020 12:07:45 +0200
> Alexandru Ardelean wrote:
>
> > This change converts the configuration of the dual-channel mode from the
> > old platform-data, to the device_property_present() function,
This change wraps the devices supported by the adp5589 driver into a chip
info struct. With this, a device table can be created, and the probed
device can be selected based on the enum value provided by the i2c driver
data.
Signed-off-by: Alexandru Ardelean
---
drivers/input/keyboard/adp5589
From: Lars-Peter Clausen
Add very basic devicetree suppport to the adp5589 allowing the device to be
registered from devicetree and ACPI via PRP0001.
Signed-off-by: Lars-Peter Clausen
Signed-off-by: Alexandru Ardelean
---
drivers/input/keyboard/adp5589-keys.c | 30
This change adds the device-tree entries for the Analog Devices ADP5585 and
ADP5589 devices to the trivial devices list.
Signed-off-by: Alexandru Ardelean
---
Documentation/devicetree/bindings/trivial-devices.yaml | 6 ++
1 file changed, 6 insertions(+)
diff --git a/Documentation
.
Signed-off-by: Lars-Peter Clausen
Signed-off-by: Alexandru Ardelean
---
Changelog v2 - v3:
*
https://lore.kernel.org/linux-input/20201124082255.13427-1-alexandru.ardel...@analog.com/
* added patch 'dt-bindings: add ADP5585/ADP5589 entries to trivial-devices'
drivers/input/keyboa
(or dev_get_drvdata()) call that need it.
Cc: Colin Ian King
Signed-off-by: Alexandru Ardelean
---
drivers/iio/adc/ad7298.c | 46 +---
1 file changed, 15 insertions(+), 31 deletions(-)
diff --git a/drivers/iio/adc/ad7298.c b/drivers/iio/adc/ad7298.c
index fa1047f
'st->ext_ref' & 'st->reg' are both non-zero/non-null at the same time, so
logically the code isn't broken.
But it is more correct to check that 'st->reg' is non-null, since we make
sure that the regulator is NULL (in probe) in case one isn't d
de for ADI Sigma Delta devices")
Signed-off-by: Lars-Peter Clausen
Signed-off-by: Alexandru Ardelean
---
drivers/iio/adc/ad_sigma_delta.c | 18 --
include/linux/iio/adc/ad_sigma_delta.h | 6 +-
2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/driver
two lines is missing and to adjust the transfers accordingly.
Signed-off-by: Dragos Bogdan
Signed-off-by: Alexandru Ardelean
---
Changelog v1 -> v2:
*
https://lore.kernel.org/linux-spi/2020141529.98147-1-alexandru.ardel...@analog.com/
* convert comment to new multi-line format
driv
This change converts all bit flags for the 'struct spi_device' mode to the
BIT() macro. The change is mostly for readability. Since adding more bit
fields, might as well convert it now.
Signed-off-by: Alexandru Ardelean
---
Changelog v1 -> v2:
*
https://lore.kernel.
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 than no RX or TX is allowed.
Signed-off-by: Alexandru Ardelean
---
Changelog v1 -> v2:
*
https://lo
From: Lars-Peter Clausen
Add very basic devicetree suppport to the adp5589 allowing the device to be
registered from devicetree and ACPI via PRP0001.
Signed-off-by: Lars-Peter Clausen
Signed-off-by: Alexandru Ardelean
---
drivers/input/keyboard/adp5589-keys.c | 30
This change wraps the devices supported by the adp5589 driver into a chip
info struct. With this, a device table can be created, and the probed
device can be selected based on the enum value provided by the i2c driver
data.
Signed-off-by: Alexandru Ardelean
---
drivers/input/keyboard/adp5589
.
Signed-off-by: Lars-Peter Clausen
Signed-off-by: Alexandru Ardelean
---
Changelog v1 -> v2:
* rebased on newer input/next tree; a conflict appeared for this
patchset https://lore.kernel.org/r/20201119072440.GA116840@dtor-ws
drivers/input/keyboard/adp5589-keys.c |
This whole code-block was put under one big if() condition/block.
This change does an early return if the 'physical_device' boolean is false,
thus unindenting the block by one level.
No other functional change has been done.
Signed-off-by: Alexandru Ardelean
---
.../cros_
setup) is smaller.
The code block for the EC_FEATURE_MOTION_SENSE_FIFO flag has been
un-indented.
Signed-off-by: Alexandru Ardelean
---
.../cros_ec_sensors/cros_ec_sensors_core.c| 63 +--
1 file changed, 28 insertions(+), 35 deletions(-)
diff --git a/drivers/iio/c
to retrieve the information.
This change removes it.
Fixes: ef84928cff58 ("io/uio_pci_generic: use device-managed function
equivalents")
Signed-off-by: Alexandru Ardelean
---
drivers/uio/uio_pci_generic.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/uio/ui
On Sat, Nov 21, 2020 at 8:46 PM Jonathan Cameron wrote:
>
> On Tue, 17 Nov 2020 18:23:39 +0200
> Alexandru Ardelean wrote:
>
> > With this change, calling iio_device_attach_buffer() will actually attach
> > more buffers.
> > Right now this doesn't do an
On Sat, Nov 21, 2020 at 8:53 PM Jonathan Cameron wrote:
>
> On Tue, 17 Nov 2020 18:23:28 +0200
> Alexandru Ardelean wrote:
>
> > Continuing from:
> > https://lore.kernel.org/linux-iio/20200517144023.6c5cb169@archlinux/
> >
> > This is a V2 of the ini
On Sat, Nov 21, 2020 at 8:53 PM Jonathan Cameron wrote:
>
> On Tue, 17 Nov 2020 18:23:40 +0200
> Alexandru Ardelean wrote:
>
> > With this change, an ioctl() call is added to open a character device for a
> > buffer.
> > The ioctl() will not work for the first buf
On Sat, Nov 21, 2020 at 8:34 PM Jonathan Cameron wrote:
>
> On Tue, 17 Nov 2020 18:23:34 +0200
> Alexandru Ardelean wrote:
>
> > The scan_elements attributes are solely located inside
> > 'industrialio-buffer-sysfs.c'. In order to support more than one buf
On Sat, Nov 21, 2020 at 8:25 PM Jonathan Cameron wrote:
>
> On Tue, 17 Nov 2020 18:23:31 +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 buffer.
On Sat, Nov 21, 2020 at 8:05 PM Jonathan Cameron wrote:
>
> On Tue, 17 Nov 2020 18:23:29 +0200
> 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 if an II
On Fri, Nov 20, 2020 at 3:16 PM Lars-Peter Clausen wrote:
>
> On 11/20/20 12:54 PM, Alexandru Ardelean wrote:
> > On Fri, Nov 20, 2020 at 12:47 PM Julia Lawall wrote:
> >>
> >>
> >> On Thu, 19 Nov 2020, Joe Perches wrote:
> >>
> >>&
On Fri, Nov 20, 2020 at 1:57 PM Julia Lawall wrote:
>
>
>
> On Fri, 20 Nov 2020, Alexandru Ardelean wrote:
>
> > On Fri, Nov 20, 2020 at 12:47 PM Julia Lawall wrote:
> > >
> > >
> > >
> > > On Thu, 19 Nov 2020, Joe Perches wrote:
> &g
On Fri, Nov 20, 2020 at 12:47 PM Julia Lawall wrote:
>
>
>
> On Thu, 19 Nov 2020, Joe Perches wrote:
>
> > On Thu, 2020-11-19 at 17:16 +0200, Andy Shevchenko wrote:
> > > On Thu, Nov 19, 2020 at 4:09 PM Alexandru Ardelean
> > > wrote:
> > > >
&
This change uses the devm_kzalloc() function to tie the life-time of the
uio_info object to PCI device. This cleans up the exit & error path a bit.
Signed-off-by: Alexandru Ardelean
---
drivers/uio/uio_mf624.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/dri
This change uses the devm_kzalloc() function to tie the life-time of the
uio_info object to PCI device. This cleans up the exit & error path a bit.
Signed-off-by: Alexandru Ardelean
---
drivers/uio/uio_netx.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/dri
allocated.
Signed-off-by: Alexandru Ardelean
---
drivers/uio/uio_sercos3.c | 14 --
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/uio/uio_sercos3.c b/drivers/uio/uio_sercos3.c
index 9658a0887fee..b93a5f8f4cba 100644
--- a/drivers/uio/uio_sercos3.c
+++ b/d
This change converts the simple allocations in the driver to used
device-managed allocation functions.
This removes the error path entirely in the probe function, and reduces
some code in the remove function.
Signed-off-by: Alexandru Ardelean
---
drivers/uio/uio_dmem_genirq.c | 34
This moves move pm_runtime_disable on a devm_add_action_or_reset() handler.
And with the use of the devm_uio_register_device() function, the remove
hook is no longer required.
Signed-off-by: Alexandru Ardelean
---
drivers/uio/uio_dmem_genirq.c | 28 ++--
1 file changed
This is a minor cleanup for the management of the private object of this
driver. The allocation can be tied to the life-time of the hv_device
object.
This cleans up a bit the exit & error paths, since the object doesn't need
to be explicitly free'd anymore.
Signed-off-by: Alex
The uio_info object is free'd last, so it's life-time is tied PCI device
object. Using devm_kzalloc() cleans up the error path a bit and the exit
path.
Signed-off-by: Alexandru Ardelean
---
drivers/uio/uio_cif.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git
ed-off-by: Alexandru Ardelean
---
drivers/uio/uio_fsl_elbc_gpcm.c | 32 +---
1 file changed, 9 insertions(+), 23 deletions(-)
diff --git a/drivers/uio/uio_fsl_elbc_gpcm.c b/drivers/uio/uio_fsl_elbc_gpcm.c
index be8a6905f507..7d8eb9dc2068 100644
--- a/dr
The uio_info object is free'd last, so it's life-time is tied PCI device
object. Using devm_kzalloc() cleans up the error path a bit and the exit
path.
Signed-off-by: Alexandru Ardelean
---
drivers/uio/uio_aec.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git
The pci_get_drvdata() was moved during commit ef84928cff58
("uio/uio_pci_generic: use device-managed function equivalents").
I should have notice that the pci_set_drvdata() requires a
pci_get_drvdata() for it to make sense.
Signed-off-by: Alexandru Ardelean
---
Apologies for not not
This change uses devm_clk_get() to obtain a reference to the clock. It has
the benefit that clk_put() is no longer required, and cleans up the exit &
error path.
Signed-off-by: Alexandru Ardelean
---
Changelog v1 -> v2:
* reverted silly/goofed `return ret` to `return PTR_ERR(gdev->
This seems to have been copied from a driver that calls spi_set_drvdata()
but doesn't call spi_get_drvdata().
Setting a private object on the SPI device's object isn't necessary if it
won't be accessed.
This change removes the spi_set_drvdata() call.
Signed-off-by
There is no matching spi_get_drvdata() call in the driver, so there is no
need to do spi_set_drvdata(). This looks like it probably was copied from a
driver that used both spi_set_drvdata() & spi_get_drvdata().
Signed-off-by: Alexandru Ardelean
---
drivers/gpio/gpio-xra1403.c | 10 +
There is no matching spi_get_drvdata() in the driver. This looks like a
left-over from before the driver was converted to device-managed functions.
Signed-off-by: Alexandru Ardelean
---
drivers/iio/accel/adis16209.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iio/accel/adis16209
There is no matching spi_get_drvdata() in the driver. This looks like a
left-over from before the driver was converted to device-managed functions.
Signed-off-by: Alexandru Ardelean
---
drivers/iio/accel/adis16201.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iio/accel/adis16201
Hey,
So, I stumbled on a new check that could be added to checkpatch.
Since it's in Perl, I'm reluctant to try it.
Seems many drivers got to a point where they now call (let's say)
spi_set_drvdata(), but never access that information via
spi_get_drvdata().
Reasons for this seem to be:
1. They got
This will make the driver probe-able via device-tree and ACPI via PRP0001.
While the SPI match table may be sufficient, this should extend the cover
of this driver being probed by other methods.
Signed-off-by: Alexandru Ardelean
---
drivers/iio/adc/ad7887.c | 7 +++
1 file changed, 7
This change adds a simple device-tree binding for thhe Analog Devices
AD7887 ADC.
Signed-off-by: Alexandru Ardelean
---
.../bindings/iio/adc/adi,ad7887.yaml | 70 +++
1 file changed, 70 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/adc/adi
: Alexandru Ardelean
---
I'm wondering if this changeset is what was in mind here:
https://lore.kernel.org/linux-iio/CA+U=DsqF5tu8Be9KXeyCWD2uHvV688Nc3n=z_xi2j6h6dfj...@mail.gmail.com/T/#mbe72e4da3acea3899d0d35402ea81e52a9bc34e6
This driver could have been simplified/reduced a whole lot more, bu
The driver currently supports a single part. So we don't need to do any
extra matching based on what the SPI framework has found during probe.
This should make the driver probe-able via other mechanisms like greybus.
Signed-off-by: Alexandru Ardelean
---
drivers/iio/adc/ad7887.c | 5 ++-
From: Lars-Peter Clausen
Add very basic devicetree suppport to the adp5589 allowing the device to be
registered from devicetree and ACPI via PRP0001.
Signed-off-by: Lars-Peter Clausen
Signed-off-by: Alexandru Ardelean
---
drivers/input/keyboard/adp5589-keys.c | 30
.
Signed-off-by: Lars-Peter Clausen
Signed-off-by: Alexandru Ardelean
---
drivers/input/keyboard/adp5589-keys.c | 33 +++
1 file changed, 24 insertions(+), 9 deletions(-)
diff --git a/drivers/input/keyboard/adp5589-keys.c
b/drivers/input/keyboard/adp5589-keys.c
index
This change wraps the devices supported by the adp5589 driver into a chip
info struct. With this, a device table can be created, and the probed
device can be selected based on the enum value provided by the i2c driver
data.
Signed-off-by: Alexandru Ardelean
---
drivers/input/keyboard/adp5589
On Sat, Nov 14, 2020 at 6:20 PM Jonathan Cameron wrote:
>
> On Fri, 13 Nov 2020 11:40:59 +0200
> Alexandru Ardelean wrote:
>
> > From: Lars-Peter Clausen
> >
> > Use a heap allocated memory for the SPI transfer buffer. Using stack memory
> > can corrupt
On Wed, Nov 11, 2020 at 11:08 AM 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 current
> measurements can be done in the driver.
>
> It shouldn
On Wed, Nov 11, 2020 at 4:54 PM Guenter Roeck wrote:
>
> On 11/11/20 1:12 AM, Alexandru Ardelean wrote:
> > In order to account for any potential overflows that could occur.
> >
> > Signed-off-by: Alexandru Ardelean
>
> Thinking about it, this can only real
On Tue, Nov 17, 2020 at 6:02 PM Jonathan Cameron
wrote:
>
> On Tue, 17 Nov 2020 17:03:06 +0200
> Alexandru Ardelean wrote:
>
> > On Tue, Nov 17, 2020 at 1:06 PM Jonathan Cameron
> > wrote:
> > >
> > > On Tue, 17 Nov 2020 11:01:11 +
> > > Jo
On Tue, Nov 17, 2020 at 1:10 PM Andy Shevchenko
wrote:
>
> On Tue, Nov 17, 2020 at 12:42 PM Jonathan Cameron
> wrote:
> >
> > On Tue, 17 Nov 2020 09:52:52 +0200
> > Alexandru Ardelean wrote:
> >
> > > This change converts the configuration of the dua
On Tue, Sep 29, 2020 at 6:40 PM Jonathan Cameron wrote:
>
> On Tue, 29 Sep 2020 17:31:55 +0300
> Alexandru Ardelean wrote:
>
> > On Tue, Sep 29, 2020 at 4:09 PM Andy Shevchenko
> > wrote:
> > >
> > > On Tue, Sep 29, 2020 at 3:55 PM Alexandru Ardele
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 f389d8feacb0
is un-initialized, 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 419d6f8a
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/indust
#x27; so that we can symlink them back. We also need to
implement the sysfs_ops for these folders.
Signed-off-by: Alexandru Ardelean
---
drivers/iio/industrialio-buffer.c | 151 ++
drivers/iio/industrialio-core.c | 24 ++---
include/linux/iio/buffer_impl.h | 14 +
k-ref 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/industr
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
d 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_
after the first buffer) this ioctl() will be
required.
Signed-off-by: Alexandru Ardelean
---
drivers/iio/industrialio-buffer.c | 111 ++
drivers/iio/industrialio-core.c | 8 +++
include/linux/iio/buffer_impl.h | 5 ++
include/linux/iio/iio-opaque.h
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
first buffer is the legacy buffer, so a reference is kept to it.
At this point, accessing the data for the extra buffers (that are added
after the first one) isn't possible yet.
Signed-off-by: Alexandru Ardelean
---
drivers/iio/industrialio-buffer.c | 58 +--
include
ct
needs to be initialized & managed and we only 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.
ome unsure after the 5th-7th patch,
that the approach is correct. And I get even more unsure after that.
I'll create some userspace code to test this a bit, but I thought I'd
send an RFC in the meantime.
Alexandru Ardelean (12):
iio: core: register chardev only if needed
iio: buffer: a
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
On Tue, Nov 17, 2020 at 1:06 PM Jonathan Cameron
wrote:
>
> On Tue, 17 Nov 2020 11:01:11 +
> Jonathan Cameron wrote:
>
> > On Tue, 17 Nov 2020 09:52:53 +0200
> > Alexandru Ardelean wrote:
> >
> > > This change removes the SPI device table, adds an OF
The change is mostly cosmetic. This organizes the order of assignment of
the members of 'iio_buffer_fileops' to be similar to the one as defined in
the 'struct file_operations' type.
Signed-off-by: Alexandru Ardelean
---
drivers/iio/industrialio-core.c | 8
1 file c
d. In that case -EINVAL should
be returned.
Fixes: 8dedcc3eee3a ("iio: core: centralize ioctl() calls to the main chardev")
Signed-off-by: Alexandru Ardelean
---
Apologies for not noticing this earlier.
This came up when trying to write more IIO buffer code.
>From my side either i
This change adds a simple device-tree binding for thhe Analog Devices
AD7887 ADC.
Signed-off-by: Alexandru Ardelean
---
.../bindings/iio/adc/adi,ad7887.yaml | 70 +++
1 file changed, 70 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/adc/adi
: Alexandru Ardelean
---
drivers/iio/adc/ad7887.c | 10 +-
include/linux/platform_data/ad7887.h | 21 -
2 files changed, 5 insertions(+), 26 deletions(-)
delete mode 100644 include/linux/platform_data/ad7887.h
diff --git a/drivers/iio/adc/ad7887.c b/drivers/iio
This change removes the SPI device table, adds an OF device table instead.
This should also be usable for ACPI via PRP0001.
This device is usually probed via device-tree, so it makes more sense to
use the OF device table.
Signed-off-by: Alexandru Ardelean
---
drivers/iio/adc/ad7887.c | 23
On Sat, Nov 14, 2020 at 5:32 PM Jonathan Cameron
wrote:
>
> On Sat, 14 Nov 2020 15:30:23 +
> Jonathan Cameron wrote:
>
> > On Mon, 2 Nov 2020 08:59:57 +0200
> > Alexandru Ardelean wrote:
> >
> > > On Fri, Sep 25, 2020 at 3:38 PM Jonathan Cameron wro
takes into
account the alignment for the timestamp, which is 8 bytes.
So the buffer is put at an offset of 8 bytes.
Fixes: af3008485ea03 ("iio:adc: Add common code for ADI Sigma Delta devices")
Signed-off-by: Lars-Peter Clausen
Signed-off-by: Alexandru Ardelean
---
Changelog v1 ->
cleaned up in probe.
Signed-off-by: Alexandru Ardelean
---
drivers/iio/adc/ad7887.c | 43 ++--
1 file changed, 15 insertions(+), 28 deletions(-)
diff --git a/drivers/iio/adc/ad7887.c b/drivers/iio/adc/ad7887.c
index 99a480ad3985..4f6f0e0e03ee 100644
--- a/drivers
On Thu, Nov 12, 2020 at 11:55 AM Lars-Peter Clausen wrote:
>
> On 11/12/20 10:10 AM, Alexandru Ardelean wrote:
> > From: Lars-Peter Clausen
> >
> > Use a heap allocated memory for the SPI transfer buffer. Using stack memory
> > can corrupt stack memory
first 4 bytes are reserved for register data.
Fixes: af3008485ea03 ("iio:adc: Add common code for ADI Sigma Delta devices")
Signed-off-by: Lars-Peter Clausen
Signed-off-by: Alexandru Ardelean
---
drivers/iio/adc/ad_sigma_delta.c | 4 ++--
include/linux/iio/adc/ad_sigma_delta.h
This change makes use of the devm_gpiochip_add_data() function. With this
the gpiochip_remove() function can be removed, and the
adp5589_gpio_remove() function as well.
The kpad->export_gpio variable is also redundant now, and has been removed.
Signed-off-by: Alexandru Ardelean
---
driv
move() hook, but doesn't look like it is.
This change may also also fix some potential leaks that were probably
omitted earlier.
Signed-off-by: Alexandru Ardelean
---
drivers/input/keyboard/adp5589-keys.c | 47 +++
1 file changed, 11 insertions(+), 36 deletions(-)
dif
This is currently just dead code. It's from around a time when
platform-data was used, and a board could hook it's own special callback
for setup/teardown, and a private object (via 'context').
This change removes it, as there are no more users in mainline for this.
Sign
This removes the need to manually free the kpad object and cleans up some
exit/error paths.
The error path cleanup should reduce the risk of any memory leaks with this
object.
Signed-off-by: Alexandru Ardelean
---
drivers/input/keyboard/adp5589-keys.c | 13 -
1 file changed, 4
d patch: 'Input: adp5589: use a single variable for error in probe'
* for patch 'Input: adp5589: use devm_add_action_or_reset() for register clear'
moved devm_add_action_or_reset() right after switch statement;
using 'error' variable to check for error condition
Ale
The driver clears the general configuration register during the remove()
hook. This should also be done in case the driver exits on error.
This change move the clear of that register to the
devm_add_action_or_reset() hook.
Signed-off-by: Alexandru Ardelean
---
drivers/input/keyboard/adp5589
On Wed, Nov 11, 2020 at 4:54 PM Guenter Roeck wrote:
>
> On 11/11/20 1:12 AM, Alexandru Ardelean wrote:
> > In order to account for any potential overflows that could occur.
> >
> > Signed-off-by: Alexandru Ardelean
>
> Thinking about it, this can only real
On Wed, Nov 11, 2020 at 4:45 PM Andy Shevchenko
wrote:
>
> On Wed, Nov 11, 2020 at 4:13 PM Alexandru Ardelean
> wrote:
> >
> > From: Dragos Bogdan
> >
> > Transmit/receive only is a valid SPI mode. For example, the MOSI/TX line
> > might be missing from
two lines is missing and to adjust the transfers accordingly.
Signed-off-by: Dragos Bogdan
Signed-off-by: Alexandru Ardelean
---
drivers/spi/spi.c | 25 -
include/linux/spi/spi.h | 2 ++
2 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/drivers/spi
This driver can be easily converted to use the device-managed allocator
function and the PCI managed enable function.
With these conversions the probe error paths are no longer needed and
neither is the remove function.
Signed-off-by: Alexandru Ardelean
---
drivers/uio/uio_pci_generic.c | 37
This change uses devm_clk_get() to obtain a reference to the clock. It has
the benefit that clk_put() is no longer required, and cleans up the exit &
error path.
Signed-off-by: Alexandru Ardelean
---
drivers/uio/uio_pruss.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
This change moves the simple allocations to their device-managed
equivalents.
This cleans up some error/exit paths.
Signed-off-by: Alexandru Ardelean
---
drivers/uio/uio_pruss.c | 27 +++
1 file changed, 7 insertions(+), 20 deletions(-)
diff --git a/drivers/uio
301 - 400 of 982 matches
Mail list logo