All of lore.kernel.org
 help / color / mirror / Atom feed
From: Len Brown <len.brown@intel.com>
To: Zhang Rui <rui.zhang@intel.com>
Cc: linux-acpi@vger.kernel.org, Li Shaohua <shaohua.li@intel.com>
Subject: Re: [PATCH 13/13] ACPI: use unique number as bus_id of ACPI device in sysfs
Date: Fri, 24 Nov 2006 01:36:04 -0500	[thread overview]
Message-ID: <200611240136.04511.len.brown@intel.com> (raw)
In-Reply-To: <11643454762691-git-send-email-len.brown@intel.com>

On Friday 24 November 2006 00:17, Len Brown wrote:
> From: Zhang Rui <rui.zhang@intel.com>
> 
> Previously we used the device name in the DSDT, but would
> crash upon encountering a duplicate.  Also, exposing
> the DSDT device name to the user in a path isn't a
> good idea, becauase it is arbitrary.
> So just add two attributes for each device,
> the full pathname in ACPI namespace and hardware_id.

While this addresses the potential name conflict of the previous version,
I think this needs some work.

$ ls /sys/devices/0
1  10  2  3  4  5  57  6  7  8  9  bus  hid  path  power  subsystem  uevent

Assigning the unique numbers in a depth-first search
leaves irritating gaps -- (see 10 and 57 above).
Instance numbers need to be per-directory.

Also, IMHO, the numbers by  themselves look a little strange,
maybe dev0, dev1, dev%d etc. wouldn't look so strange?

Also, the ACPI spec has some pre-defined root name-spaces, and I think
it makes sense to look up the device name against a small table of
those reserved names and print something more interesting than
a number.

eg. 
_SB	system_bus
_PR processors
_TZ thermal_zones
_SI system_indicators
_GPE events

thanks,
-Len

  reply	other threads:[~2006-11-24  6:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-24  5:17 contents of sysfs branch Len Brown
2006-11-24  5:17 ` [PATCH 1/13] ACPI: clean up scan.c Len Brown
2006-11-24  5:17   ` Len Brown
2006-11-24  5:17   ` [PATCH 2/13] ACPI: rename some functions Len Brown
2006-11-24  5:17     ` Len Brown
2006-11-24  5:17   ` [PATCH 3/13] ACPI: add device_driver and helper functions Len Brown
2006-11-24  5:17     ` Len Brown
2006-11-24  5:17   ` [PATCH 4/13] ACPI: add ACPI bus_type for driver model Len Brown
2006-11-24  5:17     ` Len Brown
2006-11-24  5:17   ` [PATCH 5/13] ACPI: change registration interface to follow " Len Brown
2006-11-24  5:17     ` Len Brown
2006-11-24  5:17   ` [PATCH 6/13] ACPI: adjust init order Len Brown
2006-11-24  5:17     ` Len Brown
2006-11-24  5:17   ` [PATCH 7/13] ACPI: convert to sysfs framework Len Brown
2006-11-24  5:17     ` Len Brown
2006-11-24  5:17   ` [PATCH 8/13] ACPI: add acpi_bus_ops in acpi_device Len Brown
2006-11-24  5:17     ` Len Brown
2006-11-24  5:17   ` [PATCH 9/13] ACPI: add acpi_bus_removal_type " Len Brown
2006-11-24  5:17     ` Len Brown
2006-11-24  5:17   ` [PATCH 10/13] ACPI: consolidate two motherboard drivers into one Len Brown
2006-11-24  5:17     ` Len Brown
2006-11-24  5:17   ` [PATCH 11/13] ACPI: Convert ACPI PCI .bind/.unbind to use PCI bridge driver Len Brown
2006-11-24  5:17     ` Len Brown
2006-11-24  5:17   ` [PATCH 12/13] ACPI: Set fake hid for non-PNPID ACPI devices Len Brown
2006-11-24  5:17     ` Len Brown
2006-11-24  5:17   ` [PATCH 13/13] ACPI: use unique number as bus_id of ACPI device in sysfs Len Brown
2006-11-24  5:17     ` Len Brown
2006-11-24  6:36       ` Len Brown [this message]
2006-11-24  9:40         ` Zhang Rui
2006-11-26  5:10           ` Zhang Rui
2006-11-27  6:10             ` Len Brown
2006-11-27  6:35               ` Zhang Rui
2006-11-27  6:06           ` Len Brown
2006-12-01  8:55 ` updated patches of sysfs branch Zhang Rui

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=200611240136.04511.len.brown@intel.com \
    --to=len.brown@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.