Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 889340 Details for
Bug 1090555
Disable HID Battery reporting for Broadcom HID/HCI device
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
0001-HID-input-disable-battery-for-0A5C-4502.patch V2
0001-HID-input-disable-battery-for-0A5C-4502.patch (text/plain), 3.63 KB, created by
Benjamin Tissoires
on 2014-04-24 15:47:17 UTC
(
hide
)
Description:
0001-HID-input-disable-battery-for-0A5C-4502.patch V2
Filename:
MIME Type:
Creator:
Benjamin Tissoires
Created:
2014-04-24 15:47:17 UTC
Size:
3.63 KB
patch
obsolete
>From d93eb065186c35e5274349c0ce37d78f0ae2d7b7 Mon Sep 17 00:00:00 2001 >From: Benjamin Tissoires <benjamin.tissoires@redhat.com> >Date: Wed, 23 Apr 2014 11:24:54 -0400 >Subject: [PATCH] HID: input: disable battery for 0A5C:4502 > >this broadcom keyboard is part of a bluetooth boot interface found on a >Lenovo All-in-one. > >The battery info are not correctly handled, and upower tries to get the >values which adds some long timeout during boot. > >By default, the advertised battery info are not useful, and also may leads >to early shutdowns with some upower versions: > >Device: /org/freedesktop/UPower/devices/battery_hid__battery > native-path: hid--battery > model: HID 0a5c:4502 > power supply: no > updated: Wed 23 Apr 2014 17:05:26 CEST (22 seconds ago) > has history: yes > has statistics: yes > battery > present: yes > rechargeable: yes > state: discharging > warning-level: action > energy: 0 Wh > energy-empty: 0 Wh > energy-full: 0 Wh > energy-full-design: 0 Wh > energy-rate: 0 W > percentage: 0% > capacity: 100% > icon-name: 'battery-caution-symbolic' > >Removing the battery information is safer here. > >Resolves: >https://bugzilla.redhat.com/show_bug.cgi?id=1090555 > >Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> >--- > drivers/hid/hid-ids.h | 3 +++ > drivers/hid/hid-input.c | 11 +++++++++-- > 2 files changed, 12 insertions(+), 2 deletions(-) > >diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h >index 22f28d6..07f73b4 100644 >--- a/drivers/hid/hid-ids.h >+++ b/drivers/hid/hid-ids.h >@@ -186,6 +186,9 @@ > #define USB_VENDOR_ID_BERKSHIRE 0x0c98 > #define USB_DEVICE_ID_BERKSHIRE_PCWD 0x1140 > >+#define USB_VENDOR_ID_BROADCOM 0x0a5c >+#define USB_DEVICE_ID_BROADCOM_KEYBOARD 0x4502 >+ > #define USB_VENDOR_ID_BTC 0x046e > #define USB_DEVICE_ID_BTC_EMPREX_REMOTE 0x5578 > #define USB_DEVICE_ID_BTC_EMPREX_REMOTE_2 0x5577 >diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c >index a713e62..ac8a184 100644 >--- a/drivers/hid/hid-input.c >+++ b/drivers/hid/hid-input.c >@@ -303,6 +303,7 @@ static enum power_supply_property hidinput_battery_props[] = { > > #define HID_BATTERY_QUIRK_PERCENT (1 << 0) /* always reports percent */ > #define HID_BATTERY_QUIRK_FEATURE (1 << 1) /* ask for feature report */ >+#define HID_BATTERY_QUIRK_IGNORE (1 << 2) /* ignore battery collection */ > > static const struct hid_device_id hid_battery_quirks[] = { > { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, >@@ -314,6 +315,9 @@ static const struct hid_device_id hid_battery_quirks[] = { > { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, > USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI), > HID_BATTERY_QUIRK_PERCENT | HID_BATTERY_QUIRK_FEATURE }, >+ { HID_USB_DEVICE(USB_VENDOR_ID_BROADCOM, >+ USB_DEVICE_ID_BROADCOM_KEYBOARD), >+ HID_BATTERY_QUIRK_IGNORE }, > {} > }; > >@@ -402,6 +406,11 @@ static bool hidinput_setup_battery(struct hid_device *dev, unsigned report_type, > if (battery->name != NULL) > goto out; /* already initialized? */ > >+ quirks = find_battery_quirk(dev); >+ >+ if (quirks & HID_BATTERY_QUIRK_IGNORE) >+ return false; /* has to be ignored */ >+ > battery->name = kasprintf(GFP_KERNEL, "hid-%s-battery", dev->uniq); > if (battery->name == NULL) > goto out; >@@ -412,8 +421,6 @@ static bool hidinput_setup_battery(struct hid_device *dev, unsigned report_type, > battery->use_for_apm = 0; > battery->get_property = hidinput_get_battery_property; > >- quirks = find_battery_quirk(dev); >- > hid_dbg(dev, "device %x:%x:%x %d quirks %d\n", > dev->bus, dev->vendor, dev->product, dev->version, quirks); > >-- >1.9.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1090555
:
889001
| 889340