]> git.ipfire.org Git - thirdparty/linux.git/commit
iio: dac: ds4424: refactor raw access to use bitwise operations
authorOleksij Rempel <o.rempel@pengutronix.de>
Tue, 10 Feb 2026 13:50:59 +0000 (14:50 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 22 Mar 2026 12:38:30 +0000 (12:38 +0000)
commita718013647dcd5aca14c9a8856e1dab694e846ae
treec6ad4a5bd8e7c897e30d823503febefbc007d62b
parent9e4e86a604dfd06402933467578c4b79f5412b2c
iio: dac: ds4424: refactor raw access to use bitwise operations

Refactor the raw access logic to use standard GENMASK() and BIT()
macros. Use abs() for magnitude calculation to simplify the logic and
make the data flow clearer.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/dac/ds4424.c