[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aIDs1bvDRyerQHAK@smile.fi.intel.com>
Date: Wed, 23 Jul 2025 17:08:21 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Akshay Jindal <akshayaj.lkd@...il.com>
Cc: anshulusr@...il.com, jic23@...nel.org, dlechner@...libre.com,
nuno.sa@...log.com, andy@...nel.org, shuah@...nel.org,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iio: light: ltr390: Add debugfs register access support
On Wed, Jul 23, 2025 at 05:16:38PM +0530, Akshay Jindal wrote:
> Add support for debugfs_reg_access through the driver's iio_info structure
> to enable low-level register read/write access for debugging.
...
> -#define LTR390_ALS_DATA 0x0D
To avoid churn, I prefer this to stay.
> +#define LTR390_ALS_DATA_0 0x0D
> +#define LTR390_ALS_DATA_1 0x0E
> +#define LTR390_ALS_DATA_2 0x0F
Instead you can add a macro
#define LTR390_ALS_DATAx(x) (0x0D + (x))
Same for other cases like this.
...
> + ret = regmap_read(data->regmap, reg, readval);
> + if (ret < 0)
> + return ret;
> +
> + return 0;
return regmap_read(...);
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists