summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/lpc_sch.c
diff options
context:
space:
mode:
authorDenis Turischev <denis@compulab.co.il>2011-03-13 17:28:59 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2011-03-23 10:42:08 +0100
commite967f77d9818df884bdffb3e801eb12e0fd52b1c (patch)
tree791844799c8f30a99d2001631f190b5c5fb68309 /drivers/mfd/lpc_sch.c
parentc4fdd1163a37b498890564135cb61643ec93e5a3 (diff)
downloadtalos-obmc-linux-e967f77d9818df884bdffb3e801eb12e0fd52b1c.tar.gz
talos-obmc-linux-e967f77d9818df884bdffb3e801eb12e0fd52b1c.zip
mfd: Add Tunnel Creek support to lpc_sch
Intel Poulsbo SCH and Tunnel Creek provide almost the same LPC interface. Use the same driver for both devices while storing PCI ID to distinguish between platforms to apply plarform related quirks. Signed-off-by: Denis Turischev <denis@compulab.co.il> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/lpc_sch.c')
-rw-r--r--drivers/mfd/lpc_sch.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mfd/lpc_sch.c b/drivers/mfd/lpc_sch.c
index 51b2f6065a0b..ea3f52c07ef7 100644
--- a/drivers/mfd/lpc_sch.c
+++ b/drivers/mfd/lpc_sch.c
@@ -61,6 +61,7 @@ static struct mfd_cell lpc_sch_cells[] = {
static struct pci_device_id lpc_sch_ids[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SCH_LPC) },
+ { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ITC_LPC) },
{ 0, }
};
MODULE_DEVICE_TABLE(pci, lpc_sch_ids);
@@ -70,6 +71,7 @@ static int __devinit lpc_sch_probe(struct pci_dev *dev,
{
unsigned int base_addr_cfg;
unsigned short base_addr;
+ int i;
pci_read_config_dword(dev, SMBASE, &base_addr_cfg);
if (!(base_addr_cfg & (1 << 31))) {
@@ -99,7 +101,10 @@ static int __devinit lpc_sch_probe(struct pci_dev *dev,
gpio_sch_resource.start = base_addr;
gpio_sch_resource.end = base_addr + GPIO_IO_SIZE - 1;
- return mfd_add_devices(&dev->dev, -1,
+ for (i=0; i < ARRAY_SIZE(lpc_sch_cells); i++)
+ lpc_sch_cells[i].id = id->device;
+
+ return mfd_add_devices(&dev->dev, 0,
lpc_sch_cells, ARRAY_SIZE(lpc_sch_cells), NULL, 0);
}
OpenPOWER on IntegriCloud