22 Feb, 2019

1 commit


13 Dec, 2018

1 commit

  • Ignore acpi_device_fix_up_power() return value. If we return an error
    we end up with acpi_default_enumeration() still creating a platform-
    device for the device and we end up with the device still being used
    but without the special LPSS related handling which is not useful.

    Specicifically ignoring the error fixes the touchscreen no longer
    working after a suspend/resume on a Prowise PT301 tablet.

    This tablet has a broken _PS0 method on the touchscreen's I2C controller,
    causing acpi_device_fix_up_power() to fail, causing fallback to standard
    platform-dev handling and specifically causing acpi_lpss_save/restore_ctx
    to not run.

    The I2C controllers _PS0 method does actually turn on the device, but then
    does some more nonsense which fails when run during early boot trying to
    use I2C opregion handling on another not-yet registered I2C controller.

    Signed-off-by: Hans de Goede
    Signed-off-by: Rafael J. Wysocki

    Hans de Goede
     

23 Oct, 2018

1 commit

  • Pull perf updates from Ingo Molnar:
    "The main updates in this cycle were:

    - Lots of perf tooling changes too voluminous to list (big perf trace
    and perf stat improvements, lots of libtraceevent reorganization,
    etc.), so I'll list the authors and refer to the changelog for
    details:

    Benjamin Peterson, Jérémie Galarneau, Kim Phillips, Peter
    Zijlstra, Ravi Bangoria, Sangwon Hong, Sean V Kelley, Steven
    Rostedt, Thomas Gleixner, Ding Xiang, Eduardo Habkost, Thomas
    Richter, Andi Kleen, Sanskriti Sharma, Adrian Hunter, Tzvetomir
    Stoyanov, Arnaldo Carvalho de Melo, Jiri Olsa.

    ... with the bulk of the changes written by Jiri Olsa, Tzvetomir
    Stoyanov and Arnaldo Carvalho de Melo.

    - Continued intel_rdt work with a focus on playing well with perf
    events. This also imported some non-perf RDT work due to
    dependencies. (Reinette Chatre)

    - Implement counter freezing for Arch Perfmon v4 (Skylake and newer).
    This allows to speed up the PMI handler by avoiding unnecessary MSR
    writes and make it more accurate. (Andi Kleen)

    - kprobes cleanups and simplification (Masami Hiramatsu)

    - Intel Goldmont PMU updates (Kan Liang)

    - ... plus misc other fixes and updates"

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (155 commits)
    kprobes/x86: Use preempt_enable() in optimized_callback()
    x86/intel_rdt: Prevent pseudo-locking from using stale pointers
    kprobes, x86/ptrace.h: Make regs_get_kernel_stack_nth() not fault on bad stack
    perf/x86/intel: Export mem events only if there's PEBS support
    x86/cpu: Drop pointless static qualifier in punit_dev_state_show()
    x86/intel_rdt: Fix initial allocation to consider CDP
    x86/intel_rdt: CBM overlap should also check for overlap with CDP peer
    x86/intel_rdt: Introduce utility to obtain CDP peer
    tools lib traceevent, perf tools: Move struct tep_handler definition in a local header file
    tools lib traceevent: Separate out tep_strerror() for strerror_r() issues
    perf python: More portable way to make CFLAGS work with clang
    perf python: Make clang_has_option() work on Python 3
    perf tools: Free temporary 'sys' string in read_event_files()
    perf tools: Avoid double free in read_event_file()
    perf tools: Free 'printk' string in parse_ftrace_printk()
    perf tools: Cleanup trace-event-info 'tdata' leak
    perf strbuf: Match va_{add,copy} with va_end
    perf test: S390 does not support watchpoints in test 22
    perf auxtrace: Include missing asm/bitsperlong.h to get BITS_PER_LONG
    tools include: Adopt linux/bits.h
    ...

    Linus Torvalds
     

02 Oct, 2018

