13 Jan, 2012

1 commit


12 Jan, 2012

1 commit

  • * git://git.infradead.org/battery-2.6: (68 commits)
    power_supply: Mark da9052 driver as broken
    power_supply: Drop usage of nowarn variant of sysfs_create_link()
    s3c_adc_battery: Average over more than one adc sample
    power_supply: Add DA9052 battery driver
    isp1704_charger: Fix missing check
    jz4740-battery: Fix signedness bug
    power_supply: Assume mains power by default
    sbs-battery: Fix devicetree match table
    ARM: rx51: Add bq27200 i2c board info
    sbs-battery: Change power supply name
    devicetree-bindings: Propagate bq20z75->sbs rename to dt bindings
    devicetree-bindings: Add vendor entry for Smart Battery Systems
    sbs-battery: Rename internals to new name
    bq20z75: Rename to sbs-battery
    wm97xx_battery: Use DEFINE_MUTEX() for work_lock
    max8997_charger: Remove duplicate module.h
    lp8727_charger: Some minor fixes for the header
    lp8727_charger: Add header file
    power_supply: Convert drivers/power/* to use module_platform_driver()
    power_supply: Add "unknown" in power supply type
    ...

    Linus Torvalds
     

11 Jan, 2012

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (68 commits)
    hid-input/battery: add FEATURE quirk
    hid-input/battery: remove battery_val
    hid-input/battery: power-supply type really *is* a battery
    hid-input/battery: make the battery setup common for INPUTs and FEATUREs
    hid-input/battery: deal with both FEATURE and INPUT report batteries
    hid-input/battery: add quirks for battery
    hid-input/battery: remove apparently redundant kmalloc
    hid-input: add support for HID devices reporting Battery Strength
    HID: hid-multitouch: add support 9 new Xiroku devices
    HID: multitouch: add support for 3M 32"
    HID: multitouch: add support of Atmel multitouch panels
    HID: usbhid: defer LED setting to a workqueue
    HID: usbhid: hid-core: submit queued urbs before suspend
    HID: usbhid: remove LED_ON
    HID: emsff: use symbolic name instead of hardcoded PID constant
    HID: Enable HID_QUIRK_MULTI_INPUT for Trio Linker Plus II
    HID: Kconfig: fix syntax
    HID: introduce proper dependency of HID_BATTERY on POWER_SUPPLY
    HID: multitouch: support PixArt optical touch screen
    HID: make parser more verbose about parsing errors by default
    ...

    Fix up rename/delete conflict in drivers/hid/hid-hyperv.c (removed in
    staging, moved in this branch) and similarly for the rules for same file
    in drivers/staging/hv/{Kconfig,Makefile}.

    Linus Torvalds
     

09 Jan, 2012

3 commits

  • …my/xen into for-linus

    Jiri Kosina
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (53 commits)
    Kconfig: acpi: Fix typo in comment.
    misc latin1 to utf8 conversions
    devres: Fix a typo in devm_kfree comment
    btrfs: free-space-cache.c: remove extra semicolon.
    fat: Spelling s/obsolate/obsolete/g
    SCSI, pmcraid: Fix spelling error in a pmcraid_err() call
    tools/power turbostat: update fields in manpage
    mac80211: drop spelling fix
    types.h: fix comment spelling for 'architectures'
    typo fixes: aera -> area, exntension -> extension
    devices.txt: Fix typo of 'VMware'.
    sis900: Fix enum typo 'sis900_rx_bufer_status'
    decompress_bunzip2: remove invalid vi modeline
    treewide: Fix comment and string typo 'bufer'
    hyper-v: Update MAINTAINERS
    treewide: Fix typos in various parts of the kernel, and fix some comments.
    clockevents: drop unknown Kconfig symbol GENERIC_CLOCKEVENTS_MIGR
    gpio: Kconfig: drop unknown symbol 'CS5535_GPIO'
    leds: Kconfig: Fix typo 'D2NET_V2'
    sound: Kconfig: drop unknown symbol ARCH_CLPS7500
    ...

    Fix up trivial conflicts in arch/powerpc/platforms/40x/Kconfig (some new
    kconfig additions, close to removed commented-out old ones)

    Linus Torvalds
     
  • * 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (165 commits)
    reiserfs: Properly display mount options in /proc/mounts
    vfs: prevent remount read-only if pending removes
    vfs: count unlinked inodes
    vfs: protect remounting superblock read-only
    vfs: keep list of mounts for each superblock
    vfs: switch ->show_options() to struct dentry *
    vfs: switch ->show_path() to struct dentry *
    vfs: switch ->show_devname() to struct dentry *
    vfs: switch ->show_stats to struct dentry *
    switch security_path_chmod() to struct path *
    vfs: prefer ->dentry->d_sb to ->mnt->mnt_sb
    vfs: trim includes a bit
    switch mnt_namespace ->root to struct mount
    vfs: take /proc/*/mounts and friends to fs/proc_namespace.c
    vfs: opencode mntget() mnt_set_mountpoint()
    vfs: spread struct mount - remaining argument of next_mnt()
    vfs: move fsnotify junk to struct mount
    vfs: move mnt_devname
    vfs: move mnt_list to struct mount
    vfs: switch pnode.h macros to struct mount *
    ...

    Linus Torvalds
     

