21 Jun, 2016

1 commit

  • Add i2c_hid_shutdown for i2c-hid driver to send suspend cmd & free
    irq before device shutdown.

    Some HW design (i.e. Umaro, a chromebook model) is that the power to
    i2c hid device won't down after device shutdown. Also the i2c-hid driver
    do not send suspend cmd to the hid i2c device and free its irq before
    shutdown.So if We touch the touchscreen or some other i2c hid device,
    the power consumtion will be go up even when the device is in shutdown
    state.

    Though the root cause maybe a HW issue. But it seems that it is a
    good pratice to set power sleep for i2c-hid device before shutdown.

    Signed-off-by: Guohua Zhong
    Acked-By: Benjamin Tissoires
    Signed-off-by: Jiri Kosina

    Guohua Zhong
     

06 Jun, 2016

1 commit

  • i2c-hid devices' suspend/resume are usually time-consuming process.
    For example, the touch controller(i2c-ATML1000:00) on ASUS T100 tablet
    takes about 160ms for suspending and 120ms for resuming. This patch
    enables i2c-hid devices to suspend/resume asynchronously. This will
    take advantage of multicore and speed up system suspend/resume process.

    Signed-off-by: Zhonghui Fu
    Acked-by: Benjamin Tissoires
    Signed-off-by: Jiri Kosina

    Fu, Zhonghui
     

15 Mar, 2016

1 commit

  • Even though hid_hw_* checks that passed in data_len is less than
    HID_MAX_BUFFER_SIZE it is not enough, as i2c-hid does not necessarily
    allocate buffers of HID_MAX_BUFFER_SIZE but rather checks all device
    reports and select largest size. In-kernel users normally just send as much
    data as report needs, so there is no problem, but hidraw users can do
    whatever they please:

    BUG: KASAN: slab-out-of-bounds in memcpy+0x34/0x54 at addr ffffffc07135ea80
    Write of size 4101 by task syz-executor/8747
    CPU: 2 PID: 8747 Comm: syz-executor Tainted: G BU 3.18.0 #37
    Hardware name: Google Tegra210 Smaug Rev 1,3+ (DT)
    Call trace:
    [] dump_backtrace+0x0/0x258 arch/arm64/kernel/traps.c:83
    [] show_stack+0x1c/0x2c arch/arm64/kernel/traps.c:172
    [< inline >] __dump_stack lib/dump_stack.c:15
    [] dump_stack+0x90/0x140 lib/dump_stack.c:50
    [< inline >] print_error_description mm/kasan/report.c:97
    [< inline >] kasan_report_error mm/kasan/report.c:278
    [] kasan_report+0x268/0x530 mm/kasan/report.c:305
    [] __asan_storeN+0x20/0x150 mm/kasan/kasan.c:718
    [] memcpy+0x30/0x54 mm/kasan/kasan.c:299
    [] __i2c_hid_command+0x2b0/0x7b4 drivers/hid/i2c-hid/i2c-hid.c:178
    [< inline >] i2c_hid_set_or_send_report drivers/hid/i2c-hid/i2c-hid.c:321
    [] i2c_hid_output_raw_report.isra.2+0x3d4/0x4b8 drivers/hid/i2c-hid/i2c-hid.c:589
    [] i2c_hid_output_report+0x54/0x68 drivers/hid/i2c-hid/i2c-hid.c:602
    [< inline >] hid_hw_output_report include/linux/hid.h:1039
    [] hidraw_send_report+0x400/0x414 drivers/hid/hidraw.c:154
    [] hidraw_write+0x40/0x64 drivers/hid/hidraw.c:177
    [] vfs_write+0x1d4/0x3cc fs/read_write.c:534
    [< inline >] SYSC_pwrite64 fs/read_write.c:627
    [] SyS_pwrite64+0xec/0x144 fs/read_write.c:614
    Object at ffffffc07135ea80, in cache kmalloc-512
    Object allocated with size 268 bytes.

    Let's check data length against the buffer size before attempting to copy
    data over.

    Cc: stable@vger.kernel.org
    Reported-by: Alexander Potapenko
    Signed-off-by: Dmitry Torokhov
    Reviewed-by: Benjamin Tissoires
    Signed-off-by: Jiri Kosina

    Dmitry Torokhov
     

10 Mar, 2016

