History log of /linux/drivers/iio/adc/ad7091r-base.c (Results 26 – 50 of 86)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 2e21dee6 13-Mar-2024 Jiri Kosina <jkosina@suse.com>

Merge branch 'for-6.9/amd-sfh' into for-linus

- assorted fixes and optimizations for amd-sfh (Basavaraj Natikar)

Signed-off-by: Jiri Kosina <jkosina@suse.com>


# 41c177cf 11-Feb-2024 Rob Clark <robdclark@chromium.org>

Merge tag 'drm-misc-next-2024-02-08' into msm-next

Merge the drm-misc tree to uprev MSM CI.

Signed-off-by: Rob Clark <robdclark@chromium.org>


# 4db102dc 29-Jan-2024 Maxime Ripard <mripard@kernel.org>

Merge drm/drm-next into drm-misc-next

Kickstart 6.9 development cycle.

Signed-off-by: Maxime Ripard <mripard@kernel.org>


# be3382ec 23-Jan-2024 Lucas De Marchi <lucas.demarchi@intel.com>

Merge drm/drm-next into drm-xe-next

Sync to v6.8-rc1.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>


# 03c11eb3 14-Feb-2024 Ingo Molnar <mingo@kernel.org>

Merge tag 'v6.8-rc4' into x86/percpu, to resolve conflicts and refresh the branch

Conflicts:
arch/x86/include/asm/percpu.h
arch/x86/include/asm/text-patching.h

Signed-off-by: Ingo Molnar <mingo@k

Merge tag 'v6.8-rc4' into x86/percpu, to resolve conflicts and refresh the branch

Conflicts:
arch/x86/include/asm/percpu.h
arch/x86/include/asm/text-patching.h

Signed-off-by: Ingo Molnar <mingo@kernel.org>

show more ...


# 42ac0be1 26-Jan-2024 Ingo Molnar <mingo@kernel.org>

Merge branch 'linus' into x86/mm, to refresh the branch and pick up fixes

Signed-off-by: Ingo Molnar <mingo@kernel.org>


# f0b7a0d1 23-Jan-2024 Andrew Morton <akpm@linux-foundation.org>

Merge branch 'master' into mm-hotfixes-stable


# cf79f291 22-Jan-2024 Maxime Ripard <mripard@kernel.org>

Merge v6.8-rc1 into drm-misc-fixes

Let's kickstart the 6.8 fix cycle.

Signed-off-by: Maxime Ripard <mripard@kernel.org>


Revision tags: v6.8-rc1
# 296455ad 18-Jan-2024 Linus Torvalds <torvalds@linux-foundation.org>

Merge tag 'char-misc-6.8-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 big set of char/misc and other dri

Merge tag 'char-misc-6.8-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 big set of char/misc and other driver subsystem changes
for 6.8-rc1.

Other than lots of binder driver changes (as you can see by the merge
conflicts) included in here are:

- lots of iio driver updates and additions

- spmi driver updates

- eeprom driver updates

- firmware driver updates

- ocxl driver updates

- mhi driver updates

- w1 driver updates

- nvmem driver updates

- coresight driver updates

- platform driver remove callback api changes

- tags.sh script updates

- bus_type constant marking cleanups

- lots of other small driver updates

All of these have been in linux-next for a while with no reported
issues"

* tag 'char-misc-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (341 commits)
android: removed duplicate linux/errno
uio: Fix use-after-free in uio_open
drivers: soc: xilinx: add check for platform
firmware: xilinx: Export function to use in other module
scripts/tags.sh: remove find_sources
scripts/tags.sh: use -n to test archinclude
scripts/tags.sh: add local annotation
scripts/tags.sh: use more portable -path instead of -wholename
scripts/tags.sh: Update comment (addition of gtags)
firmware: zynqmp: Convert to platform remove callback returning void
firmware: turris-mox-rwtm: Convert to platform remove callback returning void
firmware: stratix10-svc: Convert to platform remove callback returning void
firmware: stratix10-rsu: Convert to platform remove callback returning void
firmware: raspberrypi: Convert to platform remove callback returning void
firmware: qemu_fw_cfg: Convert to platform remove callback returning void
firmware: mtk-adsp-ipc: Convert to platform remove callback returning void
firmware: imx-dsp: Convert to platform remove callback returning void
firmware: coreboot_table: Convert to platform remove callback returning void
firmware: arm_scpi: Convert to platform remove callback returning void
firmware: arm_scmi: Convert to platform remove callback returning void
...

