From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: Rodrigo Gobbi <rodrigo.gobbi.7@gmail.com>,
dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
~lkcamp/patches@lists.sr.ht, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] iio: adc: spear_adc: mask SPEAR_ADC_STATUS channel and avg sample before setting register
Date: Thu, 24 Jul 2025 13:47:58 +0100 [thread overview]
Message-ID: <20250724134758.43df3ccc@jic23-huawei> (raw)
In-Reply-To: <aIDoZHBjO4tU3Gkh@smile.fi.intel.com>
On Wed, 23 Jul 2025 16:49:24 +0300
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> On Thu, Jul 17, 2025 at 07:13:49PM -0300, Rodrigo Gobbi wrote:
> > avg sample info is a bit field coded inside the following
> > bits: 5,6,7 and 8 of a device status register.
> >
> > channel num info the same, but over bits: 1, 2 and 3.
> >
> > mask both values in order to avoid touching other register bits,
> > since the first info (avg sample), came from dt.
>
> Is there any issue with a Shift key?
Sprinkled some capitals.
>
> > Signed-off-by: Rodrigo Gobbi <rodrigo.gobbi.7@gmail.com>
>
> ...
>
> > #include <linux/clk.h>
> > #include <linux/err.h>
> > #include <linux/completion.h>
> > +#include <linux/bitfield.h>
>
> While it looks unordered, it's still better to squeeze a new header to the
> place which organises a longest (but sparse) group of ordered headers. This
> will reduce churn in the future for the ordering changes.
The full set is currently:
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/interrupt.h>
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/io.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/completion.h>
#include <linux/bitfield.h>
I'll move it to before clk, but that's only a really minor improvement!
>
> > #include <linux/iio/iio.h>
> > #include <linux/iio/sysfs.h>
>
next prev parent reply other threads:[~2025-07-24 12:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-17 22:13 [PATCH v3] iio: adc: spear_adc: mask SPEAR_ADC_STATUS channel and avg sample before setting register Rodrigo Gobbi
2025-07-17 22:49 ` David Lechner
2025-07-19 12:10 ` Jonathan Cameron
2025-07-23 13:49 ` Andy Shevchenko
2025-07-24 12:47 ` Jonathan Cameron [this message]
2025-07-28 0:45 ` Rodrigo Gobbi
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=20250724134758.43df3ccc@jic23-huawei \
--to=jic23@kernel.org \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=rodrigo.gobbi.7@gmail.com \
--cc=~lkcamp/patches@lists.sr.ht \
/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