LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Yi Yang <yi.y.yang@intel.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	lenb@kernel.org, acpi-bugzilla@lists.sourceforge.net
Subject: Re: [PATCH linux-acpi] Correct wakeup set error and append a new column PCI ID
Date: Wed, 02 Jan 2008 10:03:59 +0800	[thread overview]
Message-ID: <1199239440.3806.18.camel@yangyi-dev.bj.intel.com> (raw)
In-Reply-To: <20080101232011.GA2545@ucw.cz>

On Wed, 2008-01-02 at 00:20 +0100, Pavel Machek wrote:
> Hi!
> 
> > /proc/acpi/wakeup is also case-sensitive, case-insensitive is better.
> 
> Why?
A user uses device bus id like 'C093' to enable or disable wakeup of the
device, for example

echo "C093" > /proc/acpi/wakeup

but i think "c093" should also be ok. i.e.

"echo 'c093' > /proc/acpi/wakeup" should have the same result as "echo
'C093' > /proc/acpi/wakeup".

That is to say, it should be case-insensitive.
> 
> > In addtion, this patch appends a new column 'PCI ID' to /proc/acpi/wakeup
> > , the user can use it to get the corresponding device name very
> > conveniently because PCI ID is a unique identifier and platform-independent.
> 
> Userland interface change...?
Not at all, i didn't find any userland application
assumes /proc/acpi/wakeup must be that kind of format.

In fact, /proc output is always changing. :-)
> 
> Maybe this file should be left for compatibility and we should present
> something reasonable in /sys? Can't you already get PCI ID from sysfs
> node?
PCI ID can be gotten from sysfs, but it is a unique identifier for a
device, a user can get device name from /usr/share/hwdata/pci.ids in any
dstribution by PCI ID, he/she is unnecessary to use bus number to get
device name, bus number is platform-specific, but PCI ID is
platform-independent.

> 								Pavel
> 
> > [root@localhost ~]# cat /proc/acpi/wakeup
> > Device  S-state   Status   Sysfs node
> > C093      S5     disabled  pci:0000:00:1e.0
> > C0E8      S3     disabled  pci:0000:00:1d.0
> > C0EF      S3     disabled  pci:0000:00:1d.1
> > C0F0      S3     disabled  pci:0000:00:1d.2
> > C0F1      S3     disabled  pci:0000:00:1d.3
> > C0F2      S3     disabled  pci:0000:00:1d.7
> > C0F9      S0     disabled  pci:0000:00:1c.0
> > C21D      S0     disabled  pci:0000:08:00.0
> > C109      S5     disabled  pci:0000:00:1c.1
> > C228      S5     disabled  pci:0000:10:00.0
> > C10F      S5     disabled  pci:0000:00:1c.3
> > C229      S5     disabled
> > [root@localhost ~]#
> > 
> > After applying this patch, the output is:
> > 
> > [root@localhost ~]# cat /proc/acpi/wakeup
> > Device  S-state   Status   Sysfs node           PCI ID
> > C093      S5     disabled  pci:0000:00:1e.0     0x2448
> > C0E8      S3     disabled  pci:0000:00:1d.0     0x27c8
> > C0EF      S3     disabled  pci:0000:00:1d.1     0x27c9
> > C0F0      S3     disabled  pci:0000:00:1d.2     0x27ca
> > C0F1      S3     disabled  pci:0000:00:1d.3     0x27cb
> > C0F2      S3     disabled  pci:0000:00:1d.7     0x27cc
> > C0F9      S0     disabled  pci:0000:00:1c.0     0x27d0
> > C21D      S0     disabled  pci:0000:08:00.0     0x16fd
> > C109      S5     disabled  pci:0000:00:1c.1     0x27d2
> > C228      S5     disabled  pci:0000:10:00.0     0x4222
> > C10F      S5     disabled  pci:0000:00:1c.3     0x27d6
> > C229      S5     disabled
> 


  reply	other threads:[~2008-01-02  2:06 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-27  6:47 [PATCH linux-acpi] Fix /proc/acpi/alarm set error Yi Yang
2007-12-27  8:41 ` [PATCH linux-acpi] Remove superfluous code and correct counting error in function acpi_system_write_alarm Yi Yang
2007-12-29  8:22   ` [PATCH linux-acpi] Correct wakeup set error and append a new column PCI ID Yi Yang
2008-01-01 23:20     ` Pavel Machek
2008-01-02  2:03       ` Yi Yang [this message]
2008-01-02 16:09         ` Pavel Machek
2008-01-03  2:02           ` Yi Yang
2008-01-03  2:11           ` Yi Yang
2008-01-04  8:16     ` [PATCH linux-acpi] fix acpi fan state set error Yi Yang
2008-01-07  6:56       ` [PATCH] ACPI: fix processor throttling " Yi Yang
2008-01-08  3:21         ` [PATCH] ACPI: fix processor limit " Yi Yang
2008-01-24  0:45           ` [PATCH] ACPI: create proc entry 'power' only if C2 or C3 is supported Yi Yang
2008-01-24 14:43             ` Mark Lord
2008-01-09 22:21         ` [PATCH] ACPI: Add sysfs interface for acpi device wakeup Yi Yang
2008-01-10  7:43           ` Maxim Levitsky
2008-01-09 23:59             ` Yi Yang
2008-01-10 10:30               ` Matthew Garrett
2008-01-13 18:16               ` Pavel Machek
2008-01-11  8:16             ` Zhang Rui
2008-01-10 23:55               ` Yi Yang
2008-03-19 13:06                 ` Thomas Renninger
2008-03-19 14:37                   ` Yi Yang
2008-03-20  4:32                     ` Zhao Yakui
2008-03-19 18:52                   ` David Brownell
2008-03-20  5:12                     ` Zhao Yakui
2008-03-20  6:12                       ` David Brownell

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=1199239440.3806.18.camel@yangyi-dev.bj.intel.com \
    --to=yi.y.yang@intel.com \
    --cc=acpi-bugzilla@lists.sourceforge.net \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --subject='Re: [PATCH linux-acpi] Correct wakeup set error and append a new column PCI ID' \
    /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

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