08 Jan, 2012

8 commits

  • Apple keyboards require a FEATURE report to query the battery state,
    even though they list as an input. Without this, it returns an error.

    Signed-off-by: Jeremy Fitzhardinge

    Jeremy Fitzhardinge
     
  • hidinput_get_battery_property() now directly polls the device for the
    current battery strength, so there's no need for battery_val, or the
    code to set it on the input event path.

    Signed-off-by: Jeremy Fitzhardinge

    Jeremy Fitzhardinge
     
  • It just isn't a battery which is powering the computer. upower needs
    a more nuanced understanding of this.

    Signed-off-by: Jeremy Fitzhardinge

    Jeremy Fitzhardinge
     
  • Signed-off-by: Jeremy Fitzhardinge

    Jeremy Fitzhardinge
     
  • Some devices seem to report batteries as FEATUREs, others as INPUTs.

    Signed-off-by: Jeremy Fitzhardinge

    Jeremy Fitzhardinge
     
  • Some devices always report percentage, despite having 0/255 as their
    min/max, so add a quirk for them.

    Signed-off-by: Jeremy Fitzhardinge

    Jeremy Fitzhardinge
     
  • Signed-off-by: Jeremy Fitzhardinge

    Jeremy Fitzhardinge
     
  • I've sent an email earlier asking for help with a GetFeature code, and now I
    have a second patch on top of Jeremy's to provide the battery functionality
    for devices that support reporting it.

    If I understood correctly when talking to Jeremy he said his device
    never actually reported the status as an input event (sorry if I didn't
    understand it correctly), and after reading HID specs I believe it's
    really because it was meant to be probed, I have an Apple Keyboard and
    Magic Trackpad both bluetooth batteries operated, so using PacketLogger
    I saw that Mac OSX always ask the battery status using the so called
    GetFeature.

    What my patch does is basically:
    - store the report id that matches the battery_strength
    - setup the battery if 0x6.0x20 is found, even if that is reported as a feature
    (as it was meant to be but only the MagicTrackpad does)
    - when upower or someone access /sys/class/power_supply/hid-*/capacity it
    will probe the device and return it's status.

    It works great for both devices, but I have two concerns:
    - the report_features function has a duplicated code
    - it would be nice if it was possible for specific drivers to provide their own
    probe as there might be some strange devices... (but maybe it's
    already possible)

    I've talked to the upower dev and he fixed it to be able to show the
    right percentage.

    Here how the uevent file (in /sys/class/power_supply/hid-*/) looks like:
    POWER_SUPPLY_NAME=hid-00:22:41:D9:18:E7-battery
    POWER_SUPPLY_PRESENT=1
    POWER_SUPPLY_ONLINE=1
    POWER_SUPPLY_CAPACITY=66
    POWER_SUPPLY_MODEL_NAME=MacAdmin’s keyboard
    POWER_SUPPLY_STATUS=Discharging

    POWER_SUPPLY_NAME=hid-70:CD:60:F5:FF:3F-battery
    POWER_SUPPLY_PRESENT=1
    POWER_SUPPLY_ONLINE=1
    POWER_SUPPLY_CAPACITY=62
    POWER_SUPPLY_MODEL_NAME=nexx’s Trackpad
    POWER_SUPPLY_STATUS=Discharging

    Signed-off-by: Daniel Nicoletti

    Daniel Nicoletti
     

