summaryrefslogtreecommitdiff
path: root/include/linux/init_task.h
diff options
context:
space:
mode:
authorDavid Lechner <dlechner@baylibre.com>2025-03-18 17:52:17 -0500
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2025-04-22 19:09:54 +0100
commit3b5b55ca940733b7b533fe3137a307ceacb4fb90 (patch)
tree03f0ff65a06d715976fdae6c11ff82ec3b77ca3e /include/linux/init_task.h
parentc1f571c3ca17cf3ab3e32f33d773b8e04378c189 (diff)
iio: adc: ad7606: dynamically allocate channel info
Refactor the ad7606 drivers to dynamically allocate the channel info. The channel info was getting a bit unwieldy. In some cases, the indio_dev->channels field was getting assigned up to 3 different times, each in a different function, making it difficult to see where the info was coming from. This problem stems from the number of permutations of the channel array needed to support various modes of operation and data buses. We already have 4 per chip (hardware mode, software mode, AXI ADC backend and AXI ADC backend with software mode) and we intend to add two more per chip when adding SPI offload support. To make it easier to read and maintain, move all of the channel setup to a single function that dynamically allocates and fills in the channel info. Additionally, this lets us remove some hacks where we had to compute an offset due to the fact that sometimes there was a soft timestamp channel at the start of the array. Now the timestamp channel is always at the end of the array as is typical in other drivers. Reviewed-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20250318-iio-adc-ad7606-improvements-v2-9-4b605427774c@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux/init_task.h')
0 files changed, 0 insertions, 0 deletions