Re: [PATCH v4 10/14] iio: accel: adxl345: add g-range configuration

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

 



On Thu, 13 Mar 2025 16:50:45 +0000
Lothar Rubusch <l.rubusch@xxxxxxxxx> wrote:

> Introduce means to configure and work with the available g-ranges
> keeping the precision of 13 digits.
> 
> This is in preparation for the activity/inactivity feature.

As with previous. This seems to be a separate feature to me and
that comment raises questions that we don't need to raise so
just drop it.

> 
> Signed-off-by: Lothar Rubusch <l.rubusch@xxxxxxxxx>


> +
> +static int adxl345_set_range(struct adxl345_state *st, enum adxl345_range range)
> +{
> +	int ret;
> +
> +	ret = regmap_update_bits(st->regmap, ADXL345_REG_DATA_FORMAT,
> +				 ADXL345_DATA_FORMAT_RANGE,
> +				 FIELD_PREP(ADXL345_DATA_FORMAT_RANGE, range));
> +	if (ret)
> +		return ret;

return regmap_update_bits() unless there is more coming here in later patches.

> +
> +	return 0;
> +}




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux