diff options
author | Peter Tyser <ptyser@xes-inc.com> | 2014-11-05 09:39:10 +0800 |
---|---|---|
committer | Stephane Desneux <stephane.desneux@open.eurogiciel.org> | 2015-02-04 11:16:26 +0100 |
commit | 99a8d7a5b6cc80b53be430c4b6119c04764f9c62 (patch) | |
tree | 9d568d190c91b73d678965a2c175fce9a9888da1 | |
parent | 4e90b13b48c036fc4aa51043b66148136f4e172a (diff) | |
download | kernel-common-99a8d7a5b6cc80b53be430c4b6119c04764f9c62.tar.gz kernel-common-99a8d7a5b6cc80b53be430c4b6119c04764f9c62.tar.bz2 kernel-common-99a8d7a5b6cc80b53be430c4b6119c04764f9c62.zip |
mfd: lpc_ich: Only configure watchdog or GPIO when present
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>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit f0776b8ce03ceb638c51b62f324844c71c446600)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-rw-r--r-- | 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 2be85a4b36c0..cffa8367ddcf 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 |