Thread (18 messages) 18 messages, 4 authors, 2021-08-16

Re: [PATCH v5 1/5] iio: adc: ad7949: define and use bitfield names

From: Liam Beguin <hidden>
Date: 2021-08-08 22:47:00
Also in: linux-iio, lkml

On Sun Aug 8, 2021 at 12:51 PM EDT, Joe Perches wrote:
On Sat, 2021-08-07 at 21:56 -0400, Liam Beguin wrote:
quoted
Replace raw configuration register values by using FIELD_PREP and
defines to improve readability.
[]
quoted
diff --git a/drivers/iio/adc/ad7949.c b/drivers/iio/adc/ad7949.c
[]
+#define AD7949_CFG_BIT_INCC GENMASK(12, 10)
Hi Joe,
I think the naming is a bit confusing as it appears as if
these bitfield ranges are single bits.
That makes sense.
Would AD7949_CFG_BITS_* be good enough?

Thanks,
Liam
quoted
+/* REF: reference/buffer selection */
+#define AD7949_CFG_BIT_REF		GENMASK(5, 3)
[]
quoted
+/* SEQ: channel sequencer. Allows for scanning channels */
+#define AD7949_CFG_BIT_SEQ		GENMASK(2, 1)
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help