[PATCH v9 07/10] iio: accel: mma8452: Add comment block for struct mma8452_data
From: Esben Haabendal
Date: Wed Sep 16 2026 - 04:15:11 EST
The struct mma8452_data is central for this driver, and it makes sense to
have a description of the fields in it to make it easier to work with the
driver.
Reviewed-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>
Signed-off-by: Esben Haabendal <esben@xxxxxxxxxx>
---
drivers/iio/accel/mma8452.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
index b70bc8638128..223bef4f7baf 100644
--- a/drivers/iio/accel/mma8452.c
+++ b/drivers/iio/accel/mma8452.c
@@ -104,6 +104,21 @@
#define MMA8452_AUTO_SUSPEND_DELAY_MS 2000
+/**
+ * struct mma8452_data - IIO device private data structure
+ * @client: the I2C client object
+ * @lock: mutex for synchronziation of register
+ * read-modify-write sequences and holding chip in
+ * STANDBY mode while writing to registers
+ * @orientation: mounting matrix, flipped axis etc.
+ * @chip_info: chip specific data
+ * @regs: reference to voltage regulators
+ * @buffer: triggered buffer
+ * @sleep_val: time in ms to sleep while waiting for drdy
+ * @ctrl_reg1: CTRL_REG1 register shadow value
+ * @data_cfg: DATA_CFG register shadow value
+ * @open_drain: true for irq pin in open-drain mode
+ */
struct mma8452_data {
struct i2c_client *client;
struct mutex lock;
--
2.55.0