show more ...


Revision tags: v6.7, v6.7-rc8
# b1a1eaf6 31-Dec-2023 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Merge tag 'iio-for-6.8b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next

Jonathan writes:

IIO: 2nd set of new device support, features and cleanup for 6.8

A late/o

Merge tag 'iio-for-6.8b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next

Jonathan writes:

IIO: 2nd set of new device support, features and cleanup for 6.8

A late/optimistic second pull request. The bots have been poking them
since Wednesday without any issues. There are a few fixes in the
ad7091r5 driver as part of rework to enable the ad7091r8 parts that
are included at start of that series.

Includes pre-work for major changes to the DMA buffers that should
land in 6.9 and will greatly improve performance and flexibility for
high performance devices by enabling DMABUF based zero copy transfers
when we don't need to bounce the data via user space.

New device support
------------------
adi,ad7091r8
- Major refactor of existing adi,ad7091r5 driver to separate out useful
shared library code that can be used by I2C and SPI parts.
- Use that library from a new driver supporting the AD7091R-2, AD7091R-4
and AD7091R-8 12-Bit SPI ADCs.
- Series includes some late breaking fixes for the ad7091r5.

microchip,mcp4821
- New driver for MCP4801, MCP4802, MCP4811, MCP4812, MCP4821 and MCP4822
I2C single / dual channel DACs.

Cleanup
-------
buffers:
- Use IIO_SEPARATE in place of some hard-coded 0 values.
dma-buffers:
- Simplify things to not use an outgoing queue given it only ever has
up to two elements and we only need to track which is first.
- Split the iio_dma_buffer_fileio_free() function up to make it easier
to read and enable reuse in a series lining up for 6.9
iio.h
- Drop some stale documentation of struct fields that don't exist.

* tag 'iio-for-6.8b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio:
iio: linux/iio.h: fix Excess kernel-doc description warning
MAINTAINERS: Add MAINTAINERS entry for AD7091R
iio: adc: Add support for AD7091R-8
dt-bindings: iio: Add AD7091R-8
iio: adc: Split AD7091R-5 config symbol
iio: adc: ad7091r: Add chip_info callback to get conversion result channel
iio: adc: ad7091r: Set device mode through chip_info callback
iio: adc: ad7091r: Remove unneeded probe parameters
iio: adc: ad7091r: Move chip init data to container struct
iio: adc: ad7091r: Move generic AD7091R code to base driver and header file
iio: adc: ad7091r: Enable internal vref if external vref is not supplied
iio: adc: ad7091r: Allow users to configure device events
iio: dac: driver for MCP4821
dt-bindings: iio: dac: add MCP4821
iio: buffer-dma: split iio_dma_buffer_fileio_free() function
iio: buffer-dma: Get rid of outgoing queue
iio: buffer: Use IIO_SEPARATE instead of a hard-coded 0

show more ...


Revision tags: v6.7-rc7
# 0b76ff46 19-Dec-2023 Marcelo Schmitt <marcelo.schmitt@analog.com>

iio: adc: Add support for AD7091R-8

Add support for Analog Devices AD7091R-2, AD7091R-4, and AD7091R-8
low power 12-Bit SAR ADCs with SPI interface.
Extend ad7091r-base driver so it can be used by t

iio: adc: Add support for AD7091R-8

Add support for Analog Devices AD7091R-2, AD7091R-4, and AD7091R-8
low power 12-Bit SAR ADCs with SPI interface.
Extend ad7091r-base driver so it can be used by the AD7091R-8 driver.

Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Link: https://lore.kernel.org/r/09d1d1c4b39cecc528488efac6094233715f5659.1703013352.git.marcelo.schmitt1@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

show more ...


# 8eb5976a 19-Dec-2023 Marcelo Schmitt <marcelo.schmitt@analog.com>

iio: adc: ad7091r: Add chip_info callback to get conversion result channel

