ssuominen 14/06/04 20:46:46 Added: usb_bluetooth pci_devices Log: Selectively synchronize only bug fixes with Debian patchset version 1.4.1-14. (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)
Revision Changes Path 1.1 sys-power/pm-utils/files/power.d/usb_bluetooth file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-power/pm-utils/files/power.d/usb_bluetooth?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-power/pm-utils/files/power.d/usb_bluetooth?rev=1.1&content-type=text/plain Index: usb_bluetooth =================================================================== #!/bin/sh # # This script adjusts the USB bluetooth device settings via the USB # power control. This simply sets this to "auto" for power saving and to "on" # for non-power saving. This has been shown to save about 1W on some # systems. # # According to http://www.usb.org/developers/defined_class # USB wireless bluetooth devices have baseclass 0xe0, subclass 0x01, # protocol 0x01 # USB_BLUETOOTH_PM_ENABLE="${USB_BLUETOOTH_PM_ENABLE:-true}" set_usb_bluetooth() { for dev in /sys/bus/usb/devices/* ; do if [ -e $dev/bDeviceClass -a \ -e $dev/bDeviceSubClass -a \ -e $dev/bDeviceProtocol -a \ -e $dev/power/control ]; then if [ x`cat $dev/bDeviceClass` = xe0 -a \ x`cat $dev/bDeviceSubClass` = x01 -a \ x`cat $dev/bDeviceProtocol` = x01 ]; then echo Setting $dev to $1 echo $1 > $dev/power/control fi fi done } case "$1" in true) # powersaving on [ "$USB_BLUETOOTH_PM_ENABLE" = true ] && set_usb_bluetooth "auto" ;; false) # powersaving off [ "$USB_BLUETOOTH_PM_ENABLE" = true ] && set_usb_bluetooth "on" ;; *) exit 254 ;; esac exit 0 1.1 sys-power/pm-utils/files/power.d/pci_devices file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-power/pm-utils/files/power.d/pci_devices?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-power/pm-utils/files/power.d/pci_devices?rev=1.1&content-type=text/plain Index: pci_devices =================================================================== #!/bin/sh # # This script adjusts the power control of a set of PCI devices that # prove beneficial to enable power savings # PCI_DEVICES_PM_ENABLE="${PCI_DEVICES_PM_ENABLE:-true}" set_pci_device() { for dev in /sys/bus/pci/devices/* ; do if [ -e $dev/class -a -e $dev/power/control ]; then id=`basename $dev` case `cat $dev/class` in 0x020000) # ethernet echo "Setting Ethernet device $id to $1" echo $1 > $dev/power/control ;; 0x028000) # wireless echo "Setting Wireless device $id to $1" echo $1 > $dev/power/control ;; 0x040300) # audio echo "Setting Audio device $id to $1" echo $1 > $dev/power/control ;; 0x060000) # host bridge echo "Setting Host Bridge $id to $1" echo $1 > $dev/power/control ;; 0x080500) # SD card reader echo "Setting SD card reader device $id to $1" echo $1 > $dev/power/control ;; 0x088000|0x088001) # card reader echo "Setting card reader device $id to $1" echo $1 > $dev/power/control ;; 0x0c0000|0x0c0010) # firewire echo "Setting FireWire device $id to $1" echo $1 > $dev/power/control ;; esac fi done } case "$1" in true) # powersaving on [ "$PCI_DEVICES_PM_ENABLE" = true ] && set_pci_device "auto" ;; false) # powersaving off [ "$PCI_DEVICES_PM_ENABLE" = true ] && set_pci_device "on" ;; *) exit 254 ;; esac exit 0
