mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: "Francesco Lavra" <flavra@baylibre.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.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 v2 3/3] iio: imu: st_lsm6dsx: Add support for rotation sensor
Date: Thu, 15 Jan 2026 15:58:36 +0200	[thread overview]
Message-ID: <aWjyjLnNE-K0AyUi@smile.fi.intel.com> (raw)
In-Reply-To: <aWjw7_poJUIh9HgI@lore-desk>

On Thu, Jan 15, 2026 at 02:51:43PM +0100, Lorenzo Bianconi wrote:
> On Jan 15, Andy Shevchenko wrote:
> > On Thu, Jan 15, 2026 at 02:32:11PM +0100, Lorenzo Bianconi wrote:

...

> > > > +	settings = &sensor->hw->settings->sf_settings;
> > > > +	switch (mask) {
> > > > +	case IIO_CHAN_INFO_SAMP_FREQ: {
> > > > +		u32 odr_mHz;
> > > > +		u8 odr_val;
> > > > +
> > > > +		odr_mHz = val * MILLI + val2 * MILLI / MICRO;
> > > > +		err = st_lsm6dsx_sf_get_odr_val(settings, odr_mHz, &odr_val);
> > > > +		if (err)
> > > > +			return err;
> > > > +
> > > > +		sensor->hwfifo_odr_mHz = odr_mHz;
> > > > +		return 0;
> > > 
> > > break;
> > > 
> > > > +	}
> > > > +	default:
> > > > +		return -EINVAL;
> > > 
> > > break;
> > > 
> > > > +	}
> > > 
> > > return err;
> > 
> > Why?
> 
> I guess it is more clear, but just a Nit, I can live with the current implementation.

At least what you proposed is the opposite to the style that is accepted
in IIO.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-01-15 13:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-15 12:24 [PATCH v2 0/3] " Francesco Lavra
2026-01-15 12:24 ` [PATCH v2 1/3] iio: imu: st_lsm6dsx: Set FIFO ODR for accelerometer and gyroscope only Francesco Lavra
2026-01-15 13:13   ` Lorenzo Bianconi
2026-01-16 19:47     ` Jonathan Cameron
2026-01-19  9:06       ` Francesco Lavra
2026-01-15 12:24 ` [PATCH v2 2/3] iio: imu: st_lsm6dsx: Set buffer sampling frequency for accelerometer only Francesco Lavra
2026-01-15 13:18   ` Lorenzo Bianconi
2026-01-16 19:49   ` Jonathan Cameron
2026-01-15 12:24 ` [PATCH v2 3/3] iio: imu: st_lsm6dsx: Add support for rotation sensor Francesco Lavra
2026-01-15 13:32   ` Lorenzo Bianconi
2026-01-15 13:49     ` Andy Shevchenko
2026-01-15 13:51       ` Lorenzo Bianconi
2026-01-15 13:58         ` Andy Shevchenko [this message]
2026-01-16 19:53           ` Jonathan Cameron
2026-01-16 20:04   ` 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=aWjyjLnNE-K0AyUi@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=flavra@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lorenzo@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®