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

On Thu, 30 Apr 2015 16:27:49 +0200
Bastien Nocera <hadess@hadess.net> wrote:

> On Thu, 2015-04-30 at 16:25 +0200, Antonio Ospite wrote:
> > It was mainly to prevent error messages being printed in the logs 
> > when
> > trying to getting a gpio descriptor, is that correct Bastien?
> 
> Actually, to prevent it failing to init the driver altogether.

Then I am afraid I am failing to follow the code (4.1-rc1), from what
I read:

  - is_smo8500_device is only used in kxcjk1013_gpio_probe() to make it
    return -ENOTSUPP; i.e. client->irq = -ENOTSUPP;

  - when client->irq < 0 (even after kxcjk1013_gpio_probe), the driver
    does not request an interrupt  and does not set up triggers but it
    can still finish initialization.

So it looks to me that is_smo8500_device just prevents
devm_gpiod_get_index() from being called, but even if it was called it
(or gpiod_to_irq) should return an error.

Mmh, maybe the problem is "just" in checking the return value of
devm_gpiod_get_index() in kxcjk1013_gpio_probe(), maybe it's NULL in
your case and that was causing your original problem; BTW if it is NULL
then desc_to_gpio() in the debug print will Oops after commit b457f5.

I'll double check and get back to you.

Ciao,
   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?

  parent reply	other threads:[~2015-04-30 15:15 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
2015-04-30 14:27       ` Bastien Nocera
2015-04-30 15:05         ` Daniel Baluta
2015-04-30 15:15         ` Antonio Ospite [this message]
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=20150430171551.02627d4ea8b22126c8a0f2be@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