On 9/23/25 4:16 PM, Laurent Pinchart wrote:
Hello Laurent,
[...]
#define CLOCKSET1 0x101c
-#define CLOCKSET1_LOCK_PHY (1 << 17)
-#define CLOCKSET1_CLKSEL (1 << 8)
-#define CLOCKSET1_CLKINSEL_MASK (3 << 2)
+#define CLOCKSET1_LOCK_PHY BIT(17)
+#define CLOCKSET1_CLKSEL BIT(8)
This is a two bits field.
Fixed in v2 2/10 .
+#define CLOCKSET1_CLKINSEL_MASK GENMASK(3, 2)
#define CLOCKSET1_CLKINSEL_EXTAL 0
#define CLOCKSET1_CLKINSEL_DIG 1
#define CLOCKSET1_CLKINSEL_DU 2
-#define CLOCKSET1_SHADOW_CLEAR (1 << 1)
-#define CLOCKSET1_UPDATEPLL (1 << 0)
+#define CLOCKSET1_SHADOW_CLEAR BIT(1)
+#define CLOCKSET1_UPDATEPLL BIT(0)
#define CLOCKSET2 0x1020
#define CLOCKSET2_M(x) (((x) & 0xfff) << 16)
@@ -281,15 +281,15 @@
#define CLOCKSET3_GMP_CNTRL(x) (((x) & 0x3) << 0)
#define PHTW 0x1034
-#define PHTW_DWEN (1 << 24)
+#define PHTW_DWEN BIT(24)
#define PHTW_TESTDIN_DATA(x) (((x) & 0xff) << 16)
-#define PHTW_CWEN (1 << 8)
+#define PHTW_CWEN BIT(8)
#define PHTW_TESTDIN_CODE(x) (((x) & 0xff) << 0)
#define PHTR 0x1038
-#define PHTR_TEST (1 << 16)
+#define PHTR_TEST BIT(16)
And this is a 8 bits field.
I'll fix this in v3, once I get further feedback on V2, I missed this one.