public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Harald Geyer <harald@ccbib.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	Javier Martinez Canillas <javier.martinez@collabora.co.uk>,
	Alexandre Courbot <acourbot@nvidia.com>,
	Stephen Warren <swarren@nvidia.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald <pmeerw@pmeerw.net>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: iio: dht11 broken
Date: Mon, 01 Dec 2014 15:18:39 +0100	[thread overview]
Message-ID: <547C78BF.3030709@nod.at> (raw)
In-Reply-To: <CACRpkdbSUJMF_1_8aZ+ECHAT+ztsa4jXuSFo_+V9gr1MzsNCcg@mail.gmail.com>

Am 01.12.2014 um 15:08 schrieb Linus Walleij:
> On Mon, Dec 1, 2014 at 11:59 AM, Richard Weinberger <richard@nod.at> wrote:
>> Am 01.12.2014 um 11:49 schrieb Harald Geyer:
> 
>>> Any input from gpiolib people about what the proper fix would be in
>>> their opinion, of course is appreciated. I don't think the dht11 driver
>>> is doing anything unreasonable per se, so maybe they can clarify how
>>> the API is intended to be used?
>>
>> Your driver sets up a GPIO as IRQ and then you switch the mode to output
>> to enable the DHT sensor.
>> This is not an API issue, it is an design issue.
>> I'm not a hardware expert but AFAIK setting an IRQ pin into output mode can
>> lead to undefined behavior.
> 
> Well that check is there exactly to prevent madness like this.
> 
> IRQs on pins set to output *does* *not* *make* *sense*.
> 
> Remove the IRQ before setting the pin to output and vice
> versa and everyone will be happier.

Thanks for the confirmation.
I'll cook up a patch.

Thanks,
//richard

      reply	other threads:[~2014-12-01 14:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-30 16:23 iio: dht11 broken Richard Weinberger
2014-12-01 10:49 ` Harald Geyer
2014-12-01 10:59   ` Richard Weinberger
2014-12-01 14:08     ` Linus Walleij
2014-12-01 14:18       ` Richard Weinberger [this message]

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=547C78BF.3030709@nod.at \
    --to=richard@nod.at \
    --cc=acourbot@nvidia.com \
    --cc=harald@ccbib.org \
    --cc=javier.martinez@collabora.co.uk \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --cc=swarren@nvidia.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