07 Jan, 2012

1 commit

  • This resolves the conflict in the arch/arm/mach-s3c64xx/s3c6400.c file,
    and it fixes the build error in the arch/x86/kernel/microcode_core.c
    file, that the merge did not catch.

    The microcode_core.c patch was provided by Stephen Rothwell
    who was invaluable in the merge issues involved
    with the large sysdev removal process in the driver-core tree.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

05 Jan, 2012

2 commits


04 Jan, 2012

1 commit


02 Jan, 2012

3 commits


21 Dec, 2011

5 commits

  • Defer LED setting action to a workqueue.
    This is more likely to send all LED change events in a single URB.

    Signed-off-by: Daniel Kurtz
    Acked-by: Oliver Neukum
    Signed-off-by: Jiri Kosina

    Daniel Kurtz
     
  • If any userspace program has opened a keyboard device, the input core
    de-activates the keyboard's LEDs upon suspend(). It does this by sending
    individual EV_LED[LED_X]=0 events to the underlying device driver by
    directly calling the driver's registered event() handler.

    The usb-hid driver event() handler processes each request by immediately
    attempting to submit a CTRL URB to turn off the LED. USB URB submission
    is asynchronous. First the URB is added to the head of the ctrl queue.
    Then, if the CTRL_RUNNING flag is false, the URB is submitted immediately
    (and CTRL_RUNNING is set). If the CTRL_RUNNING flag was already true,
    then the newly queued URB is submitted in the ctrl completion handler when
    all previously submitted URBs have completed. When all queued URBs have
    been submitted, the completion handler clears the CTRL_RUNNING flag.

    In the 2-LED suspend case, at input suspend(), 2 LED event CTRL URBs get
    queued, with only the first actually submitted. Soon after input
    suspend() handler finishes, the usb-hid suspend() handler gets called.
    Since this is NOT a PM_EVENT_AUTO suspend, the handler sets
    REPORTED_IDLE, then waits for io to complete.

    Unfortunately, this usually happens while the first LED request is
    actually still being processed. Thus when the completion handler tries
    to submit the second LED request it fails, since REPORTED_IDLE is
    already set! This REPORTED_IDLE check failure causes the completion
    handler to complete, however without clearing the CTRL_RUNNING flag.
    This, in turn, means that the suspend() handler's wait_io() condition
    is never satisfied, and instead it times out after 10 seconds, aborting
    the original system suspend.

    This patch changes the behavior to the following:
    (1) allow completion handler to finish submitting all queued URBs, even if
    REPORTED_IDLE is set. This guarantees that all URBs queued before the
    hid-core suspend() call will be submitted before the system is
    suspended.
    (2) if REPORTED_IDLE is set and the URB queue is empty, queue, but
    don't submit, new URB submission requests. These queued requests get
    submitted when resume() flushes the URB queue. This is similar to the
    existing behavior, however, any requests that arrive while the queue is
    not yet empty will still get submitted before suspend.
    (3) set the RUNNING flag when flushing the URB queue in resume().
    This keeps URBs that were queued in (2) from colliding with any new
    URBs that are being submitted during the resume process. The new URB
    submission requests upon resume get properly queued behind the ones
    being flushed instead of the current situation where they collide,
    causing memory corruption and oopses.

    Signed-off-by: Daniel Kurtz
    Acked-by: Oliver Neukum
    Signed-off-by: Jiri Kosina

    Daniel Kurtz
     
  • LED_ON was defined in the original version of the hid-core autosuspend patch.
    However, during review, the setting and clearing of it was redone
    using ledcount. The test was left in accidentally.

    Signed-off-by: Daniel Kurtz
    Acked-by: Oliver Neukum
    Signed-off-by: Jiri Kosina

    Daniel Kurtz
     
  • Use macro instead of 0x118 PID in device table.

    Signed-off-by: Jiri Kosina

    Jiri Kosina
     
  • Add quirk for the Trio Linker Plus II - the adapter supports several
    controllers simultaneously, generating a new HID entry for each connected
    device.

    Signed-off-by: Ignaz Forster
    Signed-off-by: Jiri Kosina

    Ignaz Forster
     