AD7091R-5 and AD7091R-2/-4/-8 have slightly different register field
layout and due to that require different masks for get

iio: adc: ad7091r: Add chip_info callback to get conversion result channel

AD7091R-5 and AD7091R-2/-4/-8 have slightly different register field
layout and due to that require different masks for getting the index of
the channel associated with each read.
Add a callback function so the base driver can get correct channel ID
for each chip variant.

Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Link: https://lore.kernel.org/r/1f7a40b4839b3a1c3f1a0654a1b329bea870feb6.1703013352.git.marcelo.schmitt1@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

show more ...


# 7e3ebda3 19-Dec-2023 Marcelo Schmitt <marcelo.schmitt@analog.com>

iio: adc: ad7091r: Set device mode through chip_info callback

AD7091R-5 devices have a few modes of operation (sample, command,
autocycle) which are set by writing to configuration register fields.

iio: adc: ad7091r: Set device mode through chip_info callback

AD7091R-5 devices have a few modes of operation (sample, command,
autocycle) which are set by writing to configuration register fields.
Follow up patches will add support for AD7091R-2/-4/-8 which don't have
those operation modes nor the register fields for setting them.
Make ad7091r_set_mode() a callback function of AD7091R chip_info struct
so the base driver can appropriately handle each design without having
to check which actual chip is connected.

Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Link: https://lore.kernel.org/r/5140336980f66c2c45f05895c3b68e2f65fba1c2.1703013352.git.marcelo.schmitt1@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

show more ...


# 6ff545a9 19-Dec-2023 Marcelo Schmitt <marcelo.schmitt@analog.com>

iio: adc: ad7091r: Remove unneeded probe parameters

With the grouping of ad7091r initialization data and callbacks into the
init_info struct, there is no more need to pass the device name and
regist

iio: adc: ad7091r: Remove unneeded probe parameters

With the grouping of ad7091r initialization data and callbacks into the
init_info struct, there is no more need to pass the device name and
register map through probe function parameters as those will be available
in the init_info object.
Remove probe parameters that are not needed anymore.

Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Link: https://lore.kernel.org/r/090a6b461410a374511a8c73659de28b2665f96b.1703013352.git.marcelo.schmitt1@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

show more ...


# ca1a6790 19-Dec-2023 Marcelo Schmitt <marcelo.schmitt@analog.com>

iio: adc: ad7091r: Move chip init data to container struct

AD7091R designs may differ on their communication protocol and resources
required for proper setup. Extract what is design specific into a

iio: adc: ad7091r: Move chip init data to container struct

AD7091R designs may differ on their communication protocol and resources
required for proper setup. Extract what is design specific into a
init_info struct so the base driver can use data and callback functions
from that struct rather than checking which specific chip is connected
during device initialization.

Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Link: https://lore.kernel.org/r/1aca2261e227474dc58ce26442845947bcde9b14.1703013352.git.marcelo.schmitt1@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

show more ...


# 5b035ed0 19-Dec-2023 Marcelo Schmitt <marcelo.schmitt@analog.com>

iio: adc: ad7091r: Move generic AD7091R code to base driver and header file

Some code generic to AD7091R devices such as channel definitions were in
the AD7091R-5 driver. There was also some generic

iio: adc: ad7091r: Move generic AD7091R code to base driver and header file

Some code generic to AD7091R devices such as channel definitions were in
the AD7091R-5 driver. There was also some generic register definitions
declared in the base driver which would make more sense to be in the
header file.
The device state struct will be needed for the ad7091r8 driver in a
follow up patch so that ought to be moved to the header file as well.
Lastly, a couple of regmap callback functions are also capable of
abstracting characteristics of different AD7091R devices and those are
now being exported to IIO_AD7091R name space.

Move AD7091R generic code either to the base driver or to the header
file so both the ad7091r5 and the ad7091r8 driver can use those
declaration in follow up patches.

Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Link: https://lore.kernel.org/r/6376fc523ee503d47ec499e2cd2ef13bfb5fd8ba.1703013352.git.marcelo.schmitt1@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

show more ...


# e71c5c89 19-Dec-2023 Marcelo Schmitt <marcelo.schmitt@analog.com>

iio: adc: ad7091r: Enable internal vref if external vref is not supplied

