Re: [PATCH v2 2/5] iio: light: si1133: remove unused macros
From: Joshua Crofts
Date: Tue Apr 28 2026 - 12:33:24 EST
On Tue, 28 Apr 2026 at 17:12, Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
> Don't update macros then remove them - that's just increasing
> noise in the update patch. Reorder this patch to be before patch 1.
Yeah, my fault, I forgot to do a rebase.
> > #define SI1133_REG_PART_ID 0x00
> > #define SI1133_REG_REV_ID 0x01
> > #define SI1133_REG_MFR_ID 0x02
> > -#define SI1133_REG_INFO0 0x03
> > -#define SI1133_REG_INFO1 0x04
>
> This one isn't in the category of things Andy was referring to.
> It's a hardware register address definition. We don't have hard rules on whether
> a complete set of these should be defined, or just the ones used but it is definitely
> acceptable to just define them all up front as then easy to check them against
> a datasheet.
>
> >
> > #define SI1133_PART_ID 0x33
> >
> > @@ -40,7 +38,6 @@
> > #define SI1133_CMD_RESET_CTR 0x00
> > #define SI1133_CMD_RESET_SW 0x01
> > #define SI1133_CMD_FORCE 0x11
> > -#define SI1133_CMD_START_AUTONOMOUS 0x13
> Similar for this.
>
> > #define SI1133_CMD_PARAM_SET 0x80
> > #define SI1133_CMD_PARAM_QUERY 0x40
> > #define SI1133_CMD_PARAM_MASK 0x3F
> > @@ -86,13 +83,9 @@
> > #define SI1133_CMD_MINSLEEP_US_LOW 5000
> > #define SI1133_CMD_MINSLEEP_US_HIGH 7500
> > #define SI1133_CMD_TIMEOUT_MS 25
> > -#define SI1133_CMD_LUX_TIMEOUT_MS 5000
> > -#define SI1133_CMD_TIMEOUT_US (SI1133_CMD_TIMEOUT_MS * 1000)
>
> Dropping these and the one below is good as those aren't register or command
> defines. This last one is entirely pointless as better to have the rescale
> inline and only one definition up here.
Sure, I'll send a v2 tomorrow.
--
Kind regards
CJD