All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: David Lechner <dlechner@baylibre.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
	"Antoniu Miclaus" <antoniu.miclaus@analog.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: dac: max5522: use devm_regulator_get_enable_read_voltage()
Date: Sun, 15 Feb 2026 09:53:08 +0200	[thread overview]
Message-ID: <aZF7ZCA2wQeD7iCs@smile.fi.intel.com> (raw)
In-Reply-To: <ea759fc8-6664-4838-872b-c393424e4cf4@baylibre.com>

On Sat, Feb 14, 2026 at 12:36:12PM -0600, David Lechner wrote:
> On 2/14/26 12:31 PM, Andy Shevchenko wrote:
> > On Sat, Feb 14, 2026 at 06:20:52PM +0000, Jonathan Cameron wrote:
> >> On Tue, 10 Feb 2026 21:35:26 +0200
> >> Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> >>> On Tue, Feb 10, 2026 at 07:51:27PM +0200, Antoniu Miclaus wrote:

...

> >>>> +	state->vref_mv = ret / 1000;  
> >>>
> >>> "1000" --> "(MICRO / MILLI)" ?
> >>> (yes, this way with the parentheses).
> >>
> >> I know I've argued against proliferation of the X_PER_Y macros
> >> but this one does seem to be very common. Maybe it's time to bring in
> >>
> >> MICROVOLTS_PER_MILLIVOLT even if it's longer than the open coded version?
> >>
> >> Andy, what do you think?  I do worry that people will see it as fine
> >> to add many many others if we start with this one though. So maybe not.
> > 
> > IIRC (sorry, if I am wrong) it was you who objected in the first place
> > and I proposed that from day 1 discussing the "(MICRO / MILLI)" approach
> > a year (?) or so ago. Answering to the Q: I am in favour of having that
> > definition.
> > 
> >> Anyhow, doesn't need to be in this series.
> > 
> > True.
> 
> How about MICRO_PER_MILLI? Then we won't have to add a new one
> for every different type of unit.

Dunno, as a physicist, I prefer the way with units.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-02-15  7:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-10 17:51 [PATCH] iio: dac: max5522: use devm_regulator_get_enable_read_voltage() Antoniu Miclaus
2026-02-10 19:35 ` Andy Shevchenko
2026-02-14 18:20   ` Jonathan Cameron
2026-02-14 18:31     ` Andy Shevchenko
2026-02-14 18:36       ` David Lechner
2026-02-15  7:53         ` Andy Shevchenko [this message]
2026-02-15 16:00           ` Jonathan Cameron

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=aZF7ZCA2wQeD7iCs@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=antoniu.miclaus@analog.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 \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.