From: "Uwe Kleine-König" <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>,
Wim Van Sebroeck <wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Alexander Shiyan <shc_work-JGs/UdohzUI@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
Mike Looijmans <mike.looijmans-Oq418RWZeHk@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Subject: Re: [RFC] improve binding for linux,wdt-gpio
Date: Thu, 30 Jul 2015 23:30:39 +0200 [thread overview]
Message-ID: <20150730213039.GR15360@pengutronix.de> (raw)
In-Reply-To: <1438115628-2819-1-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Hello,
while hacking on the gpio driver I found yet another ambiguity:
On Tue, Jul 28, 2015 at 10:33:48PM +0200, Uwe Kleine-König wrote:
> - - level: Low or high level starts counting WDT timeout,
> - the opposite level disables the WDT. Active level is determined
> - by the GPIO flags.
The driver as is does the following when
gpio = <&gpiocontroler 5 GPIO_ACTIVE_LOW>
is specified in the device tree:
priv->active_low = flags & OF_GPIO_ACTIVE_LOW;
So active_low is 1 for us with the above device tree snippet.
Then in the disable callback the driver does:
gpio_set_value_cansleep(priv->gpio, !priv->active_low);
so the gpio is set to 0 to disable the chip. I would have expected it
the other way round! (Is this only me?) So the documentation should
point that out that the active level of the GPIO is supposed to disable the
chip.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2015-07-30 21:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-28 20:33 [RFC] improve binding for linux,wdt-gpio Uwe Kleine-König
[not found] ` <1438115628-2819-1-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-07-28 21:21 ` Guenter Roeck
[not found] ` <20150728212155.GA18137-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2015-07-29 7:35 ` Uwe Kleine-König
[not found] ` <20150729073513.GB15360-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-07-29 15:49 ` Guenter Roeck
[not found] ` <55B8F603.4000003-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2015-07-30 6:59 ` Uwe Kleine-König
[not found] ` <20150730065951.GI15360-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-07-30 7:25 ` Guenter Roeck
[not found] ` <55B9D153.5080202-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2015-07-30 7:33 ` Uwe Kleine-König
2015-07-30 6:15 ` Mike Looijmans
[not found] ` <55B9C102.50608-Oq418RWZeHk@public.gmane.org>
2015-07-30 7:25 ` Uwe Kleine-König
2015-07-30 21:30 ` Uwe Kleine-König [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=20150730213039.GR15360@pengutronix.de \
--to=u.kleine-koenig-bicnvbalz9megne8c9+irq@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=mike.looijmans-Oq418RWZeHk@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=shc_work-JGs/UdohzUI@public.gmane.org \
--cc=wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.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;
as well as URLs for NNTP newsgroup(s).