2 commits

  • On ACPI-based systems ACPI power domain code runtime resumes device before
    calling suspend method, which ensures that i2c-hid suspend code starts with
    device not in low-power state and with interrupts enabled.

    On other systems, especially if device is not a part of any power domain,
    we may end up calling driver's system-level suspend routine while the
    device is runtime-suspended (with controller in presumably low power state
    and interrupts disabled). This will result in interrupts being essentially
    disabled twice, and we will only re-enable them after both system resume
    and runtime resume methods complete. Unfortunately i2c_hid_resume() calls
    i2c_hid_hwreset() and that only works properly if interrupts are enabled.

    Also if device is runtime-suspended driver's suspend code may fail if it
    tries to issue I/O requests.

    Let's fix it by runtime-resuming the device if we need to run HID driver's
    suspend code and also disabling interrupts only if device is not already
    runtime-suspended. Also on resume we mark the device as running at full
    power (since that is what resetting will do to it).

    Reviewed-by: Benson Leung
    Tested-by: Mika Westerberg
    Acked-by: Benjamin Tissoires
    Signed-off-by: Doug Anderson
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Jiri Kosina

    Doug Anderson
     
  • When using the device tree binding OF compatible = "hid-over-i2c" the
    i2c id table also needs to have that name in order to auto load this
    driver, since i2c core reports module alias as i2c: where
    is compatible string of OF binding stripped of manufacturer's
    prefix.

    Tested-by: Andrew Duggan
    Acked-by: Benjamin Tissoires
    Signed-off-by: Benson Leung
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Jiri Kosina

    Benson Leung
     

14 Jan, 2016

1 commit


31 Dec, 2015

1 commit

  • When an i2c-hid device is resumed from system sleep the driver resets
    the device to be sure it is in known state. The device is expected to
    issue an interrupt when reset is complete.

    This reset might take few milliseconds to complete so if the HID driver
    on top (hid-rmi) starts to set up the device by sending feature reports
    etc. the device might not issue the reset complete interrupt anymore.

    Below is what happens to touchpad on Lenovo Yoga 900 during resume from
    system sleep:

    [ 24.790951] i2c_hid i2c-SYNA2B29:00: i2c_hid_hwreset
    [ 24.790973] i2c_hid i2c-SYNA2B29:00: i2c_hid_set_power
    [ 24.790982] i2c_hid i2c-SYNA2B29:00: __i2c_hid_command: cmd=22 00 00 08
    [ 24.793011] i2c_hid i2c-SYNA2B29:00: resetting...
    [ 24.793016] i2c_hid i2c-SYNA2B29:00: __i2c_hid_command: cmd=22 00 00 01

    Here i2c-hid sends reset command to the touchpad.

    [ 24.794012] i2c_hid i2c-SYNA2B29:00: input: 06 00 01 00 00 00
    [ 24.794051] i2c_hid i2c-SYNA2B29:00: i2c_hid_set_or_send_report
    [ 24.794059] i2c_hid i2c-SYNA2B29:00: __i2c_hid_command:
    cmd=22 00 3f 03 0f 23 00 04 00 0f 01

    Now hid-rmi puts the touchpad to correct mode by sending it a feature
    report. This makes the touchpad not to issue reset complete interrupt.

    [ 24.796092] i2c_hid i2c-SYNA2B29:00: __i2c_hid_command: waiting...

    i2c-hid starts to wait for the reset interrupt to trigger which never
    happens.

    [ 24.798304] i2c_hid i2c-SYNA2B29:00: i2c_hid_set_or_send_report
    [ 24.798313] i2c_hid i2c-SYNA2B29:00: __i2c_hid_command:
    cmd=25 00 17 00 09 01 42 00 2e 00 19 19 00 10 cc 06 74 04 0f
    19 00 00 00 00 00

    Yet another output report from hid-rmi driver.

    [ 29.795630] i2c_hid i2c-SYNA2B29:00: __i2c_hid_command: finished.
    [ 29.795637] i2c_hid i2c-SYNA2B29:00: failed to reset device.

    After 5 seconds i2c-hid driver times out.

    [ 29.795642] i2c_hid i2c-SYNA2B29:00: i2c_hid_set_power
    [ 29.795649] i2c_hid i2c-SYNA2B29:00: __i2c_hid_command: cmd=22 00 01 08
    [ 29.797576] dpm_run_callback(): i2c_hid_resume+0x0/0xb0 returns -61
    [ 29.797584] PM: Device i2c-SYNA2B29:00 failed to resume: error -61

    After this the touchpad does not work anymore (and also resume itself
    gets slowed down because of the timeout).

    Prevent sending of feature/output reports while the device is being
    reset by adding a mutex which is held during that time.

    Reported-and-tested-by: Linus Torvalds
    Reported-by: Nish Aravamudan
    Suggested-by: Benjamin Tissoires
    Reviewed-by: Benjamin Tissoires
    Signed-off-by: Mika Westerberg
    Signed-off-by: Jiri Kosina

    Mika Westerberg
     