1 commit

  • Going primarily by:

    https://en.wikipedia.org/wiki/List_of_Intel_Atom_microprocessors

    with additional information gleaned from other related pages; notably:

    - Bonnell shrink was called Saltwell
    - Moorefield is the Merriefield refresh which makes it Airmont

    The general naming scheme is: FAM6_ATOM_UARCH_SOCTYPE

    for i in `git grep -l FAM6_ATOM` ; do
    sed -i -e 's/ATOM_PINEVIEW/ATOM_BONNELL/g' \
    -e 's/ATOM_LINCROFT/ATOM_BONNELL_MID/' \
    -e 's/ATOM_PENWELL/ATOM_SALTWELL_MID/g' \
    -e 's/ATOM_CLOVERVIEW/ATOM_SALTWELL_TABLET/g' \
    -e 's/ATOM_CEDARVIEW/ATOM_SALTWELL/g' \
    -e 's/ATOM_SILVERMONT1/ATOM_SILVERMONT/g' \
    -e 's/ATOM_SILVERMONT2/ATOM_SILVERMONT_X/g' \
    -e 's/ATOM_MERRIFIELD/ATOM_SILVERMONT_MID/g' \
    -e 's/ATOM_MOOREFIELD/ATOM_AIRMONT_MID/g' \
    -e 's/ATOM_DENVERTON/ATOM_GOLDMONT_X/g' \
    -e 's/ATOM_GEMINI_LAKE/ATOM_GOLDMONT_PLUS/g' ${i}
    done

    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Alexander Shishkin
    Cc: Arnaldo Carvalho de Melo
    Cc: Jiri Olsa
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Thomas Gleixner
    Cc: Vince Weaver
    Cc: dave.hansen@linux.intel.com
    Cc: len.brown@intel.com
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

01 Oct, 2018

6 commits

  • On some Cherry Trail systems the GPU ACPI fwnode has power-resources which
    point to the PMIC, which is connected over a LPSS I2C controller.

    We add a device-link to make sure that the I2C controller is resumed before
    the GPU is. But the pci-core changes the power-state of PCI devices from
    D3 to D0 at noirq time (to restore the PCI config registers) and before
    this commit we were bringing up the I2C controllers from a resume_early
    handler which runs later. More specifically the pm-core will first run
    all resume_noirq handlers in order and then all resume_early handlers.

    So we must not only make sure that the handlers are run in the right order,
    but also that the resume of the I2C controller is done at noirq time.

    The behavior before this commit, resuming the I2C controller from a
    resume_early handler leads to the following errors:

    i2c_designware 808622C1:06: controller timed out
    ACPI Error: AE_ERROR, Returned by Handler for [UserDefinedRegion]
    ACPI Error: Method parse/execution failed \_SB.P18W._ON, AE_ERROR
    video LNXVIDEO:00: Failed to change power state to D0

    This commit changes the acpi_lpss.c code to resume the BYT/CHT I2C
    controllers at resume_noirq time fixing this.

    Tested-by: Jarkko Nikula
    Signed-off-by: Hans de Goede
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Rafael J. Wysocki

    Hans de Goede
     
  • On some Bay Trail systems the GPU ACPI fwnode has power-resources which
    point to the PMIC, which is connected over the LPSS I2C5 controller.

    This one was quite nasty to debug, unlike on CHT where the same problem
    leads to errors like these:

    i2c_designware 808622C1:06: controller timed out
    ACPI Error: AE_ERROR, Returned by Handler for [UserDefinedRegion]
    ACPI Error: Method parse/execution failed \_SB.P18W._ON, AE_ERROR
    video LNXVIDEO:00: Failed to change power state to D0

    On BYT the read-modify-write done by drivers/acpi/pmic/intel_pmic_xpower.c
    on the AXP288 PMIC register to change the power-resource state *seems* to
    succeed.

    But in reality, because the I2C controller has not been resumed yet, the
    read silently fails and returns the wrong value, where as the write does
    succeed, writing back the wrong value for all the other power-resources
    in the same register, turning off a bunch of them. Which of course does
    not end well.

    This commit adds a RPM consumer link from the GPU (which has a LNXVIDEO
    HID) to the BYT LPSS I2C5 controller, so that the I2C controller gets
    resumed before the GPU is resumed and thus before we try to change the
    power-resource.

    Signed-off-by: Hans de Goede
    Tested-by: Jarkko Nikula
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Rafael J. Wysocki

    Hans de Goede
     
  • On some Cherry Trail systems the GPU ACPI fwnode has power-resources which
    point to the PMIC, which is connected over the LPSS I2C7 controller.

    Due to probe ordering currently we resume the GPU and thus try to access
    the ACPI power-resources before the I2C controller has been resumed. This
    leads to the following errors:

    i2c_designware 808622C1:06: controller timed out
    ACPI Error: AE_ERROR, Returned by Handler for [UserDefinedRegion]
    ACPI Error: Method parse/execution failed \_SB.P18W._ON, AE_ERROR
    video LNXVIDEO:00: Failed to change power state to D0

    This commit adds a RPM consumer link from the GPU (which has a LNXVIDEO
    HID) to the CHT LPSS I2C7 controller, so that the I2C controller gets
    resumed before the GPU is resumed.

    Tested-by: Jarkko Nikula
    Signed-off-by: Hans de Goede
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Rafael J. Wysocki

    Hans de Goede
     
  • On some Cherry Trail systems the GPU ACPI fwnode has power-resources which
    point to the PMIC, which is connected over one of the LPSS I2C controllers.

    To get the suspend/resume ordering correct for this we need to be able to
    add device-links between the GPU and the I2c controller. The GPU is a PCI
    device, so this requires acpi_lpss_find_device() to also work on PCI devs.

    Tested-by: Jarkko Nikula
    Signed-off-by: Hans de Goede
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Rafael J. Wysocki

    Hans de Goede
     
  • Make hid_uid_match helper accept a NULL uid argument, so that we can also
    check for matches against devices with are not expected to have a uid such
    as the LNXVIDEO device.

    Tested-by: Jarkko Nikula
    Signed-off-by: Hans de Goede
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Rafael J. Wysocki

    Hans de Goede
     
  • The hid_uid_match() helper is only used to check if a given acpi_device
    matches a certain hid + uid combination. Make the first argument the
    acpi_device to check to make this more clear.

    Tested-by: Jarkko Nikula
    Signed-off-by: Hans de Goede
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Rafael J. Wysocki

    Hans de Goede
     

