[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aEme1ZmmEHmNr0Pa@smile.fi.intel.com>
Date: Wed, 11 Jun 2025 18:20:53 +0300
From: Andy Shevchenko <andy@...nel.org>
To: Lothar Rubusch <l.rubusch@...il.com>
Cc: lars@...afoo.de, Michael.Hennerich@...log.com, jic23@...nel.org,
dlechner@...libre.com, nuno.sa@...log.com, corbet@....net,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, eraretuya@...il.com
Subject: Re: [PATCH v9 04/11] iio: accel: adxl345: simplify interrupt mapping
On Tue, Jun 10, 2025 at 09:59:26PM +0000, Lothar Rubusch wrote:
> Replace mapping all sensor interrupts to the corresponding interrupt
> line using regmap_assign_bits() since it takes a boolean directly.
> Further prefer the units.h identifier to cover the full register when bits
> are set.
...
> - regval = intio ? 0xff : 0;
> -
> - ret = regmap_write(st->regmap, ADXL345_REG_INT_MAP, regval);
> + ret = regmap_assign_bits(st->regmap, ADXL345_REG_INT_MAP,
> + U8_MAX, intio);
I'm wondering if GENMASK() is actually better to point out to the amount and
exact bits in the bitfield? After all this is HW register we program, right?
> if (ret)
> return ret;
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists