Re: [PATCH v9 04/11] iio: accel: adxl345: simplify interrupt mapping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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






[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux