[PATCH v2 1/7] iio: pressure: dps310: sort register field defines high to low

From: Rupesh Majhi

Date: Thu Nov 26 2026 - 07:13:46 EST


Some field defines run from the high bit down, others from the low bit
up. Sort them all high to low, as the datasheet lists them.

Suggested-by: David Lechner <dlechner@xxxxxxxxxxxx>
Signed-off-by: Rupesh Majhi <zoone.rupert@xxxxxxxxx>
---
v2:
- sort high to low instead of low to high, fewer lines move and it is
the datasheet order (Andy)

drivers/iio/pressure/dps310.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/iio/pressure/dps310.c b/drivers/iio/pressure/dps310.c
index 9ffef150cc4c..ce83bd3691af 100644
--- a/drivers/iio/pressure/dps310.c
+++ b/drivers/iio/pressure/dps310.c
@@ -54,20 +54,20 @@
#define DPS310_PRS_RATE_BITS GENMASK(6, 4)
#define DPS310_PRS_PRC_BITS GENMASK(3, 0)
#define DPS310_TMP_CFG 0x07
+#define DPS310_TMP_EXT BIT(7)
#define DPS310_TMP_RATE_BITS GENMASK(6, 4)
#define DPS310_TMP_RATE_1SPS 0
#define DPS310_TMP_PRC_BITS GENMASK(3, 0)
#define DPS310_TMP_PRC_1 0
-#define DPS310_TMP_EXT BIT(7)
#define DPS310_MEAS_CFG 0x08
+#define DPS310_COEF_RDY BIT(7)
+#define DPS310_SENSOR_RDY BIT(6)
+#define DPS310_TMP_RDY BIT(5)
+#define DPS310_PRS_RDY BIT(4)
#define DPS310_MEAS_CTRL_BITS GENMASK(2, 0)
-#define DPS310_PRS_EN BIT(0)
-#define DPS310_TEMP_EN BIT(1)
#define DPS310_BACKGROUND BIT(2)
-#define DPS310_PRS_RDY BIT(4)
-#define DPS310_TMP_RDY BIT(5)
-#define DPS310_SENSOR_RDY BIT(6)
-#define DPS310_COEF_RDY BIT(7)
+#define DPS310_TEMP_EN BIT(1)
+#define DPS310_PRS_EN BIT(0)
#define DPS310_CFG_REG 0x09
#define DPS310_INT_HL BIT(7)
#define DPS310_INT_TMP BIT(5)
--
2.43.0