RFC: ACPI namespace
Richard Hughes
ee21rh at surrey.ac.uk
Sat Jan 8 07:58:57 PST 2005
On Sat, 08 Jan 2005 16:02:57 +0100, Sjoerd Simons wrote:
> Your right. I would need to checkout if i can get that info, but if the kernel
> knows it it should be possible :).. It would be nice if we could represent both
> cases in hal..
>
See Roberts' post on this...
>
> I would try to leave the intelligence out of hal and just force the
> applications to specify an available frequency (or something like the next high
> freq.).. I can image that when programming a cpu freq manager, you want to just
> switch to a higher or lower frequency most of the time. Needing to play with
> percent indicators to see what happens looks cumbersome..
Agree.
>> What's a light sensor? What's it for? Sorry if I'm being dense...
>
> Being dense is good :).. On my laptop there are light sensors on both sides
> of the keyboard. A little deamon uses the information for these to
> automagically adapt the lcd brightness and the keyboard light to the ambient
> light :) (Thus when the lightlevel goes down the lcd brightness is turned down
> and when dark enough the keyboard light is turned on)
That's proper cool. My LCD bedroom clock has done this for YEARS, and I
wondered how long laptops would take to copy this idea.
Makes my Toshiba Satellite Pro A10 look quite shabby. :-)
> In my view, fan speed, temperature and light readers all fall under sensors. I
> guess it could be nice to have one object per sensor, with keys like
> sensor.location (cpu/gpu/left of keyboard etc), sensor.type
> (light/fanspeed/temperature etc) and maybe sensor.device which can optionally
> bind it to a certain device.
I'm agreed, do you mean a plan such as this:
-------------------------------------------
system.sensors namespace:
-------------------------------------------
Device objects with the capability system.sensors represent all
light and temperature sensors in the system. The following properties are
available:
Key: system.sensor.type (string)
Mandatory: Yes
Values:
light: Light sensor
temperature: Temperature sensor
Description: The type of sensor device
Key: system.sensor.location (string)
Mandatory: Yes
Values:
gpu: Measures GPU source
cpu: Measures CPU source
external: Measures external source
other: Measuring other source
Description: The location of the sensor device
Key: system.sensor.device (????)
Mandatory: No
Description: HAL device reference
>
>> Has any work been done in the past on HAL to support probing of
>> monitors/LCDs?
>
> Don't think so.. And this is almost rocket science. For laptops displays it's
> reasonable simple to get brightness (at least on my powerbook), but for the
> other properties...
Same here, except I have to use the toshiba specific extensions in
/proc/acpi/toshiba - which complicates the schema a bit.
Shall we work on getting namespace acpi/pmu into HAL before we tackle
the LCD's?
Thanks, Richard
NEW PROPOSED NAMESPACES:
###########################################
Namespace: pmu
Description: Device objects with the capability pmu represent devices currently accessed through the PMU bus /dev/pmu.
###########################################
Key: pmu.version (string)
Mandatory: No
Description: The in-kernel driver version providing PMU services.
###########################################
Namespace: acpi
Description: Device objects with the capability acpi represent devices currently accessed through the ACPI bus and found in /proc/acpi.
###########################################
Key: acpi.version (string)
Mandatory: No
Description: The in-kernel driver version providing ACPI services. Usually of the form 20041210.
###########################################
Namespace: system
Description: Device objects with the capability system represent all the system devices currently accessed through the ACPI and PMU bus.
###########################################
-------------------------------------------
Namespace: system.ac_adaptor
Description: Device objects with the capability system.ac_adaptor represent all the devices capable of powering the system from AC power. The following property is available:
-------------------------------------------
Key: system.ac_adaptor.enabled (bool)
Mandatory: Yes
Description: The state of the adaptor, i.e. whether it is providing power to the unit.
-------------------------------------------
Namespace: system.button
Description: Device objects with the capability system.button represent all the devices capable of providing a state to the system. The following property is available:
-------------------------------------------
Key: system.button.type (string)
Mandatory: Yes
Values:
lid_switch: The switch on a laptop that senses whether the lid is open or closed.
power: The main power button on the computer
sleep: The sleep button on a computer capable of putting the computer into a suspend state.
-------------------------------------------
Namespace: system.processor
Description: Device objects with the capability system.processor represent all CPU's in the system. The following properties are available:
-------------------------------------------
Key: system.processor.number (int)
Mandatory: Yes
Description: The internal processor number in the system
Key: system.processor.can_throttle (bool)
Mandatory: No
Description: Whether the processor supports throttling to decrease it's own clock speed.
Key: system.processor.throttle_frequencies (string)
Mandatory: No
Description: A simple string showing the allowed frequencies and/or ranges of the frequency of the CPU. Values are in MHz.
Key: Only valid if system.processor.can_throttle is TRUE
Key: system.processor.maximum_speed (long)
Mandatory: No
Description: The speed of the processor in units of MHz
#Key: system.processor.temperature (int)
#Mandatory: No
#Description: The temperature of the processor in degrees Celsius
-------------------------------------------
Namespace: system.display_device
Description: Device objects with the capability display_device represent all display devices in the system. The following properties are available:
-------------------------------------------
Key: system.display_device.type (string)
Mandatory: Yes
Values:
lcd: LCD panel
crt: CRT tube
tv_out: TV Out
Description: The type of display device
Key: system.display_device.lcd.brightness (int)
Mandatory: No
Description: The brightness of the LCD panel in percent
Key: Only valid if system.display_device.type is lcd
-------------------------------------------
Namespace: system.sensors
Description: Device objects with the capability system.sensors represent all light and temperature sensors in the system. The following properties are available:
-------------------------------------------
Key: system.sensor.type (string)
Mandatory: Yes
Values:
light: Light sensor
temperature: Temperature sensor
Description: The type of sensor device
Key: system.sensor.location (string)
Mandatory: Yes
Values:
gpu: Measures GPU source
cpu: Measures CPU source
external: Measures external source
other: Measuring other source
Description: The location of the sensor device
Key: system.sensor.device (????)
Mandatory: No
Description: HAL device reference
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list