17 Sep, 2018

1 commit

  • lpss_iosf_enter_d3_state() checks if all hw-blocks using the DMA
    controllers are in d3 before powering down the DMA controllers.

    But on devices, where the I2C bus connected to the PMIC is shared by
    the PUNIT, the controller for that bus will never reach d3 since it has
    an effectively empty _PS3 method. Instead it appears to automatically
    power-down during S0i3 and we never see it as being in d3.

    This causes the DMA controllers to never be powered-down on these devices,
    causing them to never reach S0i3. This commit uses the ACPI _SEM method
    to detect if an I2C bus is shared with the PUNIT and if it is, it removes
    it from the mask of devices which lpss_iosf_enter_d3_state() checks for.

    This fixes these devices never reaching any S0ix states.

    Signed-off-by: Hans de Goede
    Acked-by: Mika Westerberg
    Signed-off-by: Rafael J. Wysocki

    Hans de Goede
     

10 Sep, 2018

1 commit

  • Bay and Cherry Trail DSTDs represent a different set of devices depending
    on which OS the device think it is booting. One set of decices for Windows
    and another set of devices for Android which targets the Android-x86 Linux
    kernel fork (which e.g. used to have its own display driver instead of
    using the i915 driver).

    Which set of devices we are actually going to get is out of our control,
    this is controlled by the ACPI OSID variable, which gets either set through
    an EFI setup option, or sometimes is autodetected. So we need to support
    both.

    This commit adds support for the 80862286 and 808622C0 ACPI HIDs which we
    get for the first resp. second DMA controller on Cherry Trail devices when
    OSID is set to Android.

    Signed-off-by: Hans de Goede
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Rafael J. Wysocki

    Hans de Goede
     

06 Sep, 2018

1 commit

  • Commit 12864ff8545f (ACPI / LPSS: Avoid PM quirks on suspend and resume
    from hibernation) bypasses lpss quirks for S3 and S4, by setting a flag
    for S3/S4 in acpi_lpss_suspend(), and check that flag in
    acpi_lpss_resume().

    But this overlooks the boot case where acpi_lpss_resume() may get called
    without a corresponding acpi_lpss_suspend() having been called.

    Thus force setting the flag during boot.

    Fixes: 12864ff8545f (ACPI / LPSS: Avoid PM quirks on suspend and resume from hibernation)
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=200989
    Reported-and-tested-by: William Lieurance
    Signed-off-by: Zhang Rui
    Cc: 4.15+ # 4.15+: 12864ff8545f (ACPI / LPSS: Avoid ...)
    Signed-off-by: Rafael J. Wysocki

    Zhang Rui
     

27 Jul, 2018

1 commit

  • Commit a09c59130688 (ACPI / LPSS: Avoid PM quirks on suspend and
    resume from S3) modified the ACPI driver for Intel SoCs (LPSS) to
    avoid applying PM quirks on suspend and resume from S3 to address
    system-wide suspend and resume problems on some systems, but it is
    reported that the same issue also affects hibernation, so extend
    the approach used by that commit to cover hibernation as well.

    Fixes: a09c59130688 (ACPI / LPSS: Avoid PM quirks on suspend and resume from S3)
    Link: https://bugs.launchpad.net/bugs/1774950
    Reported-by: Kai-Heng Feng
    Cc: 4.15+ # 4.15+
    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Mika Westerberg

    Rafael J. Wysocki
     

21 Jun, 2018

