Skip to content

Commit e967f77

Browse files
Denis TurischevSamuel Ortiz
authored andcommitted
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>
1 parent c4fdd11 commit e967f77

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎drivers/mfd/lpc_sch.c‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ static struct mfd_cell lpc_sch_cells[] = {
6161

6262
static struct pci_device_id lpc_sch_ids[] = {
6363
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SCH_LPC) },
64+
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ITC_LPC) },
6465
{ 0, }
6566
};
6667
MODULE_DEVICE_TABLE(pci, lpc_sch_ids);
@@ -70,6 +71,7 @@ static int __devinit lpc_sch_probe(struct pci_dev *dev,
7071
{
7172
unsigned int base_addr_cfg;
7273
unsigned short base_addr;
74+
int i;
7375

7476
pci_read_config_dword(dev, SMBASE, &base_addr_cfg);
7577
if (!(base_addr_cfg & (1 << 31))) {
@@ -99,7 +101,10 @@ static int __devinit lpc_sch_probe(struct pci_dev *dev,
99101
gpio_sch_resource.start = base_addr;
100102
gpio_sch_resource.end = base_addr + GPIO_IO_SIZE - 1;
101103

102-
return mfd_add_devices(&dev->dev, -1,
104+
for (i=0; i < ARRAY_SIZE(lpc_sch_cells); i++)
105+
lpc_sch_cells[i].id = id->device;
106+
107+
return mfd_add_devices(&dev->dev, 0,
103108
lpc_sch_cells, ARRAY_SIZE(lpc_sch_cells), NULL, 0);
104109
}
105110

0 commit comments

Comments
 (0)