The ADC needs a voltage reference to work correctly.
Users can provide an external voltage reference or use the chip internal

iio: adc: ad7091r: Enable internal vref if external vref is not supplied

The ADC needs a voltage reference to work correctly.
Users can provide an external voltage reference or use the chip internal
reference to operate the ADC.
The availability of an in chip reference for the ADC saves the user from
having to supply an external voltage reference, which makes the external
reference an optional property as described in the device tree
documentation.
Though, to use the internal reference, it must be enabled by writing to
the configuration register.
Enable AD7091R internal voltage reference if no external vref is supplied.

Fixes: 260442cc5be4 ("iio: adc: ad7091r5: Add scale and external VREF support")
Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Link: https://lore.kernel.org/r/b865033fa6a4fc4bf2b4a98ec51a6144e0f64f77.1703013352.git.marcelo.schmitt1@gmail.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

show more ...


# 020e71c7 19-Dec-2023 Marcelo Schmitt <marcelo.schmitt@analog.com>

iio: adc: ad7091r: Allow users to configure device events

AD7091R-5 devices are supported by the ad7091r-5 driver together with
the ad7091r-base driver. Those drivers declared iio events for notifyi

iio: adc: ad7091r: Allow users to configure device events

AD7091R-5 devices are supported by the ad7091r-5 driver together with
the ad7091r-base driver. Those drivers declared iio events for notifying
user space when ADC readings fall bellow the thresholds of low limit
registers or above the values set in high limit registers.
However, to configure iio events and their thresholds, a set of callback
functions must be implemented and those were not present until now.
The consequence of trying to configure ad7091r-5 events without the
proper callback functions was a null pointer dereference in the kernel
because the pointers to the callback functions were not set.

Implement event configuration callbacks allowing users to read/write
event thresholds and enable/disable event generation.

Since the event spec structs are generic to AD7091R devices, also move
those from the ad7091r-5 driver the base driver so they can be reused
when support for ad7091r-2/-4/-8 be added.

Fixes: ca69300173b6 ("iio: adc: Add support for AD7091R5 ADC")
Suggested-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Link: https://lore.kernel.org/r/59552d3548dabd56adc3107b7b4869afee2b0c3c.1703013352.git.marcelo.schmitt1@gmail.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

show more ...


# 7050abeb 20-Dec-2023 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Merge tag 'iio-for-6.8a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next

Jonathan writes:

1st set of IIO new device support, features and cleanup for 6.8

New devic

Merge tag 'iio-for-6.8a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next

Jonathan writes:

1st set of IIO new device support, features and cleanup for 6.8

New device support
------------------

adi,hmc425a
* Add support for ADRF5740 attenuators. Minor changes to driver needed
alongside new IDs.
aosong,ags02ma
* New driver for this volatile organic compounds sensor.
bosch,bmp280
* Add BMP390 (small amount of refactoring + ID)
bosch,bmi323
* New driver to support the BMI323 6-axis IMU.
honeywell,hsc030pa
* New driver supporting a huge number of SSC and HSC series pressure and
temperature sensors.
isil,isl76682
* New driver for this simple Ambient Light sensor.
liteon,ltr390
* New driver for this ambient and ultraviolet light sensor.
maxim,max34408
* New driver to support the MAX34408 and MAX34409 current monitoring ADCs.
melexis,mlx90635
* New driver for this Infrared contactless temperature sensor.
mirochip,mcp9600
* New driver for this thermocouple EMF convertor.
ti,hdc3020
* New driver for this integrated relative humidity and temperature
sensor.
vishay,veml6075
* New driver for this UVA and UVB light sensor.

General features
----------------

Device properties
* Add fwnode_property_match_property_string() helper to allow matching
single value property against an array of predefined strings.
* Use fwnode_property_string_array_count() inside
fwnode_property_match_string() instead of open coding the same.
checkpatch.pl
* Add exclusion of __aligned() from a warning reducing false positives
on IIO drivers (and hopefully beyond)

IIO Features
------------