1 commit

  • These are a stable-candidate suspend/resume fix of the ACPI driver for
    Intel SoCs (LPSS) and an inline stub fix for the ACPI processor driver.

    * acpi-soc:
    ACPI / LPSS: Avoid PM quirks on suspend and resume from S3

    * acpi-processor:
    ACPI / processor: Finish making acpi_processor_ppc_has_changed() void

    Rafael J. Wysocki
     

14 Jun, 2018

2 commits

  • It is reported that commit a192aa923b66a (ACPI / LPSS: Consolidate
    runtime PM and system sleep handling) introduced a system suspend
    regression on some machines, but the only functional change made by
    it was to cause the PM quirks in the LPSS to also be used during
    system suspend and resume. While that should always work for
    suspend-to-idle, it turns out to be problematic for S3
    (suspend-to-RAM).

    To address that issue restore the previous S3 suspend and resume
    behavior of the LPSS to avoid applying PM quirks then.

    Fixes: a192aa923b66a (ACPI / LPSS: Consolidate runtime PM and system sleep handling)
    Link: https://bugs.launchpad.net/bugs/1774950
    Reported-by: Kai-Heng Feng
    Tested-by: Kai-Heng Feng
    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Ulf Hansson
    Reviewed-by: Andy Shevchenko
    Acked-by: Mika Westerberg
    Cc: 4.15+ # 4.15+

    Rafael J. Wysocki
     
  • …ierry.reding/linux-pwm

    Pull pwm updates from Thierry Reding:
    "This contains a couple of fixes and cleanups for the Meson and
    ACPI/LPSS drivers as well as capture support for STM32.

    Note that given the cross- subsystem changes, the STM32 patches were
    merged through the MFD and PWM trees, both sharing an immutable
    branch"

    * tag 'pwm/for-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
    pwm: stm32: Fix build warning with CONFIG_DMA_ENGINE disabled
    pwm: stm32: Enforce dependency on CONFIG_MFD_STM32_TIMERS
    ACPI / LPSS: Add missing prv_offset setting for byt/cht PWM devices
    pwm: lpss: platform: Save/restore the ctrl register over a suspend/resume
    dt-bindings: mfd: stm32-timers: Add support for dmas
    pwm: simplify getting .drvdata
    pwm: meson: Fix allocation of PWM channel array

    Linus Torvalds
     

06 Jun, 2018

1 commit

  • The LPSS PWM device on on Bay Trail and Cherry Trail devices has a set
    of private registers at offset 0x800, the current lpss_device_desc for
    them already sets the LPSS_SAVE_CTX flag to have these saved/restored
    over device-suspend, but the current lpss_device_desc was not setting
    the prv_offset field, leading to the regular device registers getting
    saved/restored instead.

    This is causing the PWM controller to no longer work, resulting in a black
    screen, after a suspend/resume on systems where the firmware clears the
    APB clock and reset bits at offset 0x804.

    This commit fixes this by properly setting prv_offset to 0x800 for
    the PWM devices.

    Cc: stable@vger.kernel.org
    Fixes: e1c748179754 ("ACPI / LPSS: Add Intel BayTrail ACPI mode PWM")
    Fixes: 1bfbd8eb8a7f ("ACPI / LPSS: Add ACPI IDs for Intel Braswell")
    Signed-off-by: Hans de Goede
    Acked-by: Rafael J . Wysocki
    Signed-off-by: Thierry Reding

    Hans de Goede
     

10 May, 2018

1 commit

  • The Point of View mobii wintab p800w Bay Trail tablet comes with a Crystal
    Cove PMIC, yet uses the LPSS PWM for backlight control, rather then the
    Crystal Cove's PWM, so we need to call pwm_add_table() to add a
    pwm_backlight mapping for the LPSS pwm despite there being an INT33FD
    ACPI device present.

    On all Bay Trail devices the _HRV object of the INT33FD ACPI device
    will normally return 2, to indicate the Bay Trail variant of the CRC
    PMIC is present, except on this tablet where _HRV is 0xffff. I guess this
    is a hack to make the windows Crystal Cove PWM driver not bind.

    Out of the 44 DSTDs with an INT33FD device in there which I have (from
    different model devices) only the pov mobii wintab p800w uses 0xffff for
    the HRV.

    The byt_pwm_setup code calls acpi_dev_present to check for the presence
    of a INT33FD ACPI device which indicates that a CRC PMIC is present and
    if the INT33FD ACPI device is present then byt_pwm_setup will not add
    a pwm_backlight mapping for the LPSS pwm, so that the CRC PWM will get
    used instead.

    acpi_dev_present has a hrv parameter, this commit make us pass 2 instead
    of -1, so that things still match on normal tablets, but on this special
    case with its _HRV of 0xffff, the check will now fail so that the
    pwm_backlight mapping for the LPSS pwm gets added fixing backlight
    brightness control on this device.

    Signed-off-by: Hans de Goede
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Rafael J. Wysocki

    Hans de Goede
     