19 Dec, 2011

1 commit


17 Dec, 2011

1 commit

  • ppc6xx_defconfig reveals this:

    drivers/built-in.o: In function `hidinput_cleanup_battery': drivers/hid/hid-input.c:351: undefined reference to`power_supply_unregister'
    drivers/built-in.o: In function `hidinput_setup_battery': drivers/hid/hid-input.c:338: undefined reference to `power_supply_register'
    make[1]: *** [.tmp_vmlinux1] Error 1

    The defconfig in question doens't mention either option and kbuild is
    genertaing

    CONFIG_HID_BATTERY_STRENGTH=y
    CONFIG_POWER_SUPPLY=m

    which is wrong. Put a proper dependency in place.

    Reported-by: Tony Breeds
    Signed-off-by: Jiri Kosina

    Jiri Kosina
     

15 Dec, 2011

2 commits

  • This patch modifies hid-multitouch driver for supporting PixArt optical touch
    screen. Because of the device does not have to set initial report, we apply
    "HID_QUIRK_NO_INIT_REPORTS" quirk and add the device into hid_blacklist[]

    Signed-off-by: Aaron Tian
    Signed-off-by: Jiri Kosina

    Aaron Tian
     
  • Most of the parsing errors (typically resulting in device not being claimed
    by HID subsystem at all) are reported only in debugging mode, which makes
    root-causing problems with buggy devices unnecessarily more difficult.

    Convert reporting of important HID report descriptor parsing errors to
    be reported through hid_err() / hid_warn() instead of dbg_hid().

    Signed-off-by: Jiri Kosina

    Jiri Kosina
     

12 Dec, 2011

1 commit


10 Dec, 2011

2 commits


06 Dec, 2011

1 commit


03 Dec, 2011

1 commit


02 Dec, 2011

1 commit


30 Nov, 2011

3 commits


28 Nov, 2011

1 commit

  • Some HID devices, such as my Bluetooth mouse, report their battery
    strength as an event. Rather than passing it through as a strange
    absolute input event, this patch registers it with the power_supply
    subsystem as a battery, so that the device's Battery Strength can be
    reported to usermode.

    The battery appears in sysfs names
    /sys/class/power_supply/hid--battery, and it is a child of the
    battery-containing device, so it should be clear what it's the battery of.

    Unfortunately on my current Fedora 16 system, while the battery does
    appear in the UI, it is listed as a Laptop Battery with 0% charge (since
    it ignores the "capacity" property of the battery and instead computes
    it from the "energy*" fields, which we can't supply given the limited
    information contained within the HID Report).

    Still, this patch is the first step.

    Signed-off-by: Jeremy Fitzhardinge
    Signed-off-by: Jiri Kosina

    Jeremy Fitzhardinge