On 9/23/25 1:49 PM, Laurent Pinchart wrote:

Hello Laurent,

[...]

+#define VCLKSET_BPP_MASK               (3 << 2)
+#define VCLKSET_BPP_16                 0
+#define VCLKSET_BPP_18                 1
+#define VCLKSET_BPP_18L                        2
+#define VCLKSET_BPP_24                 3

If you'd rather get rid of the shifts, why not

#define VCLKSET_BPP_16                  FIELD_PREP(VCLKSET_BPP_MASK, 0)
#define VCLKSET_BPP_18                  FIELD_PREP(VCLKSET_BPP_MASK, 1)
#define VCLKSET_BPP_18L                 FIELD_PREP(VCLKSET_BPP_MASK, 2)
#define VCLKSET_BPP_24                  FIELD_PREP(VCLKSET_BPP_MASK, 3)

without touching the users ? Personally I'd keep the shifts though.
I'll opt for the former option then . It fits with the GENMASK() macros.

Reply via email to