19 Nov, 2015

1 commit


29 Sep, 2015

1 commit

  • Currently hid_connect() prints out following when I2C connected HID devices
    is connected:

    hid-multitouch 0018:03EB:2136.0001: ... [ATML3432:00 03EB:2136] on

    After "on " should read physical device name but it is left empty by the
    driver.

    Make it look better and fill in the physical device name.

    Signed-off-by: Mika Westerberg
    Acked-by: Benjamin Tissoires
    Reviewed-by: Daniel Martin
    Signed-off-by: Jiri Kosina

    Mika Westerberg
     

18 Aug, 2015

1 commit


08 Jul, 2015

1 commit

  • i2c-hid takes care of requesting and handling IRQs for HID devices
    which in turns might expect them to be always active when working
    in normal conditions. Hence, disabling IRQs before calling the suspend
    callbacks can potentially cause problems since device drivers might
    try to perform operations needing them.

    Fix this by disabling IRQs only after the suspend callbacks had been
    executed.

    Signed-off-by: Gabriele Mazzotta
    Reviewed-by: Benjamin Tissoires
    Signed-off-by: Jiri Kosina

    Gabriele Mazzotta
     

22 Jun, 2015

2 commits


03 Jun, 2015

1 commit

  • The HID device does not need to know about the ACPI device associated with
    the underlying i2c device. Setting the ACPI companion field in the HID device
    also has the side effect of causing HID to be set as wake capable, since
    acpi_bind_one uses's the companion ACPI device's wakeup flags to set the
    device as wake capable. Which results in power/wakeup files in sysfs for
    the HID device which do not do anything.

    Signed-off-by: Andrew Duggan
    Reviewed-by: Benson Leung
    Tested-by: Benson Leung
    Acked-by: Mika Westerberg
    Signed-off-by: Jiri Kosina

    Andrew Duggan
     

18 May, 2015

1 commit

  • These defines are used like this:

    if (test_bit(I2C_HID_STARTED, &ihid->flags))

    The intent was to use bits 0, 1, and 2 but because of the extra shifts
    we're using bits 1, 2, and 4. It's harmless becuase it's done
    consistently but it's not the intent and static checkers will complain.

    Fixes: 4a200c3b9a40 ('HID: i2c-hid: introduce HID over i2c specification implementation')
    Signed-off-by: Dan Carpenter
    Reviewed-by: Benjamin Tissoires
    Signed-off-by: Jiri Kosina

    Dan Carpenter
     

23 Apr, 2015

1 commit

  • Using GPIOs and gpiolib is optional. If the kernel is compiled without GPIO
    support the driver should not fail if it finds the interrupt using normal
    methods.

    However, commit a485923efbb8 ("HID: i2c-hid: Add support for ACPI GPIO
    interrupts") did not take into account that acpi_dev_add_driver_gpios()
    returns -ENXIO when !CONFIG_GPIOLIB.

    Fix this by checking the return value against -ENXIO and 0 and only in that
    case fail the probe.

    Reported-by: Gabriele Mazzotta
    Signed-off-by: Mika Westerberg
    Signed-off-by: Jiri Kosina

    Mika Westerberg
     

25 Feb, 2015

1 commit

  • The HID over I2C specification allows to have the interrupt for a HID
    device to be GPIO instead of directly connected to the IO-APIC.

    Add support for this so that when the driver does not find proper interrupt
    number from the I2C client structure we check if it has ACPI GpioInt()
    resource listed in _CRS. If it is found we convert it to an interrupt
    number and use it instead.

    Signed-off-by: Mika Westerberg
    Signed-off-by: Jiri Kosina

    Mika Westerberg
     

23 Feb, 2015

1 commit

  • d1c7e29e8d27 (HID: i2c-hid: prevent buffer overflow in early IRQ)
    changed hid_get_input() to read ihid->bufsize bytes, which can be
    more than wMaxInputLength. This is the case with the Dell XPS 13
    9343, and it is causing events to be missed. In some cases the
    missed events are releases, which can cause the cursor to jump or
    freeze, among other problems. Limit the number of bytes read to
    min(wMaxInputLength, ihid->bufsize) to prevent such problems.

    Fixes: d1c7e29e8d27 "HID: i2c-hid: prevent buffer overflow in early IRQ"
    Signed-off-by: Seth Forshee
    Reviewed-by: Benjamin Tissoires
    Signed-off-by: Jiri Kosina

    Seth Forshee
     

17 Feb, 2015

1 commit

  • The Microsoft HID over I2C specification says two things regarding the
    interrupt:

    1) The interrupt should be level sensitive
    2) The device keeps the interrupt asserted as long as it has more reports
    available.

    We've seen that at least some Atmel and N-Trig panels keep the line low as
    long as they have something to send. The current version of the driver only
    detects the first edge but then fails to read rest of the reports (as the
    line is still asserted).

    Make the driver follow the specification and configure the HID interrupt to
    be level sensitive.

    The Windows HID over I2C driver also seems to do the same.

    Signed-off-by: Mika Westerberg
    Acked-by: Benjamin Tissoires
    Signed-off-by: Jiri Kosina

    Mika Westerberg
     

