[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121123093416.GR3867@intel.com>
Date: Fri, 23 Nov 2012 11:34:16 +0200
From: Mika Westerberg <mika.westerberg@...ux.intel.com>
To: "Rafael J. Wysocki" <rjw@...k.pl>
Cc: Adrian Hunter <adrian.hunter@...el.com>,
Chris Ball <cjb@...top.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
linux-mmc@...r.kernel.org, linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/3] Add SDHCI ACPI driver
On Thu, Nov 22, 2012 at 10:24:33PM +0100, Rafael J. Wysocki wrote:
> On Thursday, November 22, 2012 04:46:10 PM Adrian Hunter wrote:
> > On 22/11/12 15:55, Chris Ball wrote:
> > > Hi,
> > >
> > > On Thu, Nov 22 2012, Adrian Hunter wrote:
> > >> Here is SDHCI ACPI driver. It is dependent on new ACPI Platform support
> > >> so I suggest Rafael takes the patches with Chris' Ack.
> > >>
> > >> Please note that I would prefer this to be queued for 3.8
> > >
> > > Looks fine:
> > >
> > > Acked-by: Chris Ball <cjb@...top.org>
> >
> > Thank you!
> >
> > >
> > > I have some dumb questions, though -- what kind of platforms ship with
> > > these devices? Do they ever have the controller on PCI too, and what
> > > happens with sdhci-pci vs. sdhci-acpi in that case?
> >
> > Since the arrival of ACPI5, platform devices can be configured using ACPI
> > tables. PCI can also be used, but the firmware ensures that the same
> > device is not enumerated via both ACPI and PCI.
> >
> > Rafael can you take these patches?
>
> Well, I'd prefer pnpacpi/core.c to actually use acpi_platform_device_ids[]
> directly in addition to excluded_id_list[], so that duplicate entries don't
> have to be added to the both of them.
How about having pnpacpi to check if the ACPI device is already bound to a
physical device and skip the device creation? Then we don't need to expose
the acpi_platform_device_ids[] list, and this is what the ->find_device()
code already does so why create the device in the first place?
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c
index 5b17cc8..4dc2e64 100644
--- a/drivers/pnp/pnpacpi/core.c
+++ b/drivers/pnp/pnpacpi/core.c
@@ -243,6 +243,10 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
char *pnpid;
struct acpi_hardware_id *id;
+ /* Skip devices that are already bound */
+ if (device->physical_node_count)
+ return 0;
+
/*
* If a PnPacpi device is not present , the device
* driver should not be loaded.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists