public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Antonio Ospite <ao2@ao2.it>
To: Daniel Baluta <daniel.baluta@gmail.com>
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	Jonathan Cameron <jic23@kernel.org>,
	Bastien Nocera <hadess@hadess.net>
Subject: Re: [PATCH 2/3] iio: accel: kxcjk-1013: rename is_smo8500_device to polling_mode
Date: Thu, 30 Apr 2015 16:25:52 +0200	[thread overview]
Message-ID: <20150430162552.f42e3caa42a44a7e04204d8e@ao2.it> (raw)
In-Reply-To: <CAEnQRZANgZM8in1WS_22Lcpf2oG_8aLO80p__=6CFJBbW2rHKA@mail.gmail.com>

On Wed, 29 Apr 2015 18:08:41 +0300
Daniel Baluta <daniel.baluta@gmail.com> wrote:

> On Wed, Apr 29, 2015 at 12:01 PM, Antonio Ospite <ao2@ao2.it> wrote:
> > The purpose of the variable is to remember when an interrupt cannot be
> > requested and hence the driver must work in polling mode, so tell that
> > instead of mentioning the specific case when this is needed.
> >
> > This makes the variable name to be still meaningful when some other
> > devices requiring this show up.
> >
> > Signed-off-by: Antonio Ospite <ao2@ao2.it>
> > Cc: Jonathan Cameron <jic23@kernel.org>
> > Cc: Bastien Nocera <hadess@hadess.net>
> > Cc: linux-iio@vger.kernel.org
> > ---
> >  drivers/iio/accel/kxcjk-1013.c | 10 +++++-----
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c
> > index 5b7a860..eccec0e 100644
> > --- a/drivers/iio/accel/kxcjk-1013.c
> > +++ b/drivers/iio/accel/kxcjk-1013.c
> > @@ -108,7 +108,7 @@ struct kxcjk1013_data {
> >         bool motion_trigger_on;
> >         int64_t timestamp;
> >         enum kx_chipset chipset;
> > -       bool is_smo8500_device;
> > +       bool polling_mode;
> 
> I would prefer to call this field use_poll, as introduced in:
>
> http://marc.info/?l=linux-iio&m=142980650422289&w=2
>

Looking at it again I realize that the current meaning  of
is_smo8500_device is more like "gpio interrupt not available" rather
than an explicit indication to use polling mode, which right now is a
userspace thing anyway.

It was mainly to prevent error messages being printed in the logs when
trying to getting a gpio descriptor, is that correct Bastien?

> Also use_poll its it's a better suggestion on the type than polling_mode.
> 

Agreed, polling_mode was not the best name.

How about we drop this patch 2/3 altogether for now and I just resend 1
and 3?

Renaming (or even removing) is_smo8500_device can be re-evaluated when
use_poll gets added.

Thanks,
   Antonio

-- 
Antonio Ospite
http://ao2.it

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?

  reply	other threads:[~2015-04-30 14:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-29  9:01 [PATCH 0/3] iio: accel: kxcjk-1013: new ACPI id and misc cleanups Antonio Ospite
2015-04-29  9:01 ` [PATCH 1/3] iio: accel: kxcjk-1013: add the "KXCJ9000" ACPI id Antonio Ospite
2015-04-29 10:28   ` Bastien Nocera
2015-04-29 11:01     ` Antonio Ospite
2015-04-29 15:11       ` Daniel Baluta
2015-05-07 23:02         ` Jonathan Cameron
2015-05-07 23:03         ` Jonathan Cameron
2015-04-29  9:01 ` [PATCH 2/3] iio: accel: kxcjk-1013: rename is_smo8500_device to polling_mode Antonio Ospite
2015-04-29 10:27   ` Bastien Nocera
2015-04-29 15:08   ` Daniel Baluta
2015-04-30 14:25     ` Antonio Ospite [this message]
2015-04-30 14:27       ` Bastien Nocera
2015-04-30 15:05         ` Daniel Baluta
2015-04-30 15:15         ` Antonio Ospite
2015-04-29  9:01 ` [PATCH 3/3] iio: accel: kxcjk-1013: add some blank lines for readability Antonio Ospite

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=20150430162552.f42e3caa42a44a7e04204d8e@ao2.it \
    --to=ao2@ao2.it \
    --cc=daniel.baluta@gmail.com \
    --cc=hadess@hadess.net \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.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