[PATCH v5 5/5] iio: proximity: rfd77402: Document device private data structure

Shrikant Raskar via B4 Relay posted 5 patches 3 weeks, 4 days ago
There is a newer version of this series
[PATCH v5 5/5] iio: proximity: rfd77402: Document device private data structure
Posted by Shrikant Raskar via B4 Relay 3 weeks, 4 days ago
From: Shrikant Raskar <raskar.shree97@gmail.com>

Add kernel-doc style comments for struct rfd77402_data to describe
the purpose of each member.

Signed-off-by: Shrikant Raskar <raskar.shree97@gmail.com>
---
 drivers/iio/proximity/rfd77402.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/proximity/rfd77402.c b/drivers/iio/proximity/rfd77402.c
index 43ace2beef7e..e6a499cfb232 100644
--- a/drivers/iio/proximity/rfd77402.c
+++ b/drivers/iio/proximity/rfd77402.c
@@ -86,9 +86,15 @@ static const struct {
 	{RFD77402_HFCFG_3,	0x45d4},
 };
 
+/*
+ * struct rfd77402_data - device-specific data for the RFD77402 sensor
+ * @client: I2C client handle
+ * @lock: mutex to serialize sensor reads
+ * @completion: completion used for interrupt-driven measurements
+ * @irq_en: indicates whether interrupt mode is enabled
+ */
 struct rfd77402_data {
 	struct i2c_client *client;
-	/* Serialize reads from the sensor */
 	struct mutex lock;
 	struct completion completion;
 	bool irq_en;

-- 
2.43.0
Re: [PATCH v5 5/5] iio: proximity: rfd77402: Document device private data structure
Posted by Andy Shevchenko 3 weeks, 4 days ago
On Thu, Jan 15, 2026 at 01:57:41PM +0530, Shrikant Raskar via B4 Relay wrote:

> Add kernel-doc style comments for struct rfd77402_data to describe
> the purpose of each member.

It's not a kernel-doc.

...

> +/*

This marker is of the regular comment.

> + * struct rfd77402_data - device-specific data for the RFD77402 sensor
> + * @client: I2C client handle
> + * @lock: mutex to serialize sensor reads
> + * @completion: completion used for interrupt-driven measurements
> + * @irq_en: indicates whether interrupt mode is enabled
> + */

It should be done before the patch that adds new members to the data structure.

-- 
With Best Regards,
Andy Shevchenko