8ab33ae244
iio: dac: ad3552r: Correct device IDs
...
commit 9a85653ed3
upstream.
Device IDs for AD3542R and AD3552R were swapped leading to unintended
collection of DAC output ranges being used for each design.
Change device ID values so they are correct for each DAC chip.
Fixes: 8f2b54824b
("drivers:iio:dac: Add AD3552R driver support")
Signed-off-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com >
Reported-by: Chandrakant Minajigi <Chandrakant.Minajigi@analog.com >
Link: https://lore.kernel.org/r/011f480220799fbfabdd53896f8a2f251ad995ad.1691091324.git.marcelo.schmitt1@gmail.com
Cc: <Stable@vger.kernel.org >
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-10-19 23:08:55 +02:00
3cfdc3fc18
iio: dac: build ad5758 driver when AD5758 is selected
...
commit a146eccb68
upstream.
Commit 28d1a7ac2a
("iio: dac: Add AD5758 support") adds the config AD5758
and the corresponding driver ad5758.c. In the Makefile, the ad5758 driver
is however included when AD5755 is selected, not when AD5758 is selected.
Probably, this was simply a mistake that happened by copy-and-paste and
forgetting to adjust the actual line. Surprisingly, no one has ever noticed
that this driver is actually only included when AD5755 is selected and that
the config AD5758 has actually no effect on the build.
Fixes: 28d1a7ac2a
("iio: dac: Add AD5758 support")
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com >
Link: https://lore.kernel.org/r/20230508040208.12033-1-lukas.bulwahn@gmail.com
Cc: <Stable@vger.kernel.org >
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-06-09 10:34:19 +02:00
ab0c2dffe8
iio: dac: mcp4725: Fix i2c_master_send() return value handling
...
commit 09d3bec700
upstream.
The i2c_master_send() returns number of sent bytes on success,
or negative on error. The suspend/resume callbacks expect zero
on success and non-zero on error. Adapt the return value of the
i2c_master_send() to the expectation of the suspend and resume
callbacks, including proper validation of the return value.
Fixes: cf35ad61ac
("iio: add mcp4725 I2C DAC driver")
Signed-off-by: Marek Vasut <marex@denx.de >
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de >
Link: https://lore.kernel.org/r/20230511004330.206942-1-marex@denx.de
Cc: <Stable@vger.kernel.org >
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-06-09 10:34:19 +02:00
b263f81bd1
iio: dac: ad5755: Add missing fwnode_handle_put()
...
commit ffef737915
upstream.
In ad5755_parse_fw(), we should add fwnode_handle_put()
when break out of the iteration device_for_each_child_node()
as it will automatically increase and decrease the refcounter.
Fixes: 3ac27afefd
("iio:dac:ad5755: Switch to generic firmware properties and drop pdata")
Signed-off-by: Liang He <windhl@126.com >
Link: https://lore.kernel.org/r/20230322035627.1856421-1-windhl@126.com
Cc: <Stable@vger.kernel.org >
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-04-26 14:28:37 +02:00
59d667d7ae
iio: dac: cio-dac: Fix max DAC write value check for 12-bit
...
commit c3701185ee
upstream.
The CIO-DAC series of devices only supports DAC values up to 12-bit
rather than 16-bit. Trying to write a 16-bit value results in only the
lower 12 bits affecting the DAC output which is not what the user
expects. Instead, adjust the DAC write value check to reject values
larger than 12-bit so that they fail explicitly as invalid for the user.
Fixes: 3b8df5fd52
("iio: Add IIO support for the Measurement Computing CIO-DAC family")
Cc: stable@vger.kernel.org
Signed-off-by: William Breathitt Gray <william.gray@linaro.org >
Link: https://lore.kernel.org/r/20230311002248.8548-1-william.gray@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-04-13 16:55:27 +02:00
a09476668e
Merge tag 'char-misc-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
...
Pull char/misc and other driver updates from Greg KH:
"Here is the large set of char/misc and other small driver subsystem
changes for 6.1-rc1. Loads of different things in here:
- IIO driver updates, additions, and changes. Probably the largest
part of the diffstat
- habanalabs driver update with support for new hardware and
features, the second largest part of the diff.
- fpga subsystem driver updates and additions
- mhi subsystem updates
- Coresight driver updates
- gnss subsystem updates
- extcon driver updates
- icc subsystem updates
- fsi subsystem updates
- nvmem subsystem and driver updates
- misc driver updates
- speakup driver additions for new features
- lots of tiny driver updates and cleanups
All of these have been in the linux-next tree for a while with no
reported issues"
* tag 'char-misc-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (411 commits)
w1: Split memcpy() of struct cn_msg flexible array
spmi: pmic-arb: increase SPMI transaction timeout delay
spmi: pmic-arb: block access for invalid PMIC arbiter v5 SPMI writes
spmi: pmic-arb: correct duplicate APID to PPID mapping logic
spmi: pmic-arb: add support to dispatch interrupt based on IRQ status
spmi: pmic-arb: check apid against limits before calling irq handler
spmi: pmic-arb: do not ack and clear peripheral interrupts in cleanup_irq
spmi: pmic-arb: handle spurious interrupt
spmi: pmic-arb: add a print in cleanup_irq
drivers: spmi: Directly use ida_alloc()/free()
MAINTAINERS: add TI ECAP driver info
counter: ti-ecap-capture: capture driver support for ECAP
Documentation: ABI: sysfs-bus-counter: add frequency & num_overflows items
dt-bindings: counter: add ti,am62-ecap-capture.yaml
counter: Introduce the COUNTER_COMP_ARRAY component type
counter: Consolidate Counter extension sysfs attribute creation
counter: Introduce the Count capture component
counter: 104-quad-8: Add Signal polarity component
counter: Introduce the Signal polarity component
counter: interrupt-cnt: Implement watch_validate callback
...
2022-10-08 08:56:37 -07:00
f13c81a335
iio: dac: ad5593r: add check for i2c functionality
...
Make sure that the needed i2c functionality is supported during probe.
Signed-off-by: Nuno Sá <nuno.sa@analog.com >
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com >
Link: https://lore.kernel.org/r/20220913073413.140475-3-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-09-21 18:42:53 +01:00
558a25f903
iio: dac: ad5593r: Fix i2c read protocol requirements
...
For reliable operation across the full range of supported
interface rates, the AD5593R needs a STOP condition between
address write, and data read (like show in the datasheet Figure 40)
so in turn i2c_smbus_read_word_swapped cannot be used.
While at it, a simple helper was added to make the code simpler.
Fixes: 56ca9db862
("iio: dac: Add support for the AD5592R/AD5593R ADCs/DACs")
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com >
Signed-off-by: Nuno Sá <nuno.sa@analog.com >
Cc: <Stable@vger.kernel.org >
Link: https://lore.kernel.org/r/20220913073413.140475-2-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-09-21 18:42:53 +01:00
ed5c2f5fd1
i2c: Make remove callback return void
...
The value returned by an i2c driver's remove function is mostly ignored.
(Only an error message is printed if the value is non-zero that the
error is ignored.)
So change the prototype of the remove function to return no value. This
way driver authors are not tempted to assume that passing an error to
the upper layer is a good idea. All drivers are adapted accordingly.
There is no intended change of behaviour, all callbacks were prepared to
return 0 before.
Reviewed-by: Peter Senna Tschudin <peter.senna@gmail.com >
Reviewed-by: Jeremy Kerr <jk@codeconstruct.com.au >
Reviewed-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Reviewed-by: Crt Mori <cmo@melexis.com >
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com >
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Acked-by: Marek Behún <kabel@kernel.org > # for leds-turris-omnia
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Reviewed-by: Petr Machata <petrm@nvidia.com > # for mlxsw
Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com > # for surface3_power
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com > # for bmc150-accel-i2c + kxcjk-1013
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl > # for media/* + staging/media/*
Acked-by: Miguel Ojeda <ojeda@kernel.org > # for auxdisplay/ht16k33 + auxdisplay/lcd2s
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com > # for versaclock5
Reviewed-by: Ajay Gupta <ajayg@nvidia.com > # for ucsi_ccg
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com > # for iio
Acked-by: Peter Rosin <peda@axentia.se > # for i2c-mux-*, max9860
Acked-by: Adrien Grassein <adrien.grassein@gmail.com > # for lontium-lt8912b
Reviewed-by: Jean Delvare <jdelvare@suse.de > # for hwmon, i2c-core and i2c/muxes
Acked-by: Corey Minyard <cminyard@mvista.com > # for IPMI
Reviewed-by: Vladimir Oltean <olteanv@gmail.com >
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com > # for drivers/power
Acked-by: Krzysztof Hałasa <khalasa@piap.pl >
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de >
Signed-off-by: Wolfram Sang <wsa@kernel.org >
2022-08-16 12:46:26 +02:00
bf19b23591
iio: dac: mcp4725: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Philippe Reynes <tremyfr@yahoo.fr >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-16-jic23@kernel.org
2022-07-18 18:48:18 +01:00
c9ccad9911
iio: dac: max5821: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Philippe Reynes <tremyfr@yahoo.fr >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-15-jic23@kernel.org
2022-07-18 18:48:18 +01:00
7b9d3e85d7
iio: dac: max517: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Marcus Folkesson <marcus.folkesson@gmail.com >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-14-jic23@kernel.org
2022-07-18 18:48:18 +01:00
83a2aa2646
iio: dac: ltc1660: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Marcus Folkesson <marcus.folkesson@gmail.com >
Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-13-jic23@kernel.org
2022-07-18 18:48:18 +01:00
46b7116712
iio: dac: ds4424: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Using these newer macros allows the compiler to remove the unused
structure and functions when !CONFIG_PM_SLEEP + removes the need to
mark pm functions __maybe_unused.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Ismail H. Kose <ihkose@gmail.com >
Reviewed-by: Paul Cercueil <paul@crapouillou.net >
Link: https://lore.kernel.org/r/20220621202719.13644-12-jic23@kernel.org
2022-07-18 18:48:17 +01:00
e1d965cebe
iio: dac: cio-dac: Cleanup indexing for DAC writes
...
Simplify DAC write code by defining base member as u16 __iomem *; DAC
registers are 16-bit so this allows us to index each DAC channel
directly in a loop rather than calculating the offsets by multipling by
2 each time.
Signed-off-by: William Breathitt Gray <william.gray@linaro.org >
Link: https://lore.kernel.org/r/d9dab6696af7eabb2d46f5cbc7871329f499c1c9.1657213745.git.william.gray@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-07-16 18:48:20 +01:00
6581672896
iio: dac: ad5380: align '*' each line and drop unneeded blank line
...
Tidy up a missing space before */ and a unwanted blank line between
function documentation and code.
Signed-off-by: Jiang Jian <jiangjian@cdjrlc.com >
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Link: https://lore.kernel.org/r/20220621092319.69598-1-jiangjian@cdjrlc.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-07-01 11:19:08 +01:00
1c8dbb5be5
iio: dac: mcp4922: add support to mcp4921
...
Add support to mcp4921 which has only one output channel.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com >
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com >
Link: https://lore.kernel.org/r/20220624095619.1415614-1-kory.maincent@bootlin.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-07-01 11:19:08 +01:00
f7108bcb34
iio: dac: stm32-dac: Replace open coded str_enable_disable()
...
Replace open coded str_enable_disable() in error message in
stm32_dac_set_enable_state().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20220616220023.9894-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-06-18 16:38:05 +01:00
55ae407ae9
iio: dac: vf610_dac: explicitly add proper header files
...
Do not trust the fact that iio.h includes of.h which in turn includes
all the headers we are relying on.
The ultimate goal is to actually drop of.h from iio.h.
Signed-off-by: Nuno Sá <nuno.sa@analog.com >
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Link: https://lore.kernel.org/r/20220610084545.547700-15-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-06-14 11:53:20 +01:00
2a53b91c23
iio: dac: stm32-dac: explicitly add proper header files
...
Do not trust the fact that iio.h includes of.h which in turn includes
all the headers we are relying on.
The ultimate goal is to actually drop of.h from iio.h.
Signed-off-by: Nuno Sá <nuno.sa@analog.com >
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Link: https://lore.kernel.org/r/20220610084545.547700-14-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-06-14 11:53:20 +01:00
b9ac08b328
iio: dac: ti-dac7612: Fix alignment for DMA safety
...
____cacheline_aligned is an insufficient guarantee for non-coherent DMA
on platforms with 128 byte cachelines above L1. Switch to the updated
IIO_DMA_MINALIGN definition.
Updated help text to 'may' require buffers to be in their own cacheline.
Fixes: 977724d205
("iio:dac:ti-dac7612: Add driver for Texas Instruments DAC7612")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Ricardo Ribalda <ribalda@kernel.org >
Acked-by: Nuno Sá <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20220508175712.647246-65-jic23@kernel.org
2022-06-14 11:53:17 +01:00
3637c49ed5
iio: dac: ti-dac7311: Fix alignment for DMA safety
...
____cacheline_aligned is an insufficient guarantee for non-coherent DMA
on platforms with 128 byte cachelines above L1. Switch to the updated
IIO_DMA_MINALIGN definition.
Fixes: 7a02ef7907
("iio:dac:ti-dac7311 Add driver for Texas Instrument DAC7311")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Charles-Antoine Couret <charles-antoine.couret@essensium.com >
Acked-by: Nuno Sá <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20220508175712.647246-64-jic23@kernel.org
2022-06-14 11:53:17 +01:00
58e2237153
iio: dac: ti-dac5571: Fix alignment for DMA safety
...
____cacheline_aligned is an insufficient guarantee for non-coherent DMA
on platforms with 128 byte cachelines above L1. Switch to the updated
IIO_DMA_MINALIGN definition.
Fixes: df38a4a72a
("iio: dac: add TI DAC5571 family support")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Sean Nyekjaer <sean.nyekjaer@prevas.dk >
Acked-by: Nuno Sá <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20220508175712.647246-63-jic23@kernel.org
2022-06-14 11:53:17 +01:00
03a0cc77f1
iio: dac: ti-dac082s085: Fix alignment for DMA safety
...
____cacheline_aligned is an insufficient guarantee for non-coherent DMA
on platforms with 128 byte cachelines above L1. Switch to the updated
IIO_DMA_MINALIGN definition.
Fixes: 61011264c1
("iio: dac: Add Texas Instruments 8/10/12-bit 2/4-channel DAC driver")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Acked-by: Nuno Sá <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20220508175712.647246-62-jic23@kernel.org
2022-06-14 11:53:17 +01:00
e66bf04797
iio: dac: mcp4922: Fix alignment for DMA safety
...
____cacheline_aligned is an insufficient guarantee for non-coherent DMA
on platforms with 128 byte cachelines above L1. Switch to the updated
IIO_DMA_MINALIGN definition.
Fixes: 1b791fadf3
("iio: dac: mcp4902/mcp4912/mcp4922 dac driver")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Acked-by: Nuno Sá <nuno.sa@analog.com >
Acked-by: Michael Welling <mwelling@ieee.org >
Link: https://lore.kernel.org/r/20220508175712.647246-61-jic23@kernel.org
2022-06-14 11:53:17 +01:00
2030708377
iio: dac: ltc2688: Fix alignment for DMA safety
...
____cacheline_aligned is an insufficient guarantee for non-coherent DMA
on platforms with 128 byte cachelines above L1. Switch to the updated
IIO_DMA_MINALIGN definition.
Update the comment to include 'may'.
Fixes: 832cb9eeb9
("iio: dac: add support for ltc2688")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Acked-by: Nuno Sá <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20220508175712.647246-60-jic23@kernel.org
2022-06-14 11:53:17 +01:00
1c20292c6b
iio: dac: ad8801: Fix alignment for DMA safety
...
____cacheline_aligned is an insufficient guarantee for non-coherent DMA
on platforms with 128 byte cachelines above L1. Switch to the updated
IIO_DMA_MINALIGN definition.
Fixes: 7f270bc9a2
("iio: dac: AD8801: add Analog Devices AD8801/AD8803 support")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Acked-by: Nuno Sá <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20220508175712.647246-59-jic23@kernel.org
2022-06-14 11:53:17 +01:00
69e51448dd
iio: dac: ad7303: Fix alignment for DMA safety
...
____cacheline_aligned is an insufficient guarantee for non-coherent DMA
on platforms with 128 byte cachelines above L1. Switch to the updated
IIO_DMA_MINALIGN definition.
Update the comment to include 'may'.
Fixes: f83478240e
("iio:dac: Add support for the AD7303")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Acked-by: Nuno Sá <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20220508175712.647246-58-jic23@kernel.org
2022-06-14 11:53:16 +01:00
8482468b30
iio: dac: ad7293: Fix alignment for DMA safety
...
____cacheline_aligned is an insufficient guarantee for non-coherent DMA
on platforms with 128 byte cachelines above L1. Switch to the updated
IIO_DMA_MINALIGN definition.
Fixes: 0bb12606c0
("iio:dac:ad7293: add support for AD7293")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Antoniu Miclaus <antoniu.miclaus@analog.com >
Acked-by: Nuno Sá <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20220508175712.647246-57-jic23@kernel.org
2022-06-14 11:53:16 +01:00
b2d5e9de77
iio: dac: ad5791: Fix alignment for DMA saftey
...
____cacheline_aligned is an insufficient guarantee for non-coherent DMA
on platforms with 128 byte cachelines above L1. Switch to the updated
IIO_DMA_MINALIGN definition.
Fixes: 791bb52a0c
("iio:ad5791: Do not store transfer buffers on the stack")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Acked-by: Nuno Sá <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20220508175712.647246-56-jic23@kernel.org
2022-06-14 11:53:16 +01:00
27f2261d16
iio: dac: ad5770r: Fix alignment for DMA safety
...
____cacheline_aligned is an insufficient guarantee for non-coherent DMA
on platforms with 128 byte cachelines above L1. Switch to the updated
IIO_DMA_MINALIGN definition.
Fixes: cbbb819837
("iio: dac: ad5770r: Add AD5770R support")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Alexandru Tachici <alexandru.tachici@analog.com >
Acked-by: Nuno Sá <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20220508175712.647246-55-jic23@kernel.org
2022-06-14 11:53:16 +01:00
c32be7f035
iio: dac: ad5766: Fix alignment for DMA safety
...
____cacheline_aligned is an insufficient guarantee for non-coherent DMA
on platforms with 128 byte cachelines above L1. Switch to the updated
IIO_DMA_MINALIGN definition.
Fixes: fd9373e41b
("iio: dac: ad5766: add driver support for AD5766")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Acked-by: Nuno Sá <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20220508175712.647246-54-jic23@kernel.org
2022-06-14 11:53:16 +01:00
b378722a3e
iio: dac: ad5764: Fix alignment for DMA safety
...
____cacheline_aligned is an insufficient guarantee for non-coherent DMA
on platforms with 128 byte cachelines above L1. Switch to the updated
IIO_DMA_MINALIGN definition.
Update the comment to include 'may'.
Fixes: 68b14d7ea9
("staging:iio:dac: Add AD5764 driver")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Acked-by: Nuno Sá <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20220508175712.647246-53-jic23@kernel.org
2022-06-14 11:53:16 +01:00
7d12a61187
iio: dac: ad5761: Fix alignment for DMA safety
...
____cacheline_aligned is an insufficient guarantee for non-coherent DMA
on platforms with 128 byte cachelines above L1. Switch to the updated
IIO_DMA_MINALIGN definition.
Update the comment to include 'may'.
Fixes: 131497acd8
("iio: add ad5761 DAC driver")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Acked-by: Nuno Sá <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20220508175712.647246-52-jic23@kernel.org
2022-06-14 11:53:16 +01:00
d0c167ceff
iio: dac: ad5755: Fix alignment for DMA safety
...
____cacheline_aligned is an insufficient guarantee for non-coherent DMA
on platforms with 128 byte cachelines above L1. Switch to the updated
IIO_DMA_MINALIGN definition.
Update the comment to include 'may'.
Fixes: c499d029d8
("iio:dac: Add ad5755 driver")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Acked-by: Nuno Sá <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20220508175712.647246-51-jic23@kernel.org
2022-06-14 11:53:16 +01:00
444e38927d
iio: dac: ad5686: Fix alignment for DMA safety
...
____cacheline_aligned is an insufficient guarantee for non-coherent DMA
on platforms with 128 byte cachelines above L1. Switch to the updated
IIO_DMA_MINALIGN definition.
Update the comment to include 'may'.
Fixes: 0357e488b8
("iio:dac:ad5686: Refactor the driver")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Acked-by: Nuno Sá <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20220508175712.647246-50-jic23@kernel.org
2022-06-14 11:53:16 +01:00
4a4a79c06c
iio: dac: ad5592r: Fix alignment for DMA safety
...
____cacheline_aligned is an insufficient guarantee for non-coherent DMA
on platforms with 128 byte cachelines above L1. Switch to the updated
IIO_DMA_MINALIGN definition.
Fixes: 56ca9db862
("iio: dac: Add support for the AD5592R/AD5593R ADCs/DACs")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Paul Cercueil <paul@crapouillou.net >
Acked-by: Nuno Sá <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20220508175712.647246-49-jic23@kernel.org
2022-06-14 11:53:16 +01:00
00b9737caa
iio: dac: ad5504: Fix alignment for DMA safety
...
____cacheline_aligned is an insufficient guarantee for non-coherent DMA
on platforms with 128 byte cachelines above L1. Switch to the updated
IIO_DMA_MINALIGN definition.
Fixes: 0dbe59c7a7
("iio:ad5504: Do not store transfer buffers on the stack")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Acked-by: Nuno Sá <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20220508175712.647246-48-jic23@kernel.org
2022-06-14 11:53:16 +01:00
678d536bb4
iio: dac: ad5449: Fix alignment for DMA safety
...
____cacheline_aligned is an insufficient guarantee for non-coherent DMA
on platforms with 128 byte cachelines above L1. Switch to the updated
IIO_DMA_MINALIGN definition.
Update the comment to include 'may'.
Fixes: 8341dc04df
("iio:dac: Add support for the ad5449")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Acked-by: Nuno Sá <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20220508175712.647246-47-jic23@kernel.org
2022-06-14 11:53:15 +01:00
d2b240d3d3
iio: dac: ad5421: Fix alignment for DMA safety
...
____cacheline_aligned is an insufficient guarantee for non-coherent DMA
on platforms with 128 byte cachelines above L1. Switch to the updated
IIO_DMA_MINALIGN definition.
Update the comment to include 'may'.
Fixes: 5691b23489
("staging:iio:dac: Add AD5421 driver")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Acked-by: Nuno Sá <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20220508175712.647246-46-jic23@kernel.org
2022-06-14 11:53:15 +01:00
94ec314e1b
iio: dac: ad5360: Fix alignment for DMA safety
...
____cacheline_aligned is an insufficient guarantee for non-coherent DMA
on platforms with 128 byte cachelines above L1. Switch to the updated
IIO_DMA_MINALIGN definition.
Update the comment to include 'may'.
Fixes: a3e2940c24
("staging:iio:dac: Add AD5360 driver")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Acked-by: Nuno Sá <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20220508175712.647246-45-jic23@kernel.org
2022-06-14 11:53:15 +01:00
8779b88c21
iio: dac: ad5064: Fix alignment for DMA safety
...
____cacheline_aligned is an insufficient guarantee for non-coherent DMA
on platforms with 128 byte cachelines above L1. Switch to the updated
IIO_DMA_MINALIGN definition.
Update the comment to include 'may'.
Fixes: 6a17a0768f
("iio:dac:ad5064: Add support for the ad5629r and ad5669r")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Acked-by: Nuno Sá <nuno.sa@analog.com >
Link: https://lore.kernel.org/r/20220508175712.647246-44-jic23@kernel.org
2022-06-14 11:53:15 +01:00
3b9b4357d5
iio: dac: ad5592r: Get rid of OF specifics
...
Use dev_fwnode() instead of direct OF node dereference when checking
for regulator API error code.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20220531135320.63096-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-06-14 11:53:08 +01:00
a5daaa470b
iio: dac: ti-dac5571: add support for ti,dac121c081
...
It fits right in as a single 12-bit DAC.
Reviewed-by: Sean Nyekjaer <sean@geanix.com >
Signed-off-by: Peter Rosin <peda@axentia.se >
Link: https://lore.kernel.org/r/a09a49a5-3d01-21f7-02ed-b191d70e7609@axentia.se
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-06-11 14:35:27 +01:00
c5a37ad0fc
iio: dac: cio-dac: Utilize iomap interface
...
This driver doesn't need to access I/O ports directly via inb()/outb()
and friends. This patch abstracts such access by calling ioport_map()
to enable the use of more typical ioread8()/iowrite8() I/O memory
accessor calls.
Suggested-by: David Laight <David.Laight@ACULAB.COM >
Signed-off-by: William Breathitt Gray <william.gray@linaro.org >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/c973ce9a326131552caf762381edf8e90be43cc5.1652201921.git.william.gray@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-06-11 14:35:26 +01:00
bcfa954650
Merge tag 'iio-for-5.19a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next
...
Jonathan writes:
First set of IIO new device support, features and cleanup for 5.19
Usual mixed bag. Stand out this time is Andy Shevchenko's continuing
effort to move drivers over the generic firmware interfaces.
Device support
* sprd,sc2720
- upm9620 binding addition.
- Refactor and support for sc2720, sc2721 and sc2730.
* ti,ads1015
- Refactor driver and add support for TLA2024.
Device support (IDs only)
* invensense,mpu6050
- Add ID for ICM-20608-D.
* st,accel:
- Add ID for lis302dl.
* st,lsm6dsx
- Add support for ASM330LHHX (can fallback to LSM6DSR.)
Features
* convert drivers to device properties
- IIO core
- adi,ad7266
- adi,adis16480
- adi,adxl355
- bosch,bmi160
- domintech,dmard06
- fsl,fxas21002c
- invensense,mpu3050
- linear,ltc2983
- linear,ltc2632
- maxbotix,mb1232
- maxim,max31856
- maxim,max31865
- multiplexer
- ping
- rescale
- taos,tsl2772
* core
- Add runtime check on whether realbits fit in storagebits for each
channel.
* adi,ad_sigma_delta
- Add sequencer support and relevant update_scan_mode callbacks for
adi,ad7192 and adi,ad7124.
Cleanup and minor fixes
* MAINTAINERS
- Update Lorenzo Bianconi's email address for IIO drivers.
- Add entry for ad3552r and update maintainer in dt-binding doc.
* tree-wide
- Replace strtobool() with kstrtobool().
- Drop false OF dependencies.
* core
- Tidy up and document IIO modes.
- Take iio_buffer_enabled() out of header allowing current_mode to be
moved to the opaque structure.
- As all kfifo buffers use the same mode value, drop that parameter
and set it unconditionally.
- White space fixes and similar.
- Drop use of list iterator variable for
list_for_each_entry_continue_reverse and use list_prepare_entry to
restart.
* sysfs-trigger
- Replace use of 'found' variable with dedicate list iterator variable.
* adi,ad7124
- Drop misleading shift.
* adi,ad2s1210
- Remove redundant local variable assignment.
* adi,adis16480
- Use local device pointer to reduce repetition.
- Improve handling of clocks.
* domintech,dmard09
- White space.
* dummy driver
- Improve error handling.
* fsl,mma8452
- Add missing documentation of name element.
* invensense,mpu3050
- Stop remove() returning non 0.
* kionix,kxsd9
- White space.
* linear,ltc2688
- Use local variable for struct device.
- Combine of_node_put() error handling paths.
* linear,ltc2983
- Avoid use of constants in messages where a define is available.
* microchip,mcp4131
- Fix compatible in dt example.
* pni,rm3100
- Stop directly accessing iio_dev->current_mode just to find out
if the buffer is enabled.
* renesas,rzg2l
- Relax kconfig constraint to include newer devices.
* sprd,sc27xx
- Fix wrong scaling mask.
- Improve the calibration values.
* samsung,ssp
- Replace a 'found' variable in favor of an explicit value that was
found.
* sensortek,stk3xx
- Add proximity-near-level binding and driver support.
* st,st_sensors:
- Drop unused accel_type enum.
- Return early in *_write_raw()
- Drop unnecessary locking in _avail functions.
- Add local lock to protect odr against concurrent updates allowing
mlock to no longer be used outside of the core.
- Use iio_device_claim_direct_mode() rather than racy checking of
the current mode.
* st,stmpe-adc
- Fix checks on wait_for_completion_timeout().
- Allow use of of_device_id for matching.
* st,stm32-dfsdm
- Stop accessing iio_dev->current_mode to find out if the buffer
is enabled (so we can hide that variable in the opaque structure)
* st,vl53l0x
- Fix checks on wait_for_completion_timeout.
* ti,ads1015
- Add missing ID for ti,ads1115 in binding doc.
- Convert from repeated chip ID look up to selecting static const
data.
- Switch to read_avail() callback.
* ti,ads8688
- Use of_device_id for driver matching.
* ti,palmas-adc
- Drop a warning on minor calibration mismatch leading to slightly
negative values after applying the calibration.
* tag 'iio-for-5.19a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (95 commits)
iio: ti-ads8688: use of_device_id for OF matching
iio: stmpe-adc: use of_device_id for OF matching
dt-bindings: iio: Fix incorrect compatible strings in examples
iio: gyro: mpu3050: Make mpu3050_common_remove() return void
iio: dac: ltc2632: Make use of device properties
iio: temperature: max31865: Make use of device properties
iio: proximity: mb1232: Switch to use fwnode_irq_get()
iio: imu: adis16480: Improve getting the optional clocks
iio: imu: adis16480: Use temporary variable for struct device
iio: imu: adis16480: Make use of device properties
staging: iio: ad2s1210: remove redundant assignment to variable negative
iio: adc: sc27xx: add support for PMIC sc2730
iio: adc: sc27xx: add support for PMIC sc2720 and sc2721
iio: adc: sc27xx: refactor some functions for support more PMiCs
iio: adc: sc27xx: structure adjustment and optimization
iio: adc: sc27xx: Fine tune the scale calibration values
iio: adc: sc27xx: fix read big scale voltage not right
dt-bindings:iio:adc: add sprd,ump9620-adc dt-binding
iio: proximity: stk3310: Export near level property for proximity sensor
dt-bindings: iio: light: stk33xx: Add proximity-near-level
...
2022-05-19 16:53:08 +02:00
a9d1a34f2a
iio: dac: ltc2632: Make use of device properties
...
Convert the module to be property provider agnostic and allow
it to be used on non-OF platforms.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20220413192203.46704-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-04-28 19:34:10 +01:00
61c8686cee
iio: dac: dpot: Drop dependency on OF
...
Nothing in this driver depends on OF firmware so drop the dependency
to remove the false impression such a dependency exists.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20220413190632.30365-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-04-28 19:22:54 +01:00
a966174494
iio: dac: lpc18xx: Drop dependency on OF
...
Nothing in this driver depends on OF firmware so drop the dependency
to remove the false impression such a dependency exists.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20220413190819.38206-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-04-28 19:22:54 +01:00
ebb3861c3f
iio: dac: vf610: Drop dependency on OF
...
Nothing in this driver depends on OF firmware so drop the dependency
to remove the false impression such a dependency exists.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20220413191611.46204-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-04-28 19:22:54 +01:00