core
* New light channel modifiers for UVA and UVB.
* Add IIO_CHAN_INFO_TROUGH as counterpart to IIO_CHAN_INFO_PEAK so that
we can support device that keep running track of the lowest value they
have seen in similar fashion to the existing peak tracking.
adi,adis library
* Use spi cs inactive delay even when a burst reading is performed.
As it's now used every time, can centralize the handling in the SPI
setup code in the driver.
adi,ad2s1210
* Support for fixed-mode to this resolver driver where the A0 and A1
pins are hard wired to config mode in which case position and config
must be read from appropriate config registers.
* Support reset GPIO if present.
adi,ad5791
* Allow configuration of presence of external amplifier in DT binding.
adi,adis16400
* Add spi-cs-inactive-delay-ns to bindings to allow it to be tweaked
if default delays are not quite enough for a specific board.
adi,adis16475
* Add spi-cs-inactive-delay-ns to bindings to allow it to be tweaked
if default delays are not quite enough for a specific board.
bosch,bmp280
* Enable multiple chip IDs per family of devices.
rohm,bu27008
* Add an illuminance channel calculated from RGB and IR data.

Cleanup
-------

Minor white space, typos and tidy up not explicitly called out.

Core
* Check that the available_scan_masks array passed to the IIO core
by a driver is sensible by ensuring the entries are ordered so the
minimum number of channels is enabled in the earlier entries (as they
will be selected if sufficient for the requested channels).
* Document that the available_scan_masks infrastructure doesn't currently
handle masks that don't fit in a long int.
* Improve intensity documentation to reflect that there is no expectation
of sensible units (it's dependent on a frequency sensitivity curve)
Various
* Use new device_property_match_property_string() to replace open coded
versions of the same thing.
* Fix a few MAINTAINERS filenames.
* i2c_get_match_data() and spi_get_device_match_data() pushed into
more drivers reducing boilerplate handling.
* Some unnecessary headers removed.
* ACPI_PTR() removals. It's rarely worth using this.
adi,ad7091r (early part of a series adding device support - useful in
their own right)
* Pass iio_dev directly an event handler rather than relying
on broken use of dev_get_drvdata() as drvdata is never set in this driver.
* Make sure alert is turned on.
adi,ad9467 (general driver fixing up as precursor to iio-backend proposal
which is under review for 6.9)
* Fix reset gpio handling to match expected polarity.
* Always handle error codes from spi_writes.
* Add a driver instance local mutex to avoid some races.
* Fix scale setting to align with available scale values.
* Split array of chip_info structures up into named individual elements.
* Convert to regmap.
honeywell,mprls0025pa
* Drop now unnecessary type references in DT binding for properties in
pascals.
invensense,mpu6050
* Don't eat a potentially useful return value from regmap_bulk_write()
invensense,icm42600
* Use max macro to improve code readability and save a few lines.
liteon,ltrf216a
* Improve prevision of light intensity.
microchip,mcp3911
* Use cleanup.h magic.
qcom,spmi*
* Fix wrong descriptions of SPMI reg fields in bindings.

Other
----

mailmap
* Update for Matt Ranostay

* tag 'iio-for-6.8a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (83 commits)
iio: adc: ad7091r: Align arguments to function call parenthesis
iio: adc: ad7091r: Set alert bit in config register
iio: adc: ad7091r: Pass iio_dev to event handler
scripts: checkpatch: Add __aligned to the list of attribute notes
iio: chemical: add support for Aosong AGS02MA
dt-bindings: iio: chemical: add aosong,ags02ma
dt-bindings: vendor-prefixes: add aosong
iio: accel: bmi088: update comments and Kconfig
dt-bindings: iio: humidity: Add TI HDC302x support
iio: humidity: Add driver for ti HDC302x humidity sensors
iio: ABI: document temperature and humidity peak/trough raw attributes
iio: core: introduce trough info element for minimum values
iio: light: driver for Lite-On ltr390
dt-bindings: iio: light: add ltr390
iio: light: isl76682: remove unreachable code
iio: pressure: driver for Honeywell HSC/SSC series
dt-bindings: iio: pressure: add honeywell,hsc030
doc: iio: Document intensity scale as poorly defined
dt-bindings: iio: temperature: add MLX90635 device
iio: temperature: mlx90635 MLX90635 IR Temperature sensor
...

show more ...


Revision tags: v6.7-rc6
# 2dfef505 16-Dec-2023 Marcelo Schmitt <marcelo.schmitt@analog.com>

iio: adc: ad7091r: Align arguments to function call parenthesis

Align arguments to function call open parenthesis to comply with the
Linux kernel coding style.

Signed-off-by: Marcelo Schmitt <marce

iio: adc: ad7091r: Align arguments to function call parenthesis

Align arguments to function call open parenthesis to comply with the
Linux kernel coding style.

Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Link: https://lore.kernel.org/r/fc71a82d3b4a6bc6f511f27451dbd7a3280a8c95.1702746240.git.marcelo.schmitt1@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

show more ...


# 149694f5 16-Dec-2023 Marcelo Schmitt <marcelo.schmitt@analog.com>

iio: adc: ad7091r: Set alert bit in config register

The ad7091r-base driver sets up an interrupt handler for firing events
when inputs are either above or below a certain threshold.
However, for the

iio: adc: ad7091r: Set alert bit in config register

The ad7091r-base driver sets up an interrupt handler for firing events
when inputs are either above or below a certain threshold.
However, for the interrupt signal to come from the device it must be
configured to enable the ALERT/BUSY/GPO pin to be used as ALERT, which
was not being done until now.
Enable interrupt signals on the ALERT/BUSY/GPO pin by setting the proper
bit in the configuration register.

Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Link: https://lore.kernel.org/r/e8da2ee98d6df88318b14baf3dc9630e20218418.1702746240.git.marcelo.schmitt1@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

show more ...


# a25a7df5 16-Dec-2023 Marcelo Schmitt <marcelo.schmitt@analog.com>

iio: adc: ad7091r: Pass iio_dev to event handler

Previous version of ad7091r event handler received the ADC state pointer
and retrieved the iio device from driver data field with dev_get_drvdata().

iio: adc: ad7091r: Pass iio_dev to event handler

Previous version of ad7091r event handler received the ADC state pointer
and retrieved the iio device from driver data field with dev_get_drvdata().
However, no driver data have ever been set, which led to null pointer
dereference when running the event handler.

Pass the iio device to the event handler and retrieve the ADC state struct
from it so we avoid the null pointer dereference and save the driver from
filling the driver data field.

Fixes: ca69300173b6 ("iio: adc: Add support for AD7091R5 ADC")
Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Link: https://lore.kernel.org/r/5024b764107463de9578d5b3b0a3d5678e307b1a.1702746240.git.marcelo.schmitt1@gmail.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

show more ...


Revision tags: v6.7-rc5, v6.7-rc4, v6.7-rc3, v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5, v6.6-rc4, v6.6-rc3, v6.6-rc2, v6.6-rc1, v6.5, v6.5-rc7, v6.5-rc6, v6.5-rc5, v6.5-rc4, v6.5-rc3, v6.5-rc2, v6.5-rc1, v6.4, v6.4-rc7, v6.4-rc6, v6.4-rc5, v6.4-rc4, v6.4-rc3, v6.4-rc2, v6.4-rc1, v6.3, v6.3-rc7, v6.3-rc6, v6.3-rc5, v6.3-rc4, v6.3-rc3, v6.3-rc2, v6.3-rc1, v6.2, v6.2-rc8, v6.2-rc7, v6.2-rc6, v6.2-rc5, v6.2-rc4, v6.2-rc3, v6.2-rc2, v6.2-rc1
# 4f2c0a4a 14-Dec-2022 Nick Terrell <terrelln@fb.com>

Merge branch 'main' into zstd-linus


Revision tags: v6.1, v6.1-rc8, v6.1-rc7, v6.1-rc6, v6.1-rc5, v6.1-rc4, v6.1-rc3, v6.1-rc2
# 14e77332 22-Oct-2022 Nick Terrell <terrelln@fb.com>

Merge branch 'main' into zstd-next


Revision tags: v6.1-rc1, v6.0, v6.0-rc7, v6.0-rc6, v6.0-rc5, v6.0-rc4, v6.0-rc3, v6.0-rc2, v6.0-rc1
# 8bb5e7f4 02-Aug-2022 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Merge branch 'next' into for-linus

Prepare input updates for 5.20 (or 6.0) merge window.


1234