17 Dec, 2014

1 commit

  • When a hid driver that uses i2c-hid as transport is unloaded, the hid core
    will call i2c_hid_stop() which releases all the buffers associated with the
    device. This includes also the command buffer.

    Now, when the i2c-hid driver itself is unloaded it tries to power down the
    device by sending it PWR_SLEEP command. Since the command buffer is already
    released we get following crash:

    [ 79.691459] BUG: unable to handle kernel NULL pointer dereference at (null)
    [ 79.691532] IP: [] __i2c_hid_command+0x49/0x310 [i2c_hid]
    ...
    [ 79.693467] Call Trace:
    [ 79.693494] [] ? __unmask_ioapic+0x21/0x30
    [ 79.693537] [] ? unmask_ioapic+0x25/0x40
    [ 79.693581] [] ? i2c_hid_set_power+0x4b/0xa0 [i2c_hid]
    [ 79.693632] [] ? i2c_hid_runtime_resume+0x1f/0x30 [i2c_hid]
    [ 79.693689] [] ? __rpm_callback+0x2b/0x70
    [ 79.693733] [] ? rpm_callback+0x21/0x90
    [ 79.693776] [] ? rpm_resume+0x41c/0x600
    [ 79.693820] [] ? __pm_runtime_resume+0x4c/0x80
    [ 79.693868] [] ? __device_release_driver+0x28/0x100
    [ 79.693917] [] ? driver_detach+0xa0/0xb0
    [ 79.693959] [] ? bus_remove_driver+0x4c/0xb0
    [ 79.694006] [] ? SyS_delete_module+0x11d/0x1d0
    [ 79.694054] [] ? int_signal+0x12/0x17
    [ 79.694095] [] ? system_call_fastpath+0x12/0x17

    Fix this so that we only free buffers when the i2c-hid driver itself is
    removed.

    Fixes: 34f439e4afcd ("HID: i2c-hid: add runtime PM support")
    Reported-by: Gabriele Mazzotta
    Signed-off-by: Mika Westerberg
    Reviewed-by: Benjamin Tissoires
    Signed-off-by: Jiri Kosina

    Mika Westerberg
     

13 Dec, 2014

