From: Vincent Donnefort <vdonnefort@gmail.com>
To: linux-gpio@vger.kernel.org
Cc: linus.walleij@linaro.org, sameo@linux.intel.com,
asierra@xes-inc.com, lee.jones@linaro.org,
Vincent Donnefort <vdonnefort@gmail.com>
Subject: [RESEND 3/6] gpio: ich: Add blink capability option
Date: Fri, 14 Feb 2014 15:01:55 +0100 [thread overview]
Message-ID: <1392386518-11025-4-git-send-email-vdonnefort@gmail.com> (raw)
In-Reply-To: <1392386518-11025-1-git-send-email-vdonnefort@gmail.com>
This patch allows gpio_ich driver to be aware of non blink capable chipsets.
Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
---
drivers/gpio/gpio-ich.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-ich.c b/drivers/gpio/gpio-ich.c
index f5bf3c3..82887c5 100644
--- a/drivers/gpio/gpio-ich.c
+++ b/drivers/gpio/gpio-ich.c
@@ -62,6 +62,9 @@ struct ichx_desc {
/* Max GPIO pins the chipset can have */
uint ngpio;
+ /* GPO_BLINK is available on this chipset */
+ bool have_blink;
+
/* Whether the chipset has GPIO in GPE0_STS in the PM IO region */
bool uses_gpe0;
@@ -151,7 +154,7 @@ static int ichx_gpio_direction_output(struct gpio_chip *gpio, unsigned nr,
int val)
{
/* Disable blink hardware which is available for GPIOs from 0 to 31. */
- if (nr < 32)
+ if (nr < 32 && ichx_priv.desc->have_blink)
ichx_write_bit(GPO_BLINK, nr, 0, 0);
/* Set GPIO output value. */
@@ -266,6 +269,7 @@ static struct ichx_desc ich6_desc = {
.uses_gpe0 = true,
.ngpio = 50,
+ .have_blink = true,
};
/* Intel 3100 */
@@ -290,19 +294,23 @@ static struct ichx_desc i3100_desc = {
/* ICH7 and ICH8-based */
static struct ichx_desc ich7_desc = {
.ngpio = 50,
+ .have_blink = true,
};
/* ICH9-based */
static struct ichx_desc ich9_desc = {
.ngpio = 61,
+ .have_blink = true,
};
/* ICH10-based - Consumer/corporate versions have different amount of GPIO */
static struct ichx_desc ich10_cons_desc = {
.ngpio = 61,
+ .have_blink = true,
};
static struct ichx_desc ich10_corp_desc = {
.ngpio = 72,
+ .have_blink = true,
};
/* Intel 5 series, 6 series, 3400 series, and C200 series */
--
1.8.3.2
next prev parent reply other threads:[~2014-02-14 14:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-14 14:01 [RESEND 0/6] Intel Atom C2000 series GPIO support Vincent Donnefort
2014-02-14 14:01 ` [RESEND 1/6] mfd: lpc_ich: Convert ICH GPIOs IDs to enum Vincent Donnefort
2014-02-24 13:37 ` Linus Walleij
2014-02-24 15:40 ` Lee Jones
2014-02-25 9:35 ` Linus Walleij
2014-02-14 14:01 ` [RESEND 2/6] mfd: lpc_ich: Add support for Intel Avoton GPIOs Vincent Donnefort
2014-02-14 14:01 ` Vincent Donnefort [this message]
2014-02-14 14:01 ` [RESEND 4/6] gpio: ich: Add support for multiple register addresses Vincent Donnefort
2014-02-14 14:01 ` [RESEND 5/6] gpio: ich: Add output levels cache support Vincent Donnefort
2014-02-14 14:01 ` [RESEND 6/6] gpio: ich: Add support for Intel Avoton Vincent Donnefort
2014-02-14 14:27 ` [RESEND 0/6] Intel Atom C2000 series GPIO support Lee Jones
2014-02-24 13:39 ` Linus Walleij
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=1392386518-11025-4-git-send-email-vdonnefort@gmail.com \
--to=vdonnefort@gmail.com \
--cc=asierra@xes-inc.com \
--cc=lee.jones@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=sameo@linux.intel.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;
as well as URLs for NNTP newsgroup(s).