Re: [systemd-devel] [PATCH 3/3] rules: Enable runtime power management on built-in USB Bluetooth controllers

2015-04-21 Thread systemd github import bot
Patchset imported to github.
Pull request:
https://github.com/systemd-devs/systemd/compare/master...systemd-mailing-devs:1429373517-3749-4-git-send-email-mjg59%40srcf.ucam.org

--
Generated by https://github.com/haraldh/mail2git
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 3/3] rules: Enable runtime power management on built-in USB Bluetooth controllers

2015-04-19 Thread Andrei Borzenkov
В Sat, 18 Apr 2015 09:11:57 -0700
Matthew Garrett mj...@srcf.ucam.org пишет:

 From: Matthew Garrett mj...@coreos.com
 
 If a Bluetooth controller is built into the machine, it should be safe to
 enable runtime power management on it. Let's do so.
 ---
  Makefile.am | 3 ++-
  rules/90-usb-bluetooth-pm.rules | 8 
  2 files changed, 10 insertions(+), 1 deletion(-)
  create mode 100644 rules/90-usb-bluetooth-pm.rules
 
 diff --git a/Makefile.am b/Makefile.am
 index 40cf101..8463a54 100644
 --- a/Makefile.am
 +++ b/Makefile.am
 @@ -3754,7 +3754,8 @@ dist_udevrules_DATA += \
   rules/78-sound-card.rules \
   rules/80-net-setup-link.rules \
   rules/90-hda-controller-pm.rules \
 - rules/90-hda-codec-pm.rules
 + rules/90-hda-codec-pm.rules \
 + rules/90-usb-bluetooth-pm.rules
  

I wonder how long the list will grow. Is not property in hwdb better
approach?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 3/3] rules: Enable runtime power management on built-in USB Bluetooth controllers

2015-04-18 Thread Matthew Garrett
From: Matthew Garrett mj...@coreos.com

If a Bluetooth controller is built into the machine, it should be safe to
enable runtime power management on it. Let's do so.
---
 Makefile.am | 3 ++-
 rules/90-usb-bluetooth-pm.rules | 8 
 2 files changed, 10 insertions(+), 1 deletion(-)
 create mode 100644 rules/90-usb-bluetooth-pm.rules

diff --git a/Makefile.am b/Makefile.am
index 40cf101..8463a54 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3754,7 +3754,8 @@ dist_udevrules_DATA += \
rules/78-sound-card.rules \
rules/80-net-setup-link.rules \
rules/90-hda-controller-pm.rules \
-   rules/90-hda-codec-pm.rules
+   rules/90-hda-codec-pm.rules \
+   rules/90-usb-bluetooth-pm.rules
 
 nodist_udevrules_DATA += \
rules/99-systemd.rules
diff --git a/rules/90-usb-bluetooth-pm.rules b/rules/90-usb-bluetooth-pm.rules
new file mode 100644
index 000..ea535f0
--- /dev/null
+++ b/rules/90-usb-bluetooth-pm.rules
@@ -0,0 +1,8 @@
+# USB devices that are internal to the machine should also be safe to 
autosuspend
+
+ACTION==add, SUBSYSTEM==usb, SUBSYSTEMS==usb, 
ATTR{removable}==removable, GOTO=usb_bluetooth_pm_end
+ACTION==add, SUBSYSTEM==usb, SUBSYSTEMS==usb, 
ATTR{removable}==unknown, GOTO=usb_bluetooth_pm_end
+
+ACTION==add, SUBSYSTEM==usb, ATTR{bDeviceClass}==e0, 
ATTR{bDeviceSubClass}==01, ATTR{bDeviceProtocol}==01, 
TEST==power/control, ATTR{power/control}=auto
+
+LABEL=usb_bluetooth_pm_end
-- 
2.3.5

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel