Commit graph

951562 commits

Author SHA1 Message Date
Jonathan Cameron
6ced946a4b 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
2020-11-16 19:59:54 +00:00
Jonathan Cameron
87b8092e6b 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
2020-11-16 19:58:08 +00:00
Jonathan Cameron
e0d8ef7d2f 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>
2020-11-16 19:56:20 +00:00
Jonathan Cameron
6918ed88bf 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
2020-11-16 19:54:57 +00:00
Jonathan Cameron
8b74e06b0f 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
2020-11-16 19:54:09 +00:00
Jonathan Cameron
5034ceaff5 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
2020-11-16 19:54:08 +00:00
Jonathan Cameron
b120365fa6 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
2020-11-16 19:54:08 +00:00
Jonathan Cameron
3eccfe575e 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
2020-11-16 19:54:02 +00:00
Jonathan Cameron
d08a718742 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
2020-11-16 19:17:20 +00:00
Jonathan Cameron
b4be8bd1c6 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
2020-11-16 19:15:47 +00:00
Jonathan Cameron
7fd5da368e 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
2020-11-16 19:14:22 +00:00
Jonathan Cameron
1517c6a30c 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
2020-11-16 19:12:47 +00:00
Jonathan Cameron
b1b69ba70d 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
2020-11-16 19:11:28 +00:00
Jonathan Cameron
1cf4ad3f60 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
2020-11-16 19:10:01 +00:00
Jonathan Cameron
88b4485023 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
2020-11-16 19:08:51 +00:00
Jonathan Cameron
4dd49a1b9b 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
2020-11-16 19:07:21 +00:00
Jonathan Cameron
9a6ac31382 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
2020-11-16 19:05:14 +00:00
Jonathan Cameron
3c055f31ac 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
2020-11-16 19:04:28 +00:00
Jonathan Cameron
126df08e54 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
2020-11-16 19:01:45 +00:00
Alexandru Ardelean
24b284984e 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>
2020-11-14 16:44:59 +00:00
Fabrice Gasnier
89d1f72570 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>
2020-11-14 15:51:13 +00:00
Alexandru Ardelean
8dedcc3eee 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>
2020-11-14 15:31:25 +00:00
Gene Chen
1f4877218f 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>
2020-11-08 16:20:18 +00:00
Gene Chen
d4686c52a2 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>
2020-11-08 16:20:18 +00:00
Gene Chen
396cd5092c 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>
2020-11-08 16:19:31 +00:00
Olivier Moysan
499da8bdb8 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>
2020-11-08 16:07:40 +00:00
Cristian Pop
7f79711533 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>
2020-11-08 16:07:40 +00:00
Cristian Pop
7d4156ddf1 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>
2020-11-08 16:07:39 +00:00
Cristian Pop
75ed0be720 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>
2020-11-08 16:07:39 +00:00
Cristian Pop
3079188f82 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>
2020-11-08 16:07:39 +00:00
Cristian Pop
1d4ef9b39e 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>
2020-11-08 16:07:39 +00:00
Jonathan Neuschäfer
397f45ed26 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>
2020-11-08 15:01:35 +00:00
Tom Rix
a3c089b9cf 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>
2020-11-01 15:31:56 +00:00
Vaishnav M A
d884da1a75 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>
2020-11-01 15:28:55 +00:00
Vaishnav M A
41a4b8f13a 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>
2020-11-01 15:28:32 +00:00
Vaishnav M A
8bb97bab3f 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>
2020-11-01 15:28:32 +00:00
Tom Rix
b3b3ef6a08 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>
2020-11-01 14:59:46 +00:00
Tom Rix
3516ebc8a4 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>
2020-11-01 14:58:54 +00:00
Mauro Carvalho Chehab
3a096c2bda 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>
2020-10-31 15:02:36 +00:00
Tom Rix
7f96027cc4 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>
2020-10-31 15:02:36 +00:00
Tom Rix
4a6261c36d 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>
2020-10-31 15:02:35 +00:00
Tom Rix
691f453951 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>
2020-10-31 15:02:35 +00:00
Jonathan Cameron
675cb4ad1b 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
2020-10-31 15:02:35 +00:00
Rui Miguel Silva
c95003d895 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>
2020-10-31 15:02:29 +00:00
Fabien Parent
b4ae07cde9 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>
2020-10-18 11:10:17 +01:00
Deepak R Varma
d655844f7e 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>
2020-10-11 18:08:26 +01:00
Rikard Falkeborn
681ab2ce29 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>
2020-10-10 18:05:34 +01:00
Alexandru Ardelean
223f4d9517 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>
2020-10-10 18:03:28 +01:00
Alexandru Ardelean
28963f2f6b 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>
2020-10-10 18:01:26 +01:00
Anand Ashok Dumbre
0e7a3978a4 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>
2020-10-10 17:52:34 +01:00