16 Jan, 2018

1 commit

  • acpi_lpss_create_device() skips handling LPSS devices which do not have
    a mmio resources in their resource list (typically these devices are
    disabled by the firmware). But since the LPSS code does not bind to the
    device, acpi_bus_attach() ends up still creating a platform device for
    it and the regular platform_driver for the ACPI HID still tries to bind
    to it.

    This happens e.g. on some boards which do not use the pwm-controller
    and have an empty or invalid resource-table for it. Currently this causes
    these error messages to get logged:

    [ 3.281966] pwm-lpss 80862288:00: invalid resource
    [ 3.287098] pwm-lpss: probe of 80862288:00 failed with error -22

    This commit stops the undesirable creation of a platform_device for
    disabled LPSS devices by setting pnp.type.platform_id to 0. Note that
    acpi_scan_attach_handler() also sets pnp.type.platform_id to 0 when there
    is a matching handler for the device and that handler has no attach
    callback, so we simply behave as a handler without an attach function
    in this case.

    Signed-off-by: Hans de Goede
    Acked-by: Mika Westerberg
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Rafael J. Wysocki

    Hans de Goede
     

16 Dec, 2017

1 commit

  • Some Cherry Trail boards have a dependency between the SDHCI host
    controller used for SD cards and an external PMIC accessed via I2C. Add a
    device link between the SDHCI host controller (consumer) and the I2C
    adapter (supplier).

    This patch depends on a fix to devices links, namely commit 0ff26c662d5f
    ("driver core: Fix device link deferred probe"). And also either,
    commit 126dbc6b49c8 ("PM: i2c-designware-platdrv: Clean up PM handling in
    probe"), or patch "PM / runtime: Fix handling of suppliers with disabled
    runtime PM".

    Signed-off-by: Adrian Hunter
    Reviewed-by: Andy Shevchenko
    Acked-by: Mika Westerberg
    Signed-off-by: Rafael J. Wysocki

    Adrian Hunter
     

14 Nov, 2017

1 commit

  • Pull ACPI updates from Rafael Wysocki:
    "These update ACPICA to upstream revision 20170831, fix APEI to use the
    fixmap instead of ioremap_page_range(), add an operation region driver
    for TI PMIC TPS68470, add support for PCC subspace IDs to the ACPI
    CPPC driver, fix a few assorted issues and clean up some code.

    Specifics:

    - Update the ACPICA code to upstream revision 20170831 including
    * PDTT table header support (Bob Moore).
    * Cleanup and extension of internal string-to-integer conversion
    functions (Bob Moore).
    * Support for 64-bit hardware accesses (Lv Zheng).
    * ACPI PM Timer code adjustment to deal with 64-bit return values
    of acpi_hw_read() (Bob Moore).
    * Support for deferred table verification in acpiexec (Lv Zheng).

    - Fix APEI to use the fixmap instead of ioremap_page_range() which
    cannot work correctly the way the code in there attempted to use it
    and drop some code that's not necessary any more after that change
    (James Morse).

    - Clean up the APEI support code and make it use 64-bit timestamps
    (Arnd Bergmann, Dongjiu Geng, Jan Beulich).

    - Add operation region driver for TI PMIC TPS68470 (Rajmohan Mani).

    - Add support for PCC subspace IDs to the ACPI CPPC driver (George
    Cherian).

    - Fix an ACPI EC driver regression related to the handling of EC
    events during the "noirq" phases of system suspend/resume (Lv
    Zheng).

    - Delay the initialization of the lid state in the ACPI button driver
    to fix issues appearing on some systems (Hans de Goede).

    - Extend the KIOX000A "device always present" quirk to cover all
    affected BIOS versions (Hans de Goede).

    - Clean up some code in the ACPI core and drivers (Colin Ian King,
    Gustavo Silva)"

    * tag 'acpi-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (24 commits)
    ACPI: Mark expected switch fall-throughs
    ACPI / LPSS: Remove redundant initialization of clk
    ACPI / CPPC: Make CPPC ACPI driver aware of PCC subspace IDs
    mailbox: PCC: Move the MAX_PCC_SUBSPACES definition to header file
    ACPI / sysfs: Make function param_set_trace_method_name() static
    ACPI / button: Delay acpi_lid_initialize_state() until first user space open
    ACPI / EC: Fix regression related to triggering source of EC event handling
    APEI / ERST: use 64-bit timestamps
    ACPI / APEI: Remove arch_apei_flush_tlb_one()
    arm64: mm: Remove arch_apei_flush_tlb_one()
    ACPI / APEI: Remove ghes_ioremap_area
    ACPI / APEI: Replace ioremap_page_range() with fixmap
    ACPI / APEI: remove the unused dead-code for SEA/NMI notification type
    ACPI / x86: Extend KIOX000A quirk to cover all affected BIOS versions
    ACPI / APEI: adjust a local variable type in ghes_ioremap_pfn_irq()
    ACPICA: Update version to 20170831
    ACPICA: Update acpi_get_timer for 64-bit interface to acpi_hw_read
    ACPICA: String conversions: Update to add new behaviors
    ACPICA: String conversions: Cleanup/format comments. No functional changes
    ACPICA: Restructure/cleanup all string-to-integer conversion functions
    ...

    Linus Torvalds
     

09 Nov, 2017

1 commit

  • The pointer clk is being initialized to ERR_PTR(-ENODEV) however
    this value is never read before it is set to clk_data->clk. Thus
    the initialization is redundant and can be mored.

    Cleans up clang warning:
    Value stored to 'clk' during its initialization is never read

    Signed-off-by: Colin Ian King
    Signed-off-by: Rafael J. Wysocki

    Colin Ian King
     

06 Nov, 2017

1 commit

  • Make the ACPI PM domain take DPM_FLAG_SMART_SUSPEND into account in
    its system suspend callbacks.

    [Note that the pm_runtime_suspended() check in acpi_dev_needs_resume()
    is an optimization, because if is not passed, all of the subsequent
    checks may be skipped and some of them are much more overhead in
    general.]

    Also use the observation that if the device is in runtime suspend
    at the beginning of the "late" phase of a system-wide suspend-like
    transition, its state cannot change going forward (runtime PM is
    disabled for it at that time) until the transition is over and the
    subsequent system-wide PM callbacks should be skipped for it (as
    they generally assume the device to not be suspended), so add
    checks for that in acpi_subsys_suspend_late/noirq() and
    acpi_subsys_freeze_late/noirq().

    Moreover, if acpi_subsys_resume_noirq() is called during the
    subsequent system-wide resume transition and if the device was left
    in runtime suspend previously, its runtime PM status needs to be
    changed to "active" as it is going to be put into the full-power
    state going forward, so add a check for that too in there.

    In turn, if acpi_subsys_thaw_noirq() runs after the device has been
    left in runtime suspend, the subsequent "thaw" callbacks need
    to be skipped for it (as they may not work correctly with a
    suspended device), so set the power.direct_complete flag for the
    device then to make the PM core skip those callbacks.

    On top of the above, make the analogous changes in the acpi_lpss
    driver that uses the ACPI PM domain callbacks.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Greg Kroah-Hartman

    Rafael J. Wysocki
     

24 Oct, 2017

1 commit

  • Move the LPSS-specific code from acpi_lpss_runtime_suspend()
    and acpi_lpss_runtime_resume() into separate functions,
    acpi_lpss_suspend() and acpi_lpss_resume(), respectively, and
    make acpi_lpss_suspend_late() and acpi_lpss_resume_early() use
    them too in order to unify the runtime PM and system sleep
    handling in the LPSS driver.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Greg Kroah-Hartman
    Reviewed-by: Ulf Hansson

    Rafael J. Wysocki
     

17 Oct, 2017

1 commit

  • On top of a previous change getting rid of the PM QoS flag
    PM_QOS_FLAG_REMOTE_WAKEUP, combine two ACPI device suspend routines,
    acpi_dev_runtime_suspend() and acpi_dev_suspend_late(), into one,
    acpi_dev_suspend(), to eliminate some code duplication.

    It also avoids enabling wakeup for devices handled by the ACPI
    LPSS middle layer on driver removal.

    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Ulf Hansson

    Rafael J. Wysocki
     

11 Oct, 2017

2 commits

  • Commit 58a1fbbb2ee8 (PM / PCI / ACPI: Kick devices that might have
    been reset by firmware), made PCI's and ACPI's ->complete() callbacks
    to be assigned to a new API called pm_complete_with_resume_check(),
    which was introduced in the same change.

    Later it turned out that using pm_complete_with_resume_check() wasn't
    good enough for PCI, as it needed additional PCI specific checks,
    before deciding whether runtime resuming the device is needed when
    running the ->complete() callback.

    This leaves ACPI as the only user of pm_complete_with_resume_check().
    Therefore let's restore ACPI's acpi_subsys_complete(), which was
    dropped in commit 58a1fbbb2ee8 (PM / PCI / ACPI: Kick devices that
    might have been reset by firmware).

    This enables us to remove the pm_complete_with_resume_check() API in
    a following change, but it also enables ACPI to add more ACPI
    specific checks in acpi_subsys_complete() if that turns out to be
    necessary.

    Signed-off-by: Ulf Hansson
    Signed-off-by: Rafael J. Wysocki

    Ulf Hansson
     
  • Notice that acpi_dev_runtime_resume() and acpi_dev_resume_early() are
    actually literally identical after some more-or-less recent changes,
    so rename acpi_dev_runtime_resume() to acpi_dev_resume(), use it
    everywhere instead of acpi_dev_resume_early() and drop the latter.

    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Ulf Hansson

    Rafael J. Wysocki
     

10 Aug, 2017

1 commit

  • The keyboard and touchpad on MacBook's from 2015 onwards are connected
    via an SPI bus. On MacBook8's (2015) the ACPI device for the SPI master
    for this bus has _CID "INT33C1", and hence the acpi-lpss handler here is
    triggered for it. However, the DSDT lists no memory resources for this
    device, resulting in an error being returned by the attach callback and
    therefore the SPI master device being ignored. This prevents us from
    being able to register the keyboard and touchpad driver.

    Furthermore, the controller (a Wildcat Point-LP controller) does not
    appear to need the functionality provided by the apci-lpss handler.
    Therefore we now just skip the handler if no memory resources are found
    and let the ACPI scan complete successfully for this device.

    All of this is not an issue on later MacBook(Pro)'s because their ACPI
    SPI devices don't have any _CID and therefore no attempt is made to attach
    this handler.

    Returning an error was introduced in commit d3e13ff3c1aa - this restores
    the original behaviour.

    Link: https://github.com/cb22/macbook12-spi-driver
    Signed-off-by: Ronald Tschalär
    Acked-by: Mika Westerberg
    Signed-off-by: Rafael J. Wysocki

    Ronald Tschalär
     

04 Aug, 2017

1 commit


07 Jul, 2017

1 commit

  • At least on the UP board SBC both PWMs are enabled leading to us
    trying to add the same pwm_lookup twice, which leads to the following:

    [ 0.902224] list_add double add: new=ffffffffb8efd400,
    prev=ffffffffb8efd400, next=ffffffffb8eeede0.
    [ 0.912466] ------------[ cut here ]------------
    [ 0.917624] kernel BUG at lib/list_debug.c:31!
    [ 0.922588] invalid opcode: 0000 [#1] SMP
    ...
    [ 1.027450] Call Trace:
    [ 1.030185] pwm_add_table+0x4c/0x90
    [ 1.034181] bsw_pwm_setup+0x1a/0x20
    [ 1.038175] acpi_lpss_create_device+0xfe/0x420
    ...

    This commit fixes this by only calling pwm_add_table() for the first
    PWM controller (which is the one used for the backlight).

    Link: https://bugzilla.redhat.com/show_bug.cgi?id=1458599
    Fixes: bf7696a12071 (acpi: lpss: call pwm_add_table() for BSW...)
    Fixes: 04434ab5120a (ACPI / LPSS: Call pwm_add_table() for Bay Trail...)
    Signed-off-by: Hans de Goede
    Acked-by: Andy Shevchenko
    Cc: 4.11+ # 4.11+
    Signed-off-by: Rafael J. Wysocki

    Hans de Goede
     

05 Jul, 2017

1 commit


29 Apr, 2017

1 commit

  • On Bay Trail systems with a Crystal Cove PMIC the Crystal Cove's PWM is
    used to control the backlight brightness. On systems without one, the
    Crystal Cove SoC's PWM is used and we need to call pwm_add_table() so
    that the i915 driver can find the pwm for controlling the backlight.

    Signed-off-by: Hans de Goede
    Signed-off-by: Rafael J. Wysocki

    Hans de Goede
     

02 Mar, 2017

1 commit

  • …ierry.reding/linux-pwm

    Pull pwm updates from Thierry Reding:
    "This set contains mostly fixes to existing drivers as well as cleanup
    of code that's not been in active use for a while"

    * tag 'pwm/for-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (27 commits)
    acpi: lpss: call pwm_add_table() for BSW PWM device
    pwm: Try to load modules during pwm_get()
    pwm: Don't hold pwm_lookup_lock longer than necessary
    pwm: Make the PWM_POLARITY flag in DTB optional
    pwm: Print error messages with pr_err() instead of pr_debug()
    pwm: imx: Add polarity inversion support to i.MX's PWMv2
    pwm: imx: doc: Update imx-pwm.txt documentation entry
    pwm: imx: Remove redundant i.MX PWMv2 code
    pwm: imx: Provide atomic PWM support for i.MX PWMv2
    pwm: imx: Move PWMv2 wait for fifo slot code to a separate function
    pwm: imx: Move PWMv2 software reset code to a separate function
    pwm: imx: Rewrite v1 code to facilitate switch to atomic PWM
    pwm: imx: Add separate set of PWM ops for v1 and v2
    pwm: imx: Remove ipg clock and enable per clock when required
    pwm: lpss: Add Intel Gemini Lake PCI ID
    pwm: lpss: Do not export board infos for different PWM types
    pwm: lpss: Avoid reconfiguring while UPDATE bit is still enabled
    pwm: lpss: Switch to new atomic API
    pwm: lpss: Allow duty cycle to be 0
    pwm: lpss: Avoid potential overflow of base_unit
    ...

    Linus Torvalds
     

10 Feb, 2017

1 commit

  • On x86 we do not have devicetree to link the PWM controller and
    the display controller together. So someone needs to call
    pwm_add_table() to create the link, so that the i915 driver's
    pwm_get(dev, "pwm_backlight") call returns the lpss' pwm0.

    The PWM subsystem does not want to have pwm_add_table() calls
    directly in PWM drivers (this leads to probe ordering issues),
    so lets do it here since the acpi-lpss code is always builtin.

    Signed-off-by: Hans de Goede
    Acked-by: Rafael J. Wysocki
    Signed-off-by: Thierry Reding

    Hans de Goede
     

27 Jan, 2017

1 commit

  • The pmc_atom driver does not contain any architecture specific
    code. It only enables the SoC Power Management Controller driver
    for BayTrail and CherryTrail platforms.

    Move the pmc_atom driver from arch/x86/platform/atom to
    drivers/platform/x86. Also clean-up and reorder include files by
    alphabetical order in pmc_atom.h

    Signed-off-by: Irina Tirdea
    Signed-off-by: Pierre-Louis Bossart
    Acked-by: Thomas Gleixner
    Acked-by: Andy Shevchenko
    Signed-off-by: Stephen Boyd

    Irina Tirdea
     

13 Dec, 2016

1 commit

  • * acpi-soc:
    ACPI / LPSS: enable hard LLP for DMA
    ACPI / APD: Add clock frequency for future AMD I2C controller

    * acpi-battery:
    ACPI / battery: If _BIX fails, retry with _BIF

    * acpi-video:
    ACPI / video: Add force_native quirk for HP Pavilion dv6
    ACPI / video: Add force_native quirk for Dell XPS 17 L702X
    ACPI / video: Move ACPI_VIDEO_NOTIFY_* defines to acpi/video.h

    * acpi-cppc:
    ACPI / CPPC: set an error code on probe error path

    * acpi-apei:
    ACPI / APEI / ARM64: APEI initial support for ARM64
    ACPI / APEI: Fix NMI notification handling

    Rafael J. Wysocki
     

17 Nov, 2016

1 commit

  • Right now the DMA support of hard LLP (*) is fused. Enable it via specific
    message sent to SoC at run time.

    (*) Hard LLP stands for the multi-block transfer feature of DMA controller
    supported by hardware.

    Tested-by: Mika Westerberg
    Signed-off-by: Andy Shevchenko
    Signed-off-by: Rafael J. Wysocki

    Andy Shevchenko
     

10 Nov, 2016

1 commit

  • We have a couple of drivers, acpi_apd.c and acpi_lpss.c,
    that need to pass extra build-in properties to the devices
    they create. Previously the drivers added those properties
    to the struct device which is member of the struct
    acpi_device, but that does not work. Those properties need
    to be assigned to the struct device of the platform device
    instead in order for them to become available to the
    drivers.

    To fix this, this patch changes acpi_create_platform_device
    function to take struct property_entry pointer as parameter.

    Fixes: 20a875e2e86e (serial: 8250_dw: Add quirk for APM X-Gene SoC)
    Signed-off-by: Heikki Krogerus
    Tested-by: Yazen Ghannam
    Tested-by: Jérôme de Bretagne
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Rafael J. Wysocki

    Heikki Krogerus
     

31 Aug, 2016

1 commit

  • The UART driver, dw8250.c, needs some details regarding the
    Designware UART. For ACPI enumerated devices the values are
    hard-coded, but since the driver also reads the values from
    device properties, providing them with build-in properties.
    This allows us to later remove the hard-coded values from
    the driver.

    Signed-off-by: Heikki Krogerus
    Acked-by: Mika Westerberg
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Rafael J. Wysocki

    Heikki Krogerus