1 commit

  • Pull HID updates from Jiri Kosina:
    - i2c-hid race condition fix from Jean-Baptiste Maneyrol
    - Logitech driver now supports vendor-specific HID++ protocol, allowing
    us to deliver a full multitouch support on wider range of Logitech
    touchpads. Written by Benjamin Tissoires
    - MS Surface Pro 3 Type Cover support added by Alan Wu
    - RMI touchpad support improvements from Andrew Duggan
    - a lot of updates to Wacom driver from Jason Gerecke and Ping Cheng
    - various small fixes all over the place

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (56 commits)
    HID: rmi: The address of query8 must be calculated based on which query registers are present
    HID: rmi: Check for additional ACM registers appended to F11 data report
    HID: i2c-hid: prevent buffer overflow in early IRQ
    HID: logitech-hidpp: disable io in probe error path
    HID: logitech-hidpp: add boundary check for name retrieval
    HID: logitech-hidpp: check name retrieval return code
    HID: logitech-hidpp: do not return the name length
    HID: wacom: Report input events for each finger on generic devices
    HID: wacom: Initialize MT slots for generic devices at post_parse_hid
    HID: wacom: Update maximum X/Y accounding to outbound offset
    HID: wacom: Add support for DTU-1031X
    HID: wacom: add defines for new Cintiq and DTU outbound tracking
    HID: wacom: fix freeze on open when autosuspend is on
    HID: wacom: re-add accidentally dropped Lenovo PID
    HID: make hid_report_len as a static inline function in hid.h
    HID: wacom: Consult the application usage when determining field type
    HID: wacom: PAD is independent with pen/touch
    HID: multitouch: Add quirk for VTL touch panels
    HID: i2c-hid: fix race condition reading reports
    HID: wacom: Add angular resolution data to some ABS axes
    ...

    Linus Torvalds
     

12 Dec, 2014

2 commits


04 Dec, 2014

1 commit

  • After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
    selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks
    depending on CONFIG_PM_RUNTIME may now be changed to depend on
    CONFIG_PM.

    Replace CONFIG_PM_RUNTIME with CONFIG_PM in drivers/hid/i2c-hid/i2c-hid.c.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Jiri Kosina
    Reviewed-by: Mika Westerberg

    Rafael J. Wysocki
     

25 Nov, 2014

1 commit

  • Current driver uses a common buffer for reading reports either
    synchronously in i2c_hid_get_raw_report() and asynchronously in
    the interrupt handler.
    There is race condition if an interrupt arrives immediately after
    the report is received in i2c_hid_get_raw_report(); the common
    buffer is modified by the interrupt handler with the new report
    and then i2c_hid_get_raw_report() proceed using wrong data.

    Fix it by using a separate buffers for synchronous reports.

    Signed-off-by: Jean-Baptiste Maneyrol
    [Antonio Borneo: cleanup, rebase to v3.17, submit mainline]
    Signed-off-by: Antonio Borneo
    Reviewed-by: Benjamin Tissoires
    Cc: stable@vger.kernel.org
    Signed-off-by: Jiri Kosina

    Jean-Baptiste Maneyrol
     

19 Nov, 2014

1 commit


29 Jul, 2014

1 commit

  • Currently, the i2c-hid driver does not call the suspend, resume, and
    reset_resume callbacks in the hid_driver struct when those events occur.
    This means that HID drivers for i2c-hid devices will not be able to execute
    commands which may be needed during suspend or resume. One example is when a
    touchpad using the hid-multitouch driver gets reset by i2c-hid coming out of
    resume. Since the reset_resume callback never gets called the device is never
    put back into the correct input mode. This patch calls the suspend and resume
    callbacks and tries to duplicate the functionality of the usb-hid driver.

    Signed-off-by: Andrew Duggan
    Signed-off-by: Vincent Huang
    Reviewed-by: Benjamin Tissoires
    Signed-off-by: Jiri Kosina

    Andrew Duggan
     

13 May, 2014

1 commit

  • Reading the partial HID Descriptor is causing a firmware lockup in some
    sensor hubs. Instead of a partial read, this patch implements the
    i2c hid fetch using a fixed descriptor size (30 bytes) followed by a
    verification of the BCDVersion (V01.00), and value stored in
    wHIDDescLength (30 Bytes) for V1.00 descriptors.

    As per i2c hid spec, this is the preferred model.

    From hid-over-i2c-protocol-spec-v1-0:

    There are a variety of ways a HOST may choose to retrieve
    the HID Descriptor from the DEVICE. The following is a preferred
    implementation but should not be considered the only implementation.
    A HOST may read the entire HID Descriptor in a single read by
    issuing a read for 30 Bytes to get the entire HID Descriptor
    from the DEVICE.However, the HOST is responsible for validating that

    1. The BCDVersion is V01.00 (later revisions may have different
    descriptor lengths), and

    2. The value stored in wHIDDescLength is 30 (Bytes) for V1.00
    descriptors.

    Reported-by: Joe Tijerina
    Signed-off-by: Archana Patni
    Signed-off-by: Subramony Sesha
    Reviewed-by: Mika Westerberg
    Reviewed-by: Benjamin Tissoires
    Signed-off-by: Jiri Kosina

    Archana Patni
     

03 Apr, 2014

