From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Lothar Rubusch <l.rubusch@gmail.com>,
Andy Shevchenko <andriy.shevchenko@intel.com>,
lars@metafoo.de, Michael.Hennerich@analog.com,
dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
corbet@lwn.net, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
eraretuya@gmail.com
Subject: Re: [PATCH v10 4/7] iio: accel: adxl345: add inactivity feature
Date: Sun, 29 Jun 2025 17:28:15 +0100 [thread overview]
Message-ID: <20250629172815.47244e5d@jic23-huawei> (raw)
In-Reply-To: <CAHp75VfOKDZRoVWLQoPQPzpN2MceTeN_4OoU0RvxG7_J8OAoMw@mail.gmail.com>
On Sun, 29 Jun 2025 10:30:15 +0300
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> On Sun, Jun 29, 2025 at 12:11 AM Lothar Rubusch <l.rubusch@gmail.com> wrote:
> > On Sat, Jun 28, 2025 at 6:08 PM Jonathan Cameron <jic23@kernel.org> wrote:
>
> ...
>
> > > > > + axis_ctrl = ADXL345_INACT_X_EN | ADXL345_INACT_Y_EN |
> > > > > + ADXL345_INACT_Z_EN;
> > > >
> > > > Consider
> > > > axis_ctrl =
> > > > ADXL345_INACT_X_EN | ADXL345_INACT_Y_EN | ADXL345_INACT_Z_EN;
> > > >
> > > > (yes, I see that it's longer than 80, but it might worth doing it for the sake of
> > > > consistency with the previous suggestion).
> > > Hmm. I'd go longer rather than do that just because it looks really ugly.
> > >
> > > axis_ctrl = ADXL345_INACT_X_EN | ADXL345_INACT_Y_EN | ADXL345_INACT_Z_EN;
> > >
> > > I don't care that much as long as long lines are justified by readability. Here
> > > I think either Andy's suggestion or the all on one line are justified.
> > >
> > > Tomorrow I may have a different view :(
> > >
> >
> > As I’ve seen quite a bit of discussion around this. In fact, using
> > binary OR here might not even be necessary, since I can define
> > ADXL345_ACT_XYZ_EN and ADXL345_INACT_XYZ_EN directly and OR the fields
> > in the header. If you have no objections, I’ll likely prepare this
> > change for the next version.
>
> Actually I like your idea. This will be sustainable over style
> preference changes.
>
Agreed.
Jonathan
>
next prev parent reply other threads:[~2025-06-29 16:28 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-22 15:50 [PATCH v10 0/7] iio: accel: adxl345: add interrupt based sensor events Lothar Rubusch
2025-06-22 15:50 ` [PATCH v10 1/7] iio: accel: adxl345: simplify interrupt mapping Lothar Rubusch
2025-06-23 9:24 ` Andy Shevchenko
2025-06-22 15:50 ` [PATCH v10 2/7] iio: accel: adxl345: simplify reading the FIFO Lothar Rubusch
2025-06-22 15:50 ` [PATCH v10 3/7] iio: accel: adxl345: add activity event feature Lothar Rubusch
2025-06-23 9:34 ` Andy Shevchenko
2025-06-23 20:57 ` Lothar Rubusch
2025-06-24 7:28 ` Andy Shevchenko
2025-06-28 16:05 ` Jonathan Cameron
2025-06-22 15:50 ` [PATCH v10 4/7] iio: accel: adxl345: add inactivity feature Lothar Rubusch
2025-06-23 9:44 ` Andy Shevchenko
2025-06-23 21:06 ` Lothar Rubusch
2025-06-24 7:33 ` Andy Shevchenko
2025-06-24 8:27 ` Lothar Rubusch
2025-06-28 16:08 ` Jonathan Cameron
2025-06-28 21:10 ` Lothar Rubusch
2025-06-29 7:30 ` Andy Shevchenko
2025-06-29 16:28 ` Jonathan Cameron [this message]
2025-06-22 15:50 ` [PATCH v10 5/7] iio: accel: adxl345: add coupling detection for activity/inactivity Lothar Rubusch
2025-06-23 10:11 ` Andy Shevchenko
2025-06-22 15:50 ` [PATCH v10 6/7] iio: accel: adxl345: extend inactivity time for less than 1s Lothar Rubusch
2025-06-23 10:17 ` Andy Shevchenko
2025-06-23 21:21 ` Lothar Rubusch
2025-06-24 7:37 ` Andy Shevchenko
2025-06-24 8:18 ` Lothar Rubusch
2025-06-24 8:36 ` Andy Shevchenko
2025-06-22 15:50 ` [PATCH v10 7/7] docs: iio: add documentation for adxl345 driver Lothar Rubusch
2025-06-28 16:17 ` Jonathan Cameron
2025-06-23 9:45 ` [PATCH v10 0/7] iio: accel: adxl345: add interrupt based sensor events Andy Shevchenko
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=20250629172815.47244e5d@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=andriy.shevchenko@intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=andy@kernel.org \
--cc=corbet@lwn.net \
--cc=dlechner@baylibre.com \
--cc=eraretuya@gmail.com \
--cc=l.rubusch@gmail.com \
--cc=lars@metafoo.de \
--cc=linux-doc@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox