Jonathan Cameron [Sat, 31 Oct 2020 18:48:28 +0000 (18:48 +0000)]
dt-bindings:iio:light:st,uvis25: txt to yaml conversion for this UV sensor
For the example, node name is uv-sensor because the standard option
of light-sensor seemed a little too generic for this.
This one could have just been moved to trivial-devices.yaml but for now
I have kept it as a separate doc.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Link: https://lore.kernel.org/r/20201031184854.745828-21-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 18:48:27 +0000 (18:48 +0000)]
dt-bindings:iio:light:upisemi,us51882: txt to yaml conversion.
I don't have an up to date address for Adriana Reus so I've put myself
as the binding maintainer for this one. I'm happy to hand over to Adriana
or anyone else who wants take it on!
This has a lot of optional tuning parameters. The docs are modified to try
and put the default values in the description of each one rather than a
forwards reference to the example.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201031184854.745828-20-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 18:48:26 +0000 (18:48 +0000)]
dt-bindings:iio:light:ti,opt3001: txt to yaml conversion
Straight forward format conversion of this simple binding.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Andreas Dannenberg <dannenberg@ti.com>
Link: https://lore.kernel.org/r/20201031184854.745828-19-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 18:48:25 +0000 (18:48 +0000)]
dt-bindings:iio:light:maxim,max44009: txt to yaml conversion.
Straight forward format conversion.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Robert Eshleman <bobbyeshleman@gmail.com>
Link: https://lore.kernel.org/r/20201031184854.745828-18-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 18:48:24 +0000 (18:48 +0000)]
dt-bindings:iio:light:sharp,gp2ap020a00f: txt to yaml conversion.
Simple conversion.
Jacek's email bounced, by Kyungmin's still seems good so just dropped
Jacek from maintainer list.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Link: https://lore.kernel.org/r/20201031184854.745828-17-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 18:48:23 +0000 (18:48 +0000)]
dt-bindings:iio:light:capella,cm36651: txt to yaml conversion.
Straight forward conversion with no changes beyond the node
name in the example
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Beomho Seo <beomho.seo@samsung.com>
Link: https://lore.kernel.org/r/20201031184854.745828-16-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 18:48:22 +0000 (18:48 +0000)]
dt-bindings:iio:light:avago,apds9960: txt to yaml conversion
Very simple binding that we could move into trivial-devices.yaml
with a small loss of documentation.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Link: https://lore.kernel.org/r/20201031184854.745828-15-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 18:48:21 +0000 (18:48 +0000)]
dt-bindings:iio:light:avago,apds9300: txt to yaml conversion.
This could have gone in trivial-devices.yaml, but there was a datasheet
link so I've given it a minimal file of it's own.
Very simple binding and so a very simple conversion.
Oleksandr's email address is bouncing so I've put myself as fallback
maintainer until someone else steps forward.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201031184854.745828-14-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 18:48:20 +0000 (18:48 +0000)]
dt-bindings:iio:imu:st,lsm6dsx: txt to yaml conversion
Straight forward conversion, but there are a few generic properties
in here like wakeup-source which should probably have schema in a
more generic location.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/20201031184854.745828-13-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 18:48:19 +0000 (18:48 +0000)]
dt-bindings:iio:imu:adi,adis16480: txt to yaml conversion
Alexandru is currently listed as maintainer on basis of last person
to touch the binding.
Whilst the driver only uses one interrupt, the hardware can route events
to one and dataready signal to the other so we should allow for either
1 or 2 interrupts.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20201031184854.745828-12-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 18:48:18 +0000 (18:48 +0000)]
dt-bindings:iio:health:maxim,max30102: txt to yaml conversion
Straight forward binding. Title was a bit of a challenge to keep short
as this binding covers sensors for two entirely different purposes.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Cc: Matt Ranostay <mranostay@gmail.com>
Link: https://lore.kernel.org/r/20201031184854.745828-11-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 18:48:17 +0000 (18:48 +0000)]
dt-bindings:iio:health:maxim,max30100: txt to yaml conversion
Straight forward conversion. As with other bindings I've dropped
any standrd description, but kept the unusual bits, in thisscase
the maxim,led-current-microamp and it's description.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Link: https://lore.kernel.org/r/20201031184854.745828-10-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 18:48:14 +0000 (18:48 +0000)]
dt-bindings:iio:samsung,sensorhub-rinato: yaml conversion
Renamed to be more specific as I would be surprised if this is the only
sensorhub Samsung have ever shipped.
Fixed missing reg property in the example
Karol's email address from original patch is bouncing, so I've
put myself as maintainer until someone else steps up.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201031184854.745828-7-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 18:48:13 +0000 (18:48 +0000)]
dt-bindings:iio:impedance-analyzer:adi,ad5933 yaml conversion.
The example in this one had a completely wrong compatible so I've
fixed that. Otherwise, a fairly simple conversion.
Note the driver itself is still in staging. Looking back at the
last discussion around this, I think we were just waiting for some
test results on some refactors. As such the binding should be stable
even if the driver might need a little more love and attention.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Cc: Gabriel Capella <gabriel@capella.pro>
Cc: Alexandru Ardelean <Alexandru.Ardelean@analog.com>
Link: https://lore.kernel.org/r/20201031184854.745828-6-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 18:48:12 +0000 (18:48 +0000)]
dt-bindings:iio:potentiometer:microchip,mcp41010 txt to yaml conversion
A simple binding that I almost just move to trivial devices.
The small amount of additional documentation and relatively large number
of compatible entries convinced me to suggest we keep this one separately
documented.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Chris Coffey <cmc@babblebit.net>
Link: https://lore.kernel.org/r/20201031184854.745828-5-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 18:48:10 +0000 (18:48 +0000)]
dt-bindings:iio:potentiometer:adi,ad5272 yaml conversion
Simple direct conversion from txt to yaml as part of a general aim of
converting all IIO bindings to this machine readable format.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Phil Reid <preid@electromag.com.au>
Cc: Phil Reid <preid@electromag.com.au>
Link: https://lore.kernel.org/r/20201031184854.745828-3-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 18:48:11 +0000 (18:48 +0000)]
dt-bindings:iio:potentiometer:microchip,mcp4131 txt to yaml conversion
This binding is very simple, but I think the very large number of
compatible values make it unsuitable for moving to trivial-devices.yaml.
Main change in the conversion was reordering the compatible list to
numerical order.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Slawomir Stepien <sst@poczta.fm>
Link: https://lore.kernel.org/r/20201031184854.745828-4-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 18:48:09 +0000 (18:48 +0000)]
dt-bindings:iio:resolver:adi,ad2s90: Conversion of binding to yaml.
Simple binding with a good description of why the spi-max-frequency is,
in practice not as high as the datasheet implies. I've set the
maximum as per the value established in the description.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Matheus Tavares <matheus.bernardino@usp.br>
Cc: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20201031184854.745828-2-jic23@kernel.org
Alexandru Ardelean [Tue, 17 Nov 2020 09:51:54 +0000 (11:51 +0200)]
iio: core: return -EINVAL when no ioctl handler has been run
It seems that when this was tested the happy case was more tested. A few of
the userspace apps rely on this returning negative error codes in case an
ioctl() is not available.
When running multiple ioctl() handlers or when calling an ioctl() that
doesn't exist, IIO_IOCTL_UNHANDLED is returned. In that case -EINVAL should
be returned.
Fixes:
8dedcc3eee3a ("iio: core: centralize ioctl() calls to the main chardev")
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20201117095154.7189-1-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Alexandru Ardelean [Tue, 17 Nov 2020 10:37:53 +0000 (12:37 +0200)]
iio: core: organize buffer file-ops in the order defined in the struct
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 <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20201117103753.8450-1-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Alexandru Ardelean [Thu, 19 Nov 2020 14:18:06 +0000 (16:18 +0200)]
iio: accel: adis16209: remove unneeded spi_set_drvdata()
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 <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20201119141806.84827-1-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Alexandru Ardelean [Thu, 19 Nov 2020 14:17:29 +0000 (16:17 +0200)]
iio: accel: adis16201: remove unneeded spi_set_drvdata()
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 <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20201119141729.84185-1-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Alexandru Ardelean [Thu, 19 Nov 2020 14:27:20 +0000 (16:27 +0200)]
iio: adc: ad7292: remove unneeded spi_set_drvdata()
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: Alexandru Ardelean <alexandru.ardelean@analog.com>
Tested-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Link: https://lore.kernel.org/r/20201119142720.86326-1-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Gustavo A. R. Silva [Fri, 20 Nov 2020 18:36:26 +0000 (12:36 -0600)]
iio: adc: cpcap: Fix fall-through warnings for Clang
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
by explicitly adding a break statement instead of letting the code fall
through to the next case.
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://github.com/KSPP/linux/issues/115
Link: https://lore.kernel.org/r/b3c1c3f9c76f2f0e832f956587f227e44af57d3d.1605896060.git.gustavoars@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Alexandru Ardelean [Tue, 29 Sep 2020 12:59:49 +0000 (15:59 +0300)]
iio: buffer: remove iio_buffer_set_attrs() helper
The iio_buffer_set_attrs() is no longer used in the drivers, so it can be
removed now.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200929125949.69934-10-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Alexandru Ardelean [Tue, 29 Sep 2020 12:59:48 +0000 (15:59 +0300)]
iio: hid-sensors: use iio_triggered_buffer_setup_ext()
This change switches to the new iio_triggered_buffer_setup_ext()
function and removes the iio_buffer_set_attrs() call, for assigning the
HW FIFO attributes to the buffer.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200929125949.69934-9-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Alexandru Ardelean [Tue, 29 Sep 2020 12:59:47 +0000 (15:59 +0300)]
iio: cros_ec: use devm_iio_triggered_buffer_setup_ext()
This change switches to the new devm_iio_triggered_buffer_setup_ext()
function and removes the iio_buffer_set_attrs() call, for assigning the
HW FIFO attributes to the buffer.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200929125949.69934-8-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Alexandru Ardelean [Tue, 29 Sep 2020 12:59:46 +0000 (15:59 +0300)]
iio: adc: at91-sama5d2_adc: use devm_iio_triggered_buffer_setup_ext()
This change switches to the new devm_iio_triggered_buffer_setup_ext()
function and removes the iio_buffer_set_attrs() call, for assigning the
HW FIFO attributes to the buffer.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200929125949.69934-7-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Alexandru Ardelean [Tue, 29 Sep 2020 12:59:45 +0000 (15:59 +0300)]
iio: accel: bmc150: use iio_triggered_buffer_setup_ext()
This change switches to the new iio_triggered_buffer_setup_ext()
function and removes the iio_buffer_set_attrs() call, for assigning the
HW FIFO attributes to the buffer.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200929125949.69934-6-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Alexandru Ardelean [Tue, 29 Sep 2020 12:59:44 +0000 (15:59 +0300)]
iio: accel: adxl372: use devm_iio_triggered_buffer_setup_ext()
This change switches to the new devm_iio_triggered_buffer_setup_ext()
function and removes the iio_buffer_set_attrs() call, for assigning the
HW FIFO attributes to the buffer.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200929125949.69934-5-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Alexandru Ardelean [Tue, 29 Sep 2020 12:59:43 +0000 (15:59 +0300)]
iio: triggered-buffer: add {devm_}iio_triggered_buffer_setup_ext variants
This change adds a parameter to the {devm_}iio_triggered_buffer_setup()
functions to assign the extra sysfs buffer attributes that are typically
assigned via iio_buffer_set_attrs().
The functions also get renamed to iio_triggered_buffer_setup_ext() &
devm_iio_triggered_buffer_setup_ext().
For backwards compatibility the old {devm_}iio_triggered_buffer_setup()
functions are now macros wrap the new (renamed) functions with NULL for the
buffer attrs.
The aim is to remove iio_buffer_set_attrs(), so in the
iio_triggered_buffer_setup_ext() function the attributes are assigned
directly to 'buffer->attrs'.
When adding multiple IIO buffers per IIO device, it can be pretty
cumbersome to first allocate a set of buffers, then to dig them out of IIO
to assign extra attributes (with iio_buffer_set_attrs()).
Naturally, the best way would be to provide them at allocation time, which
is what this change does.
At this moment, buffers allocated with {devm_}iio_triggered_buffer_setup()
are the only ones in mainline IIO to call iio_buffer_set_attrs().
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200929125949.69934-4-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Alexandru Ardelean [Tue, 29 Sep 2020 12:59:42 +0000 (15:59 +0300)]
iio: adc: at91-sama5d2_adc: merge buffer & trigger init into a function
This change is mostly cosmetic, but it's also a pre-cursor to the
the change for 'iio_buffer_set_attrs()', where the helper gets updated to
better support multiple IIO buffers for 1 IIO device.
The only functional change is that the error message for the trigger alloc
failure is bound to the parent device vs the IIO device object.
Also, the new at91_adc_buffer_and_trigger_init() function was moved after
the definition of the 'at91_adc_fifo_attributes'.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200929125949.69934-3-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Alexandru Ardelean [Tue, 29 Sep 2020 12:59:41 +0000 (15:59 +0300)]
iio: buffer: dmaengine: unwrap the use of iio_buffer_set_attrs()
The iio_buffer_set_attrs() helper will be removed in this series. So, just
assign the attributes of the DMAEngine buffer logic directly.
This is IIO buffer core context, so there is direct access to the
buffer->attrs object.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200929125949.69934-2-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Jonathan Cameron [Sat, 31 Oct 2020 18:29:22 +0000 (18:29 +0000)]
dt-bindings:iio:accel:domintech,dmard06: Move to trivial-devices.yaml
No need to maintain a separate document for such a simple binding.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201031182922.743153-8-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 18:29:21 +0000 (18:29 +0000)]
dt-bindings:iio:magnetometer:memsic,mmc35240: move to trivial-devices.yaml
Extremely simple binding so no need to maintain a separate file.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Jandy Gou <qingsong.gou@ck-telecom.com>
Link: https://lore.kernel.org/r/20201031182922.743153-7-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 18:29:20 +0000 (18:29 +0000)]
dt-bindings:iio:light:renesas,isl29501: Move to trivial devices.
This binding is so simple there is no obvious advantage in maintaining
a separate binding doc file for it. As such, move it to trivial-devices.yaml
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Simon Horman <horms+renesas@verge.net.au>
Link: https://lore.kernel.org/r/20201031182922.743153-6-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 18:29:19 +0000 (18:29 +0000)]
dt-bindings:iio:potentiometer:maxim,max5481 move to trivial devices
Simple SPI binding that doesn't need a separate file.
During conversion I looked up the individual part number descriptions
in the datasheet so that we could give slightly more detail in
trivial-device.yaml.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Slawomir Stepien <sst@poczta.fm>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Maury Anderson <maury.anderson@rockwellcollins.com>
Cc: Matthew Weber <matthew.weber@rockwellcollins.com>
Cc: Slawomir Stepien <sst@poczta.fm>
Link: https://lore.kernel.org/r/20201031182922.743153-5-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 18:29:18 +0000 (18:29 +0000)]
dt-bindings:iio:potentiometer:maxim,ds1803 move to trivial devices.
Simple binding where there is no obvious benefit in maintaining a
separate file. Hence document in trivial-devices.yaml and drop
the txt file.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Slawomir Stepien <sst@poczta.fm>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Slawomir Stepien <sst@poczta.fm>
Link: https://lore.kernel.org/r/20201031182922.743153-4-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 18:29:17 +0000 (18:29 +0000)]
dt-bindings:iio:chemical:bosch,bme680: Move to trivial devices
Very simple binding so no need to maintain a separate file.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Sebastien Bourdelin <sebastien.bourdelin@gmail.com>
Cc: Himanshu Jha <himanshujha199640@gmail.com>
Link: https://lore.kernel.org/r/20201031182922.743153-3-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 18:29:16 +0000 (18:29 +0000)]
dt-bindings:iio:chemical:sensirion,sgp30: Move to trivial-bindings.yaml
The binding for this device and the sgpc3 is very simple so lets
not maintain a seperate document for this one. Of course we can
always add a document again if the binding becomes more complex in
future.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Andreas Brauchli <andreas.brauchli@sensirion.com>
Link: https://lore.kernel.org/r/20201031182922.743153-2-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:41:10 +0000 (13:41 +0000)]
dt-bindings:iio:temperature:ti,tmp07 yaml conversion
Simple conversion from txt to yaml.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Manivannan Sadhasivam <mani@kernel.org>
Link: https://lore.kernel.org/r/20201031134110.724233-30-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:41:09 +0000 (13:41 +0000)]
dt-bindings:iio:temperature:maxim_thermocouple.txt to maxim,max31855k.yaml
Given we already have another maxim thermocouple driver that isn't
covered by this binding it seems a better idea to chose to name it
after a specific part.
I added an additional example for the maxim,max6755 to illustrate
the need for spi-cpha for that part.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Link: https://lore.kernel.org/r/20201031134110.724233-29-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:41:08 +0000 (13:41 +0000)]
dt-bindings:iio:temperature:maxim,max31856 yaml conversion.
Simple txt to yaml conversion of this binding.
Paresh Chaudhary's email is bouncing so for now I've listed
myself as maintainer.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201031134110.724233-28-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:41:07 +0000 (13:41 +0000)]
dt-bindings:iio:temperature:meas,tsys01 move to trivial-devices.yaml
The existing binding description brings little value and the similar
meas,* parts are in trivial-devices.yaml so move this one there
to join them.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20201031134110.724233-27-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:41:06 +0000 (13:41 +0000)]
dt-bindings:iio:temperature:melexis,mlx90632 conversion to yaml
Technically this could have gone in trivial-devices.yaml, but I have
kept it as a separate binding due to the detailed additional description
from the text file.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Crt Mori <cmo@melexis.com>
Cc: Crt Mori <cmo@melexis.com>
Link: https://lore.kernel.org/r/20201031134110.724233-26-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:41:05 +0000 (13:41 +0000)]
dt-bindings:iio:temperature:melexis,mlx90614 yaml conversion
Simple conversion from txt to yaml.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Crt Mori <cmo@melexis.com>
Cc: Peter Meerwald <pmeerw@pmeerw.net>
Link: https://lore.kernel.org/r/20201031134110.724233-25-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:41:04 +0000 (13:41 +0000)]
dt-bindings:iio:dac:adi,ad5758 yaml conversion
I have put Michael as maintainer on this one. Happy to change it to
someone else though.
One issue in here, is I cannot have an example with a negative
limit on the range. There are very few such yaml bindings in existence
but the thermal-zones.yaml has the same problem. If there is
any means of fixing this let me know. For now I'm sticking to
positive range values in the example.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Michael Hennerich <Michael.Hennerich@analog.com>
Link: https://lore.kernel.org/r/20201031134110.724233-24-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:41:03 +0000 (13:41 +0000)]
dt-bindings:iio:dac:nxp,lpc1850-dac yaml conversion.
Very similar binding to that for the ADC on the same device.
Conversion from txt to yaml format.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
Link: https://lore.kernel.org/r/20201031134110.724233-23-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:41:02 +0000 (13:41 +0000)]
dt-bindings:iio:dac:maxim,max5821 yaml conversion
Simple txt to yaml conversion for this binding description.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Philippe Reynes <tremyfr@yahoo.fr>
Link: https://lore.kernel.org/r/20201031134110.724233-22-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:41:01 +0000 (13:41 +0000)]
dt-bindings:iio:dac:microchip,mcp4725 yaml conversion
I'm not sure vdd-supply absolutely has to be provided if vref-supply
is, but as the previous binding docs stated it was required it seems
reasonable to leave it as such.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Tomas Novotny <tomas@novotny.cz>
Link: https://lore.kernel.org/r/20201031134110.724233-21-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:41:00 +0000 (13:41 +0000)]
dt-bindings:iio:dac:fsl,vf610-dac yaml conversion
Simple binding to convert. Example expanded a little to include
an example bus.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Sanchayan Maity <maitysanchayan@gmail.com>
Link: https://lore.kernel.org/r/20201031134110.724233-20-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:40:59 +0000 (13:40 +0000)]
dt-bindings:iio:dac:maxim,ds4424 yaml conversion
Simple conversion of this straight forward binding.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Ismail H. Kose <ihkose@gmail.com>
Link: https://lore.kernel.org/r/20201031134110.724233-19-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Jonathan Cameron [Sat, 31 Oct 2020 13:40:58 +0000 (13:40 +0000)]
dt-bindings:iio:dac:adi,ad7303 yaml conversion
Converted to maintain the requirement for Vdd-supply as per original file.
It is possible we could relax this requirement to make it at least one
of Vdd-supply and REF-supply. We need to establish the scaling of the
output channel and if REF-supply is provided that is used instead of
Vdd-supply, hence I cannot see why a dummy regulator cannot be used for
Vdd-supply if this happens.
For now, let us keep it simple.
Drop adi,use-external-reference from binding example as no such binding
exists.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20201031134110.724233-18-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:40:56 +0000 (13:40 +0000)]
dt-bindings:iio:dac:ti,dac7612 yaml conversion
Simple conversion from txt to yaml. No significant adjustments.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Ricardo Ribalda Delgado <ricardo@ribalda.com>
Link: https://lore.kernel.org/r/20201031134110.724233-16-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:40:55 +0000 (13:40 +0000)]
dt-bindings:iio:dac:ti,dac7512 yaml conversion
This one is a bit interesting because the binding was moved from
misc a while back, but the linux support for this device is
provided via the ad5446 DAC driver which doesn't currently
have a binding.
For now, lets just convert this file over, but we may want to
think about consolidating this with proper documentation of
the bindings for the other parts supported by the ad5446 driver.
As Daniel Mack does not seem to have been active since 2015,
I've put myself as maintainer of this binding for now.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201031134110.724233-15-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:40:54 +0000 (13:40 +0000)]
dt-bindings:iio:dac:ti,dac7311 yaml conversion
Very simple conversion of this binding from txt to yaml.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Charles-Antoine Couret <charles-antoine.couret@essensium.com>
Link: https://lore.kernel.org/r/20201031134110.724233-14-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:40:53 +0000 (13:40 +0000)]
dt-bindings:iio:dac:ti,dac5571 yaml conversion.
A few tweaks in this conversion.
* The example didn't have the I2C address of 4C in the node name so
fixed that.
* The reference voltage in the txt file is an optional binding, but
the driver is making use of it to provide the scaling of the output
channels. As such I have made it required going forwards.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Sean Nyekjaer <sean@geanix.com>
Link: https://lore.kernel.org/r/20201031134110.724233-13-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:40:52 +0000 (13:40 +0000)]
dt-bindings:iio:proximity:ams,as3935 yaml conversion
A straight forward conversion of this binding. I have added
a maximum SPI frequency from the datasheet.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Link: https://lore.kernel.org/r/20201031134110.724233-12-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:40:51 +0000 (13:40 +0000)]
dt-bindings:iio:proximity:st,vl53l0x yaml conversion
Straight forward conversion from txt to yaml.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Song Qiang <songqiang1304521@gmail.com>
Link: https://lore.kernel.org/r/20201031134110.724233-11-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:40:50 +0000 (13:40 +0000)]
dt-bindings:iio:proximity:semtech,sx9500 yaml conversion.
Simple conversion. There hasn't been much activity around this driver
for a long time and I don't think I have any up to date contact details
for the original authors. As such, I've listed myself as the binding
maintainer. More than happy to hand it off to someone more relevant though!
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201031134110.724233-10-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:40:49 +0000 (13:40 +0000)]
dt-bindings:iio:pressure:hoperf,hp03 yaml conversion
One quirk in the txt file was that the xclr gpio was specified as
xclr-gpio rather than xclr-gpios. I've fixed that in the
yaml version.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Marek Vasut <marex@denx.de>
Link: https://lore.kernel.org/r/20201031134110.724233-9-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:40:48 +0000 (13:40 +0000)]
dt-bindings:iio:pressure:meas,ms5611 yaml conversion.
One addition here was to put in a 20MHz maximum for the SPI bus
as specified in the datasheets of both support parts.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Tomasz Duszynski <tduszyns@gmail.com>
Link: https://lore.kernel.org/r/20201031134110.724233-8-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:40:47 +0000 (13:40 +0000)]
dt-bindings:iio:pressure:murata,zpa2326 yaml conversion
Simple conversion with a few minor tweaks:
* I added 1MHz max for spi-max-frequency
* I have give myself as the maintainer. This driver was written by
Gregor Boirie but I don't have an up to date email address for Gregor.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201031134110.724233-7-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:40:46 +0000 (13:40 +0000)]
dt-bindings:iio:pressure:ms5637 Drop separate doc + add to trivial-devices
Very simple binding for this i2c device with no properties beyond
reg and compatible. Hence doesn't need it's own document.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201031134110.724233-6-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:40:45 +0000 (13:40 +0000)]
dt-bindings:iio:humidity:dht11 yaml conversion
The conversion is straight forward, but leaves an open question.
The compatible for this device has never had a vendor.
Harald Geyer has identified as probably being made by aosong,
but we have no current match to any of their more specific part
numbers. As such, this is noted in the file but the
compatible doesn't include the vendor prefix.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-By: Harald Geyer <harald@ccbib.org>
Link: https://lore.kernel.org/r/20201031134110.724233-5-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:40:44 +0000 (13:40 +0000)]
dt-bindings:iio:humidity:st,hts221 yaml conversion.
Straight forward conversion of this temperature and pressure sensor binding.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/20201031134110.724233-4-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:40:43 +0000 (13:40 +0000)]
dt-bindings:iio:humidity:htu21 Drop separate doc + add to trivial-devices
Very simple binding for this i2c device with no properties beyond
reg and compatible. Hence doesn't need it's own document.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201031134110.724233-3-jic23@kernel.org
Jonathan Cameron [Sat, 31 Oct 2020 13:40:42 +0000 (13:40 +0000)]
dt-bindings:iio:humidity:hdc100x Drop separate doc + add to trivial-devices
Very simple binding for this i2c device with no properties beyond
reg and compatible. Hence doesn't need it's own document.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Link: https://lore.kernel.org/r/20201031134110.724233-2-jic23@kernel.org
Alexandru Ardelean [Fri, 13 Nov 2020 09:16:48 +0000 (11:16 +0200)]
iio: adc: ad7887: convert probe to device-managed functions
This is conversion of the driver to use device-managed functions.
The IIO registration and triggered buffer setup both have device-managed
versions.
The regulator disable needs to be handled via an action_or_reset handler.
With these changes, the remove hook is removed, and the error path is
cleaned up in probe.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20201113091648.148589-1-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Fabrice Gasnier [Fri, 6 Nov 2020 16:57:26 +0000 (17:57 +0100)]
iio: adc: stm32-adc: adapt clock duty cycle for proper operation
For proper operation, STM32 ADC should be used with a clock duty cycle
of 50%, in the range of 49% to 51%. Depending on the clock tree, divider
can be used in case clock duty cycle is out of this range.
In case clk_get_scaled_duty_cycle() returns an error, kindly apply a
divider by default (don't make the probe fail).
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Link: https://lore.kernel.org/r/1604681846-31234-1-git-send-email-fabrice.gasnier@st.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Alexandru Ardelean [Thu, 24 Sep 2020 08:41:55 +0000 (11:41 +0300)]
iio: core: centralize ioctl() calls to the main chardev
The aim of this is to improve a bit the organization of ioctl() calls in
IIO core. Currently the chardev is split across IIO core sub-modules/files.
The main chardev has to be able to handle ioctl() calls, and if we need to
add buffer ioctl() calls, this would complicate things.
The 'industrialio-core.c' file will provide a 'iio_device_ioctl()' which
will iterate over a list of ioctls registered with the IIO device. These
can be event ioctl() or buffer ioctl() calls, or something else.
Each ioctl() handler will have to return a IIO_IOCTL_UNHANDLED code (which
is positive 1), if the ioctl() did not handle the call in any. This
eliminates any potential ambiguities about negative error codes, which
should fail the call altogether.
If any ioctl() returns 0, it was considered that it was serviced
successfully and the loop will exit.
This change also moves the handling of the IIO_GET_EVENT_FD_IOCTL command
inside 'industrialio-event.c', where this is better suited.
This patch is a combination of 2 other patches from an older series:
Patch 1: iio: core: add simple centralized mechanism for ioctl() handlers
Link: https://lore.kernel.org/linux-iio/20200427131100.50845-6-alexandru.ardelean@analog.com/
Patch 2: iio: core: use new common ioctl() mechanism
Link: https://lore.kernel.org/linux-iio/20200427131100.50845-7-alexandru.ardelean@analog.com/
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20200924084155.99406-1-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Gene Chen [Tue, 20 Oct 2020 08:07:47 +0000 (16:07 +0800)]
iio: adc: mt6360: Add ADC driver for MT6360
Add MT6360 ADC driver including Charger Current, Voltage, and
Temperature.
Signed-off-by: Gene Chen <gene_chen@richtek.com>
Link: https://lore.kernel.org/r/1603181267-15610-4-git-send-email-gene.chen.richtek@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Gene Chen [Tue, 20 Oct 2020 08:07:46 +0000 (16:07 +0800)]
Documentation: ABI: testing: mt6360: Add ADC sysfs guideline
Add ABI documentation for mt6360 ADC sysfs interfaces.
Signed-off-by: Gene Chen <gene_chen@richtek.com>
Link: https://lore.kernel.org/r/1603181267-15610-3-git-send-email-gene.chen.richtek@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Gene Chen [Tue, 20 Oct 2020 08:07:45 +0000 (16:07 +0800)]
dt-bindings: iio: adc: add bindings doc for MT6360 ADC
This change adds the binding doc for the MT6360 ADC.
Signed-off-by: Gene Chen <gene_chen@richtek.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/1603181267-15610-2-git-send-email-gene.chen.richtek@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Olivier Moysan [Thu, 5 Nov 2020 14:29:41 +0000 (15:29 +0100)]
iio: adc: stm32-adc: dma transfers cleanup
- Remove processing related to DMA in irq handler as this
data transfer is managed directly in DMA callback.
- Update comment in stm32_adc_set_watermark() function.
Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
Reviewed-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Link: https://lore.kernel.org/r/20201105142941.27301-1-olivier.moysan@st.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cristian Pop [Mon, 28 Sep 2020 09:09:59 +0000 (12:09 +0300)]
dt-bindings:iio:adc:adc.txt: Add documentation for channel label attribute
Optional attribute for better identification of the channels.
Signed-off-by: Cristian Pop <cristian.pop@analog.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200928090959.88842-5-cristian.pop@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cristian Pop [Mon, 28 Sep 2020 09:09:58 +0000 (12:09 +0300)]
dt-bindings:iio:adc:adi,ad7768-1: Add documentation for channel label
Optional attribute for better identification of the channels.
Signed-off-by: Cristian Pop <cristian.pop@analog.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200928090959.88842-4-cristian.pop@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cristian Pop [Mon, 28 Sep 2020 09:09:57 +0000 (12:09 +0300)]
iio: adc: ad7768-1: Add channel labels.
For better identification of the channels.
Signed-off-by: Cristian Pop <cristian.pop@analog.com>
Link: https://lore.kernel.org/r/20200928090959.88842-3-cristian.pop@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cristian Pop [Mon, 28 Sep 2020 09:09:56 +0000 (12:09 +0300)]
iio:Documentation: Add documentation for label channel attribute
If a label is defined for this channel add that to the channel specific
attributes. This is useful for userspace to be able to identify an
individual channel.
Signed-off-by: Cristian Pop <cristian.pop@analog.com>
Link: https://lore.kernel.org/r/20200928090959.88842-2-cristian.pop@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cristian Pop [Mon, 28 Sep 2020 09:09:55 +0000 (12:09 +0300)]
iio: core: Add optional symbolic label to a device channel
If a label is defined in the device tree for this channel add that
to the channel specific attributes. This is useful for userspace to
be able to identify an individual channel.
Signed-off-by: Cristian Pop <cristian.pop@analog.com>
Link: https://lore.kernel.org/r/20200928090959.88842-1-cristian.pop@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Jonathan Neuschäfer [Sun, 8 Nov 2020 01:37:38 +0000 (02:37 +0100)]
MAINTAINERS: Fix 'W:' prefix in Invensense IMU entry
The colon is missing, which can confuse scripts/parse-maintainers.pl.
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Link: https://lore.kernel.org/r/20201108013738.1410528-1-j.neuschaefer@gmx.net
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Tom Rix [Mon, 19 Oct 2020 17:28:24 +0000 (10:28 -0700)]
iio: remove unneeded break
A break is not needed if it is preceded by a return
Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20201019172824.32166-1-trix@redhat.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Vaishnav M A [Sun, 18 Oct 2020 20:35:52 +0000 (02:05 +0530)]
iio:light:tsl2563 use generic fw accessors
Replace of_property_read_u32() with device_property_read_u32(),
when reading the amstaos,cover-comp-gain.This opens up the
possibility of passing the properties during platform instantiation
of the device by a suitable populated struct property_entry.
Additionally, a minor change in logic is added to remove the
of_node present check.
Signed-off-by: Vaishnav M A <vaishnav@beagleboard.org>
Link: https://lore.kernel.org/r/20201018203552.GA816421@ubuntu
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Vaishnav M A [Sun, 18 Oct 2020 19:53:57 +0000 (01:23 +0530)]
iio: light: vcnl4035 add i2c_device_id
Add i2c_device_id table for the vcnl4035 driver,
enabling device instantiation using i2c_new_client_device()
or from userspace in cases where device-tree based description
is not possible now, like device(s) on a gbphy i2c adapter
created by greybus.
Signed-off-by: Vaishnav M A <vaishnav@beagleboard.org>
Link: https://lore.kernel.org/r/20201018195357.GA814864@ubuntu
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Vaishnav M A [Sun, 18 Oct 2020 19:51:02 +0000 (01:21 +0530)]
iio: proximity: vl53l0x-i2c add i2c_device_id
Add i2c_device_id table for the vl53l0x-i2c driver,
helps in device instantiation using i2c_new_client_device()
or from userspace in cases where device-tree based description
is not possible now, like device(s) on a gbphy i2c adapter
created by greybus.
Signed-off-by: Vaishnav M A <vaishnav@beagleboard.org>
Link: https://lore.kernel.org/r/20201018195102.GA814713@ubuntu
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Tom Rix [Sat, 31 Oct 2020 13:43:19 +0000 (06:43 -0700)]
iio: magnetometer: bmc150: remove unneeded semicolon
A semicolon is not needed after a switch statement.
Signed-off-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20201031134319.2134314-1-trix@redhat.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Tom Rix [Sat, 31 Oct 2020 13:45:06 +0000 (06:45 -0700)]
iio: pressure: bmp280: remove unneeded semicolon
A semicolon is not needed after a switch statement.
Signed-off-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20201031134506.2134698-1-trix@redhat.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Mauro Carvalho Chehab [Fri, 23 Oct 2020 16:33:32 +0000 (18:33 +0200)]
iio: fix a kernel-doc markup
A function has a different name between their prototype
and its kernel-doc markup.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/46622c3bdcffb76e79719f0fe5011c2952960b32.1603469755.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Tom Rix [Tue, 27 Oct 2020 20:08:53 +0000 (13:08 -0700)]
iio: adc: at91-sama5d2_adc: remove unneeded semicolon
A semicolon is not needed after a switch statement.
Signed-off-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20201027200853.1596699-1-trix@redhat.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Tom Rix [Tue, 27 Oct 2020 20:11:28 +0000 (13:11 -0700)]
iio/adc: ingenic: remove unneeded semicolon
A semicolon is not needed after a switch statement.
Signed-off-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20201027201128.1597230-1-trix@redhat.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Tom Rix [Tue, 27 Oct 2020 20:14:36 +0000 (13:14 -0700)]
iio: light: apds9960: remove unneeded semicolon
A semicolon is not needed after a switch statement.
Signed-off-by: Tom Rix <trix@redhat.com>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Link: https://lore.kernel.org/r/20201027201436.1597726-1-trix@redhat.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Jonathan Cameron [Sun, 9 Aug 2020 11:17:47 +0000 (12:17 +0100)]
dt-bindings: iio: adc: ti,adc084s021 yaml conversion
Simple conversion.
Added the #io-channel-cells optional property to allow for consumer
bindings if appropriate on a given board.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Mårten Lindahl <martenli@axis.com>
Link: https://lore.kernel.org/r/20200809111753.156236-8-jic23@kernel.org
Rui Miguel Silva [Wed, 14 Oct 2020 10:49:26 +0000 (11:49 +0100)]
dt-bindings: fxas21002c: convert bindings to yaml
Convert fxas21002c gyroscope sensor bindings documentation to
yaml schema, remove the textual bindings document and update MAINTAINERS entry.
Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201014104926.688666-1-rmfrfs@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Fabien Parent [Mon, 12 Oct 2020 20:52:17 +0000 (22:52 +0200)]
dt-bindings: iio: adc: auxadc: add doc for MT8516 SoC
Add documentation for the auxadc binding for MT8516 SoC.
Signed-off-by: Fabien Parent <fparent@baylibre.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201012205218.3010868-1-fparent@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Deepak R Varma [Sun, 11 Oct 2020 10:48:00 +0000 (16:18 +0530)]
staging: iio: adis16240: add blank line before struct definition
Add a blank line before starting structure definition as per coding
style guidelines. Issue reported by checkpatch script.
Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
Acked-by: Julia Lawall <julia.lawall@inria.fr>
Link: https://lore.kernel.org/r/20201011104800.GA29412@ubuntu204
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Rikard Falkeborn [Wed, 30 Sep 2020 23:29:39 +0000 (01:29 +0200)]
iio: accel: mma8452: Constify static struct attribute_group
The only usage of mma8452_event_attribute_group is to assign its address
to the event_attrs field in the iio_info struct, which is a const
pointer. Make it const to allow the compiler to put it in read-only
memory. This was the only non-const static struct in drivers/iio.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20200930232939.31131-1-rikard.falkeborn@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Alexandru Ardelean [Thu, 1 Oct 2020 14:10:04 +0000 (17:10 +0300)]
iio: dac: ad7303: remove platform data header
The information in the ad7303 platform_data header is unused, so it's dead
code.
This change removes it and it's inclusion from the driver.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20201001141004.53846-1-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Alexandru Ardelean [Thu, 1 Oct 2020 14:10:48 +0000 (17:10 +0300)]
iio: adc: ad7298: rework external ref setup & remove platform data
This change removes the old platform data for ad7298. It is only used to
provide whether to use an external regulator as a reference.
So, the logic is inverted a bit. The driver now tries to obtain a
regulator. If one is provided, then the external ref is used. The rest of
the logic should work as before.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20201001141048.69050-1-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Anand Ashok Dumbre [Mon, 5 Oct 2020 15:05:16 +0000 (08:05 -0700)]
iio: core: Fix IIO_VAL_FRACTIONAL calculation for negative values
Fixes IIO_VAL_FRACTIONAL for case when the result is negative and
exponent is 0.
example: if the result is -0.75, tmp0 will be 0 and tmp1 = 75
This causes the output to lose sign because of %d in snprintf
which works for tmp0 <= -1.
Reported-by: kernel test robot <lkp@intel.com> #error: uninitialized symbol tmp
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Anand Ashok Dumbre <anand.ashok.dumbre@xilinx.com>
Link: https://lore.kernel.org/r/1601910316-24111-1-git-send-email-anand.ashok.dumbre@xilinx.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
dmitry.torokhov@gmail.com [Tue, 6 Oct 2020 21:55:09 +0000 (14:55 -0700)]
iio: adc: exynos: do not rely on 'users' counter in ISR
The order in which 'users' counter is decremented vs calling drivers'
close() method is implementation specific, and we should not rely on
it. Let's introduce driver private flag and use it to signal ISR
to exit when device is being closed.
This has a side-effect of fixing issue of accessing inut->users
outside of input->mutex protection.
Reported-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201006215509.GA2556081@dtor-ws
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>