1 commit

  • Pull HID updates from Jiri Kosina:
    - substantial cleanup of the generic and transport layers, in the
    direction of an ultimate goal of making struct hid_device completely
    transport independent, by Benjamin Tissoires
    - cp2112 driver from David Barksdale
    - a lot of fixes and new hardware support (Dualshock 4) to hid-sony
    driver, by Frank Praznik
    - support for Win 8.1 multitouch protocol by Andrew Duggan
    - other smaller fixes / device ID additions

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (75 commits)
    HID: sony: fix force feedback mismerge
    HID: sony: Set the quriks flag for Bluetooth controllers
    HID: sony: Fix Sixaxis cable state detection
    HID: uhid: Add UHID_CREATE2 + UHID_INPUT2
    HID: hyperv: fix _raw_request() prototype
    HID: hyperv: Implement a stub raw_request() entry point
    HID: hid-sensor-hub: fix sleeping function called from invalid context
    HID: multitouch: add support for Win 8.1 multitouch touchpads
    HID: remove hid_output_raw_report transport implementations
    HID: sony: do not rely on hid_output_raw_report
    HID: cp2112: remove the last hid_output_raw_report() call
    HID: cp2112: remove various hid_out_raw_report calls
    HID: multitouch: add support of other generic collections in hid-mt
    HID: multitouch: remove pen special handling
    HID: multitouch: remove registered devices with default behavior
    HID: hidp: Add a comment that some devices depend on the current behavior of uniq
    HID: sony: Prevent duplicate controller connections.
    HID: sony: Perform a boundry check on the sixaxis battery level index.
    HID: sony: Fix work queue issues
    HID: sony: Fix multi-line comment styling
    ...

    Linus Torvalds
     

02 Apr, 2014

2 commits


14 Mar, 2014

1 commit


19 Feb, 2014

1 commit

  • Pull HID update from Jiri Kosina:

    - fixes for several bugs in incorrect allocations of buffers by David
    Herrmann and Benjamin Tissoires.

    - support for a few new device IDs by Archana Patni, Benjamin
    Tissoires, Huei-Horng Yo, Reyad Attiyat and Yufeng Shen

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
    HID: hyperv: make sure input buffer is big enough
    HID: Bluetooth: hidp: make sure input buffers are big enough
    HID: hid-sensor-hub: quirk for STM Sensor hub
    HID: apple: add Apple wireless keyboard 2011 JIS model support
    HID: fix buffer allocations
    HID: multitouch: add FocalTech FTxxxx support
    HID: microsoft: Add ID's for Surface Type/Touch Cover 2
    HID: usbhid: quirk for CY-TM75 75 inch Touch Overlay

    Linus Torvalds
     

17 Feb, 2014

4 commits


03 Feb, 2014

1 commit


30 Jan, 2014

1 commit

  • This patch adds runtime PM support for the HID over I2C driver. When the
    i2c-hid device is first opened we power it on and on the last close we
    power it off. This is actually what the driver is already doing but in
    addition it allows subsystems, like ACPI power domain to power off the
    device during runtime PM suspend, which should save even more power.

    The implementation is not the most power efficient because it needs some
    interaction from the userspace (e.g close the device node whenever we are
    no more interested in getting events), nevertheless it allows us to save
    some power and works with devices that are not wake capable.

    Signed-off-by: Mika Westerberg
    Reviewed-by: Benjamin Tissoires
    Signed-off-by: Jiri Kosina

    Mika Westerberg
     

25 Jan, 2014

