[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250201163559.015b343d@jic23-huawei>
Date: Sat, 1 Feb 2025 16:35:59 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Lothar Rubusch <l.rubusch@...il.com>
Cc: lars@...afoo.de, Michael.Hennerich@...log.com,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
eraretuya@...il.com
Subject: Re: [PATCH v1 01/12] iio: accel: adxl345: migrate constants to core
On Tue, 28 Jan 2025 12:00:49 +0000
Lothar Rubusch <l.rubusch@...il.com> 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@...il.com>
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))
Powered by blists - more mailing lists