From: David Brownell <david-b@pacbell.net>
To: Alessandro Zummo <azummo-lists@towertech.it>
Cc: jordan@cosmicpenguin.net, linux-geode@lists.infradead.org,
dilinger@queued.net, dsaxena@laptop.org,
"Martin-Éric Racine" <q-funk@iki.fi>,
lkml <linux-kernel@vger.kernel.org>,
rpurdie@rpsys.net, "Ingo Molnar" <mingo@elte.hu>,
"Thomas Gleixner" <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] AMD Geode CS5535/5536 GPIO driver
Date: Thu, 5 Feb 2009 16:12:20 -0800 [thread overview]
Message-ID: <200902051612.20475.david-b@pacbell.net> (raw)
In-Reply-To: <20090205161007.4d121cbf@i1501.lan.towertech.it>
On Thursday 05 February 2009, Alessandro Zummo wrote:
> --- linux-2.6.28.orig/arch/x86/Kconfig 2009-02-03 19:38:43.000000000 +0100
> +++ linux-2.6.28/arch/x86/Kconfig 2009-02-03 20:15:25.000000000 +0100
> @@ -1911,6 +1911,16 @@ config GEODE_MFGPT_TIMER
> MFGPTs have a better resolution and max interval than the
> generic PIT, and are suitable for use as high-res timers.
>
> +config GEODE_GPIO
> + bool "Geode GPIO support"
> + depends on MGEODE_LX && !CS5535_GPIO
and also GPIOLIB ... maybe can you just "select GPIOLIB".
> + default n
> + help
> +static int cs5535_direction_output(struct gpio_chip *chip, unsigned offset,
> + int value)
> +{
> + cs5535_gpio_set(chip, offset, value);
> +
> + geode_gpio_set(geode_gpio(offset), GPIO_OUTPUT_ENABLE);
> + geode_gpio_clear(geode_gpio(offset), GPIO_INPUT_ENABLE);
Unless this hardware misbehaves when both output and input
modes are enabled (e.g. in the window between those two calls),
I'd suggest just not clearing INPUT_ENABLE. It's legit to
ask for the *actual* value of an output line, e.g. for when
it uses open drain mode. (And didn't this hardware have an
option for open drain GPIO signaling?)
Otherwise this has about the right shape for platform GPIOs.
- Dave
next prev parent reply other threads:[~2009-02-06 0:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-05 15:10 [PATCH] AMD Geode CS5535/5536 GPIO driver Alessandro Zummo
2009-02-06 0:12 ` David Brownell [this message]
2009-02-06 9:16 ` Alessandro Zummo
2009-02-15 22:47 ` Jordan Crouse
2009-02-14 20:27 ` Andres Salomon
2009-02-14 22:02 ` Alessandro Zummo
2009-02-14 22:38 ` Andres Salomon
2009-02-14 22:54 ` Alessandro Zummo
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=200902051612.20475.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=azummo-lists@towertech.it \
--cc=dilinger@queued.net \
--cc=dsaxena@laptop.org \
--cc=hpa@zytor.com \
--cc=jordan@cosmicpenguin.net \
--cc=linux-geode@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=q-funk@iki.fi \
--cc=rpurdie@rpsys.net \
--cc=tglx@linutronix.de \
/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