From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Akshay Jindal <akshayaj.lkd@gmail.com>
Cc: anshulusr@gmail.com, jic23@kernel.org, dlechner@baylibre.com,
nuno.sa@analog.com, andy@kernel.org, shuah@kernel.org,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: light: ltr390: Add debugfs register access support
Date: Wed, 23 Jul 2025 17:08:21 +0300 [thread overview]
Message-ID: <aIDs1bvDRyerQHAK@smile.fi.intel.com> (raw)
In-Reply-To: <20250723114645.596648-1-akshayaj.lkd@gmail.com>
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
next prev parent reply other threads:[~2025-07-23 14:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-23 11:46 [PATCH] iio: light: ltr390: Add debugfs register access support Akshay Jindal
2025-07-23 14:08 ` Andy Shevchenko [this message]
2025-07-23 14:13 ` David Lechner
2025-07-23 15:46 ` Jonathan Cameron
2025-07-23 18:20 ` Akshay Jindal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aIDs1bvDRyerQHAK@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=akshayaj.lkd@gmail.com \
--cc=andy@kernel.org \
--cc=anshulusr@gmail.com \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox