Re: [PATCH v1 01/12] iio: accel: adxl345: migrate constants to core

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

 



On Tue, 28 Jan 2025 12:00:49 +0000
Lothar Rubusch <l.rubusch@xxxxxxxxx> wrote:

> The set of constants does not need to be exposed. Move constants to core
> to reduce namespace polution.
> 
> Signed-off-by: Lothar Rubusch <l.rubusch@xxxxxxxxx>
Hi Lothar,


> -#define ADXL345_REG_INT_MAP		0x2F
> -#define ADXL345_REG_INT_SOURCE		0x30
> -#define ADXL345_REG_INT_SOURCE_MSK	0xFF
>  #define ADXL345_REG_DATA_FORMAT		0x31

Normally I'd be entirely in favour of this, but...
I'm not sure we want to leave one random register here
and move the rest.

Se can move the stuff that isn't register related, but
for the registers I'd prefer to keep them in one place
and I can't see a clean way to move them all to the core.c
file. Even separating reg address and fields within it
makes for a harder check against a datasheet etc.

So I think all we can move is the fifo size :(


> -#define ADXL345_REG_XYZ_BASE		0x32
> -#define ADXL345_REG_DATA_AXIS(index)				\
> -	(ADXL345_REG_XYZ_BASE + (index) * sizeof(__le16))





[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