1 commit

  • Pull ACPI and power management updates from Rafael Wysocki:
    "As far as the number of commits goes, the top spot belongs to ACPI
    this time with cpufreq in the second position and a handful of PM
    core, PNP and cpuidle updates. They are fixes and cleanups mostly, as
    usual, with a couple of new features in the mix.

    The most visible change is probably that we will create struct
    acpi_device objects (visible in sysfs) for all devices represented in
    the ACPI tables regardless of their status and there will be a new
    sysfs attribute under those objects allowing user space to check that
    status via _STA.

    Consequently, ACPI device eject or generally hot-removal will not
    delete those objects, unless the table containing the corresponding
    namespace nodes is unloaded, which is extremely rare. Also ACPI
    container hotplug will be handled quite a bit differently and cpufreq
    will support CPU boost ("turbo") generically and not only in the
    acpi-cpufreq driver.

    Specifics:

    - ACPI core changes to make it create a struct acpi_device object for
    every device represented in the ACPI tables during all namespace
    scans regardless of the current status of that device. In
    accordance with this, ACPI hotplug operations will not delete those
    objects, unless the underlying ACPI tables go away.

    - On top of the above, new sysfs attribute for ACPI device objects
    allowing user space to check device status by triggering the
    execution of _STA for its ACPI object. From Srinivas Pandruvada.

    - ACPI core hotplug changes reducing code duplication, integrating
    the PCI root hotplug with the core and reworking container hotplug.

    - ACPI core simplifications making it use ACPI_COMPANION() in the
    code "glueing" ACPI device objects to "physical" devices.

    - ACPICA update to upstream version 20131218. This adds support for
    the DBG2 and PCCT tables to ACPICA, fixes some bugs and improves
    debug facilities. From Bob Moore, Lv Zheng and Betty Dall.

    - Init code change to carry out the early ACPI initialization
    earlier. That should allow us to use ACPI during the timekeeping
    initialization and possibly to simplify the EFI initialization too.
    From Chun-Yi Lee.

    - Clenups of the inclusions of ACPI headers in many places all over
    from Lv Zheng and Rashika Kheria (work in progress).

    - New helper for ACPI _DSM execution and rework of the code in
    drivers that uses _DSM to execute it via the new helper. From
    Jiang Liu.

    - New Win8 OSI blacklist entries from Takashi Iwai.

    - Assorted ACPI fixes and cleanups from Al Stone, Emil Goode, Hanjun
    Guo, Lan Tianyu, Masanari Iida, Oliver Neukum, Prarit Bhargava,
    Rashika Kheria, Tang Chen, Zhang Rui.

    - intel_pstate driver updates, including proper Baytrail support,
    from Dirk Brandewie and intel_pstate documentation from Ramkumar
    Ramachandra.

    - Generic CPU boost ("turbo") support for cpufreq from Lukasz
    Majewski.

    - powernow-k6 cpufreq driver fixes from Mikulas Patocka.

    - cpufreq core fixes and cleanups from Viresh Kumar, Jane Li, Mark
    Brown.

    - Assorted cpufreq drivers fixes and cleanups from Anson Huang, John
    Tobias, Paul Bolle, Paul Walmsley, Sachin Kamat, Shawn Guo, Viresh
    Kumar.

    - cpuidle cleanups from Bartlomiej Zolnierkiewicz.

    - Support for hibernation APM events from Bin Shi.

    - Hibernation fix to avoid bringing up nonboot CPUs with ACPI EC
    disabled during thaw transitions from Bjørn Mork.

    - PM core fixes and cleanups from Ben Dooks, Leonardo Potenza, Ulf
    Hansson.

    - PNP subsystem fixes and cleanups from Dmitry Torokhov, Levente
    Kurusa, Rashika Kheria.

    - New tool for profiling system suspend from Todd E Brandt and a
    cpupower tool cleanup from One Thousand Gnomes"

    * tag 'pm+acpi-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (153 commits)
    thermal: exynos: boost: Automatic enable/disable of BOOST feature (at Exynos4412)
    cpufreq: exynos4x12: Change L0 driver data to CPUFREQ_BOOST_FREQ
    Documentation: cpufreq / boost: Update BOOST documentation
    cpufreq: exynos: Extend Exynos cpufreq driver to support boost
    cpufreq / boost: Kconfig: Support for software-managed BOOST
    acpi-cpufreq: Adjust the code to use the common boost attribute
    cpufreq: Add boost frequency support in core
    intel_pstate: Add trace point to report internal state.
    cpufreq: introduce cpufreq_generic_get() routine
    ARM: SA1100: Create dummy clk_get_rate() to avoid build failures
    cpufreq: stats: create sysfs entries when cpufreq_stats is a module
    cpufreq: stats: free table and remove sysfs entry in a single routine
    cpufreq: stats: remove hotplug notifiers
    cpufreq: stats: handle cpufreq_unregister_driver() and suspend/resume properly
    cpufreq: speedstep: remove unused speedstep_get_state
    platform: introduce OF style 'modalias' support for platform bus
    PM / tools: new tool for suspend/resume performance optimization
    ACPI: fix module autoloading for ACPI enumerated devices
    ACPI: add module autoloading support for ACPI enumerated devices
    ACPI: fix create_modalias() return value handling
    ...

    Linus Torvalds