public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Li Shaohua <shaohua.li@intel.com>
Cc: ACPI-DEV <acpi-devel@lists.sourceforge.net>,
	lkml <linux-kernel@vger.kernel.org>,
	Len Brown <len.brown@intel.com>, Greg <greg@kroah.com>,
	Patrick Mochel <mochel@digitalimplant.org>
Subject: Re: [PATCH 0/4]Bind physical devices with ACPI devices - take 2
Date: Mon, 17 Jan 2005 12:28:22 +0100	[thread overview]
Message-ID: <20050117112822.GA1354@elf.ucw.cz> (raw)
In-Reply-To: <1105948622.17633.6.camel@sli10-desk.sh.intel.com>

Hi!

> > The series of patches implement binding physical devices with ACPI
> > devices. With it, device drivers can utilize methods provided by
> > firmware (ACPI). These patches are against 2.6.10, please give your
> > comments.

> This is updated patches according to latest discussion.
> Changes from last one:
> 1. introduce new field 'firmware_data' in 'struct device', since people
> complain rename 'platform_data. Greg, could you please check if the
> comments I added in 'struct device' are correct?
> 2. align to Pavel's latest PCI state convention work.
> 3. Some cleanups and add more comments.
> One issue is 'platform_pci_choose_state' doesn't get called, it should
> be after Pavel updates the parameter of 'pci_choose_state'

diff -puN drivers/pci/pci.c~acpi-pci-get-suspend-state-callback
drivers/pci/pci.c
--- 2.5/drivers/pci/pci.c~acpi-pci-get-suspend-state-callback
2005-01-17 12:54:05.357547072 +0800
+++ 2.5-root/drivers/pci/pci.c  2005-01-17 13:08:50.835933896 +0800
@@ -317,6 +317,7 @@ pci_set_power_state(struct pci_dev *dev,
  * Returns PCI power state suitable for given device and given system
  * message.
  */
+int (*platform_pci_choose_state)(struct pci_dev *, pm_message_t) = 0;

 pci_power_t pci_choose_state(struct pci_dev *dev, u32 state)
 {

Perhaps you want this to be "= NULL"?


> @@ -208,6 +209,25 @@ acpi_status pci_osc_control_set(u32 flag
>  }
>  EXPORT_SYMBOL(pci_osc_control_set);
>  
> +static int acpi_pci_choose_state(struct pci_dev *pdev,
> +	pm_message_t state)
> +{
> +	char dstate_str[] = "_S0D";
> +	acpi_status status;
> +	unsigned long val;
> +	struct device *dev = &pdev->dev;
> +
> +	/* state is PM_SUSPEND_* */
> +	if ((state >= PM_SUSPEND_MAX) || !DEVICE_ACPI_HANDLE(dev))
> +		return -EINVAL;
> +	dstate_str[2] += (int __force)state;

When I'm done, you will not be able to just retype state to
integer... Perhaps you want to do pci_choose_state first; that gets
you pci_power_t and that one *is* okay to retype to int?

[And you will be shielded from my patches, too ;-) ]

								Pavel
-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

  reply	other threads:[~2005-01-17 11:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-05  2:50 [PATCH 0/4]Bind physical devices with ACPI devices - take 2 Li Shaohua
2005-01-06  4:00 ` Len Brown
2005-01-06  7:50   ` Li Shaohua
2005-01-06  9:57     ` Pavel Machek
     [not found] ` <1104893444.5550.127.camel-U5EdaLXB8smDugQYiPIPGdh3ngVCH38I@public.gmane.org>
2005-01-17  7:57   ` Li Shaohua
2005-01-17 11:28     ` Pavel Machek [this message]
     [not found]       ` <20050117112822.GA1354-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2005-01-18  1:20         ` Li Shaohua

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=20050117112822.GA1354@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=acpi-devel@lists.sourceforge.net \
    --cc=greg@kroah.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mochel@digitalimplant.org \
    --cc=shaohua.li@intel.com \
    /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