]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: adc: ad4695: add 2nd regmap for 16-bit registers
authorDavid Lechner <dlechner@baylibre.com>
Tue, 20 Aug 2024 15:58:35 +0000 (10:58 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 3 Sep 2024 17:49:43 +0000 (18:49 +0100)
commit2ba49fc41b1c399a98468b0e144cfb6f3ad37b64
treebff2b89c67583cbda578b0d693711832dd6fe00c
parent16531118ba63dd9bcd65203d04a9c9d6f6800547
iio: adc: ad4695: add 2nd regmap for 16-bit registers

The AD4695 and similar chips have some multibyte registers that have
to be read/written in a single operation. So we need to add a 2nd regmap
for these registers.

These registers are removed from the 8-bit regmap allowable ranges and
AD4695_MAX_REG is dropped since it would be ambiguous now.

debugfs register access is also updated to automatically use the correct
regmap depending on the register address.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20240820-ad4695-gain-offset-v1-1-c8f6e3b47551@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad4695.c