linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
	Chris Ball <cjb@laptop.org>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	linux-mmc@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] Add SDHCI ACPI driver
Date: Fri, 23 Nov 2012 12:13:13 +0200	[thread overview]
Message-ID: <50AF4C39.4040209@intel.com> (raw)
In-Reply-To: <20121123093416.GR3867@intel.com>

On 23/11/12 11:34, Mika Westerberg wrote:
> 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@laptop.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?

Yes, I was going to suggest that too.  AFAICS pnpacpi has no concept of
multiple physical nodes.  Any objections?


> 
> 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.
> 
> 


  reply	other threads:[~2012-11-23 10:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-22  8:43 [PATCH 0/3] Add SDHCI ACPI driver Adrian Hunter
2012-11-22  8:43 ` [PATCH 1/3] PNPACPI: exclude SDHCI devices Adrian Hunter
2012-11-22  8:43 ` [PATCH 2/3] ACPI: add SDHCI to ACPI platform devices Adrian Hunter
2012-11-22  8:43 ` [PATCH 3/3] mmc: sdhci-acpi: add SDHCI ACPI driver Adrian Hunter
2012-11-23  9:44   ` Mika Westerberg
2012-11-22 13:55 ` [PATCH 0/3] Add " Chris Ball
2012-11-22 14:46   ` Adrian Hunter
2012-11-22 21:24     ` Rafael J. Wysocki
2012-11-23  9:34       ` Mika Westerberg
2012-11-23 10:13         ` Adrian Hunter [this message]
2012-11-23 10:50           ` Rafael J. Wysocki
2012-11-23 10:23       ` Adrian Hunter
2012-11-23 10:51         ` Rafael J. Wysocki

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=50AF4C39.4040209@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=cjb@laptop.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rjw@sisk.pl \
    /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;
as well as URLs for NNTP newsgroup(s).