mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Tyser <ptyser@xes-inc.com>
To: linux-kernel@vger.kernel.org
Cc: Peter Tyser <ptyser@xes-inc.com>,
	Guenter Roeck <linux@roeck-us.net>,
	James Ralston <james.d.ralston@intel.com>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Lee Jones <lee.jones@linaro.org>
Subject: [PATCH 2/8] mfd: lpc_ich: Only configure watchdog or GPIO when present
Date: Mon, 10 Mar 2014 16:34:52 -0500	[thread overview]
Message-ID: <1394487298-14459-2-git-send-email-ptyser@xes-inc.com> (raw)
In-Reply-To: <1394487298-14459-1-git-send-email-ptyser@xes-inc.com>

Some chipsets don't currently have GPIO support enabled.  For these
chipsets don't go through the process of initializing the GPIO region.

Make the same change for the watchdog initialization for chipsets which
may not enable the WDT in the future.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: James Ralston <james.d.ralston@intel.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
---
 drivers/mfd/lpc_ich.c |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/mfd/lpc_ich.c b/drivers/mfd/lpc_ich.c
index be10ad4..e247e7e 100644
--- a/drivers/mfd/lpc_ich.c
+++ b/drivers/mfd/lpc_ich.c
@@ -967,13 +967,17 @@ static int lpc_ich_probe(struct pci_dev *dev,
 
 	pci_set_drvdata(dev, priv);
 
-	ret = lpc_ich_init_wdt(dev);
-	if (!ret)
-		cell_added = true;
+	if (lpc_chipset_info[priv->chipset].iTCO_version) {
+		ret = lpc_ich_init_wdt(dev);
+		if (!ret)
+			cell_added = true;
+	}
 
-	ret = lpc_ich_init_gpio(dev);
-	if (!ret)
-		cell_added = true;
+	if (lpc_chipset_info[priv->chipset].gpio_version) {
+		ret = lpc_ich_init_gpio(dev);
+		if (!ret)
+			cell_added = true;
+	}
 
 	/*
 	 * We only care if at least one or none of the cells registered
-- 
1.7.7.GIT


  reply	other threads:[~2014-03-10 21:35 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-10 21:34 [PATCH 1/8] mfd: lpc_ich: Fix ACPI enable bitmask Peter Tyser
2014-03-10 21:34 ` Peter Tyser [this message]
2014-03-11  0:59   ` [PATCH 2/8] mfd: lpc_ich: Only configure watchdog or GPIO when present Guenter Roeck
2014-03-13 22:46   ` Lee Jones
2014-03-10 21:34 ` [PATCH 3/8] mfd: lpc_ich: Remove lpc_ich_cfg struct use Peter Tyser
2014-03-11  0:59   ` Guenter Roeck
2014-03-13 22:46   ` Lee Jones
2014-03-10 21:34 ` [PATCH 4/8] mfd: lpc_ich: Add support for iTCO v3 Peter Tyser
2014-03-11  1:02   ` Guenter Roeck
2014-03-13 22:47   ` Lee Jones
2014-03-15 20:04   ` Wim Van Sebroeck
2014-03-10 21:34 ` [PATCH 5/8] watchdog: iTCO_wdt: Add support for v3 silicon Peter Tyser
2014-03-11  1:06   ` Guenter Roeck
2014-03-13 22:47   ` Lee Jones
2014-03-15 20:03   ` Wim Van Sebroeck
2014-03-18  8:28     ` Lee Jones
2014-03-18 13:59       ` Wim Van Sebroeck
2014-03-18 20:36         ` Lee Jones
2014-03-10 21:34 ` [PATCH 6/8] mfd: lpc_ich: Change Avoton to iTCO v3 Peter Tyser
2014-03-11  1:07   ` Guenter Roeck
2014-03-13 22:48   ` Lee Jones
2014-03-15 20:04   ` Wim Van Sebroeck
2014-03-18  8:27     ` Lee Jones
2014-03-18 14:00       ` Wim Van Sebroeck
2014-03-10 21:34 ` [PATCH 7/8] mfd: lpc_ich: Add support for NM10 GPIO Peter Tyser
2014-03-11  1:08   ` Guenter Roeck
2014-03-13 22:48   ` Lee Jones
2014-03-10 21:34 ` [PATCH 8/8] mfd: lpc_ich: Add support for Intel Bay Trail SoC Peter Tyser
2014-03-11  1:09   ` Guenter Roeck
2014-03-13 22:49   ` Lee Jones
2014-03-11  0:59 ` [PATCH 1/8] mfd: lpc_ich: Fix ACPI enable bitmask Guenter Roeck
2014-03-13 15:16 ` Guenter Roeck
2014-03-13 15:25   ` Lee Jones
2014-03-13 22:50     ` Lee Jones
2014-03-13 23:04       ` Guenter Roeck
2014-03-14 10:29         ` Lee Jones
2014-03-19 17:17           ` Guenter Roeck
2014-03-19 21:47             ` Lee Jones
2014-03-13 22:45 ` Lee Jones

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=1394487298-14459-2-git-send-email-ptyser@xes-inc.com \
    --to=ptyser@xes-inc.com \
    --cc=james.d.ralston@intel.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --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

all inboxes | Powered by JetHome®