21 May, 2016

1 commit

  • Pull power supply and reset updates from Sebastian Reichel:

    - alternative reset driver for new at91 SoCs

    - misc fixes

    * tag 'for-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply:
    sbs-battery: fix power status when battery charging near dry
    power: ipaq-micro-battery: freeing the wrong variable
    power/max8925: freeing wrong variable
    power: reset: at91-shdwc: add new shutdown controller driver
    ARM: dts: at91: shdwc binding: add new shutdown controller documentation

    Linus Torvalds
     

27 Apr, 2016

1 commit

  • IO-domain handling is part of the general register files, so should live
    under the grf directly. This change allows the grf to be a simple-mfd and
    the io-domains fetching the syscon regmap from that parent-node.

    The old binding is of course preserved, though deprecated.

    Signed-off-by: Heiko Stuebner
    Acked-by: Kevin Hilman
    Tested-by: David Wu
    Signed-off-by: Rafael J. Wysocki

    Heiko Stuebner
     

10 Apr, 2016

4 commits

  • POWER_SUPPLY_STATUS_NOT_CHARGING is used for AC connected, but
    battery not charging (e.g. because battery temperature is out
    of acceptable range).

    When battery is charging near dry and BATTERY_FULL_DISCHARGED is set,
    it is wrong to set as POWER_SUPPLY_STATUS_NOT_CHARGING.
    Just use BATTERY_DISCHARGING to decide the power supply status is
    discharging or charging.

    Signed-off-by: YH Huang
    Reviewed-by: Daniel Kurtz
    Signed-off-by: Sebastian Reichel

    YH Huang
     
  • We accidentally free "micro_ac_power" which is an error pointer and it
    leads to an oops. We intended to free "micro_batt_power".

    Fixes: a2c1d531854c ('power_supply: ipaq_micro_battery: Check return values in probe')
    Signed-off-by: Dan Carpenter
    Signed-off-by: Sebastian Reichel

    Dan Carpenter
     
  • We were freeing "info->battery" instead of "info->usb", which leads to
    an OOps and a resource leak.

    The labels were wonky, "out_battery" did release the battery but out_usb
    did not release usb. I was introducing a call to free usb so it sort
    conflicted with existing misleading name. I renamed them.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Sebastian Reichel

    Dan Carpenter
     
  • Sama5d2 SoC has a completely new shutdown controller with new features and
    register layout. It thus makes sense to add a new driver for this new
    peripheral.

    This driver is Device Tree only and handles events from the wake-up pin and
    the RTC.
    As the register layout may change in the future, so some values are encoded
    in a configuration structure.

    Signed-off-by: Nicolas Ferre
    Acked-by: Alexandre Belloni
    Signed-off-by: Sebastian Reichel

    Nicolas Ferre
     

26 Mar, 2016

2 commits


25 Mar, 2016

1 commit

  • Pull more power management and ACPI updates from Rafael Wysocki:
    "The second batch of power management and ACPI updates for v4.6.

    Included are fixups on top of the previous PM/ACPI pull request and
    other material that didn't make into it but still should go into 4.6.

    Among other things, there's a fix for an intel_pstate driver issue
    uncovered by recent cpufreq changes, a workaround for a boot hang on
    Skylake-H related to the handling of deep C-states by the platform and
    a PCI/ACPI fix for the handling of IO port resources on non-x86
    architectures plus some new device IDs and similar.

    Specifics:

    - Fix for an intel_pstate driver issue related to the handling of MSR
    updates uncovered by the recent cpufreq rework (Rafael Wysocki).

    - cpufreq core cleanups related to starting governors and frequency
    synchronization during resume from system suspend and a locking fix
    for cpufreq_quick_get() (Rafael Wysocki, Richard Cochran).

    - acpi-cpufreq and powernv cpufreq driver updates (Jisheng Zhang,
    Michael Neuling, Richard Cochran, Shilpasri Bhat).

    - intel_idle driver update preventing some Skylake-H systems from
    hanging during initialization by disabling deep C-states mishandled
    by the platform in the problematic configurations (Len Brown).

    - Intel Xeon Phi Processor x200 support for intel_idle
    (Dasaratharaman Chandramouli).

    - cpuidle menu governor updates to make it always honor PM QoS
    latency constraints (and prevent C1 from being used as the fallback
    C-state on x86 when they are set below its exit latency) and to
    restore the previous behavior to fall back to C1 if the next timer
    event is set far enough in the future that was changed in 4.4 which
    led to an energy consumption regression (Rik van Riel, Rafael
    Wysocki).

    - New device ID for a future AMD UART controller in the ACPI driver
    for AMD SoCs (Wang Hongcheng).

    - Rockchip rk3399 support for the rockchip-io-domain adaptive voltage
    scaling (AVS) driver (David Wu).

    - ACPI PCI resources management fix for the handling of IO space
    resources on architectures where the IO space is memory mapped
    (IA64 and ARM64) broken by the introduction of common ACPI
    resources parsing for PCI host bridges in 4.4 (Lorenzo Pieralisi).

    - Fix for the ACPI backend of the generic device properties API to
    make it parse non-device (data node only) children of an ACPI
    device correctly (Irina Tirdea).

    - Fixes for the handling of global suspend flags (introduced in 4.4)
    during hibernation and resume from it (Lukas Wunner).

    - Support for obtaining configuration information from Device Trees
    in the PM clocks framework (Jon Hunter).

    - ACPI _DSM helper code and devfreq framework cleanups (Colin Ian
    King, Geert Uytterhoeven)"

    * tag 'pm+acpi-4.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (23 commits)
    PM / AVS: rockchip-io: add io selectors and supplies for rk3399
    intel_idle: Support for Intel Xeon Phi Processor x200 Product Family
    intel_idle: prevent SKL-H boot failure when C8+C9+C10 enabled
    ACPI / PM: Runtime resume devices when waking from hibernate
    PM / sleep: Clear pm_suspend_global_flags upon hibernate
    cpufreq: governor: Always schedule work on the CPU running update
    cpufreq: Always update current frequency before startig governor
    cpufreq: Introduce cpufreq_update_current_freq()
    cpufreq: Introduce cpufreq_start_governor()
    cpufreq: powernv: Add sysfs attributes to show throttle stats
    cpufreq: acpi-cpufreq: make Intel/AMD MSR access, io port access static
    PCI: ACPI: IA64: fix IO port generic range check
    ACPI / util: cast data to u64 before shifting to fix sign extension
    cpufreq: powernv: Define per_cpu chip pointer to optimize hot-path
    cpuidle: menu: Fall back to polling if next timer event is near
    cpufreq: acpi-cpufreq: Clean up hot plug notifier callback
    intel_pstate: Do not call wrmsrl_on_cpu() with disabled interrupts
    cpufreq: Make cpufreq_quick_get() safe to call
    ACPI / property: fix data node parsing in acpi_get_next_subnode()
    ACPI / APD: Add device HID for future AMD UART controller
    ...

    Linus Torvalds
     

24 Mar, 2016

1 commit

  • This adds the necessary data for handling io voltage domains on the rk3399.
    As interesting tidbit, the rk3399 contains two separate iodomain areas.
    One in the regular General Register Files (GRF) and one in PMUGRF in the
    pmu power domain.

    Signed-off-by: David Wu
    Reviewed-by: Heiko Stuebner
    Acked-by: Kevin Hilman
    Signed-off-by: Rafael J. Wysocki

    David Wu
     

19 Mar, 2016

1 commit

  • Merge second patch-bomb from Andrew Morton:

    - a couple of hotfixes

    - the rest of MM

    - a new timer slack control in procfs

    - a couple of procfs fixes

    - a few misc things

    - some printk tweaks

    - lib/ updates, notably to radix-tree.

    - add my and Nick Piggin's old userspace radix-tree test harness to
    tools/testing/radix-tree/. Matthew said it was a godsend during the
    radix-tree work he did.

    - a few code-size improvements, switching to __always_inline where gcc
    screwed up.

    - partially implement character sets in sscanf

    * emailed patches from Andrew Morton : (118 commits)
    sscanf: implement basic character sets
    lib/bug.c: use common WARN helper
    param: convert some "on"/"off" users to strtobool
    lib: add "on"/"off" support to kstrtobool
    lib: update single-char callers of strtobool()
    lib: move strtobool() to kstrtobool()
    include/linux/unaligned: force inlining of byteswap operations
    include/uapi/linux/byteorder, swab: force inlining of some byteswap operations
    include/asm-generic/atomic-long.h: force inlining of some atomic_long operations
    usb: common: convert to use match_string() helper
    ide: hpt366: convert to use match_string() helper
    ata: hpt366: convert to use match_string() helper
    power: ab8500: convert to use match_string() helper
    power: charger_manager: convert to use match_string() helper
    drm/edid: convert to use match_string() helper
    pinctrl: convert to use match_string() helper
    device property: convert to use match_string() helper
    lib/string: introduce match_string() helper
    radix-tree tests: add test for radix_tree_iter_next
    radix-tree tests: add regression3 test
    ...

    Linus Torvalds
     

18 Mar, 2016

3 commits

  • The new helper returns index of the mathing string in an array. We
    would use it here.

    Signed-off-by: Andy Shevchenko
    Acked-by: Linus Walleij
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Shevchenko
     
  • The new helper returns index of the mathing string in an array. We
    would use it here.

    Signed-off-by: Andy Shevchenko
    Cc: Sebastian Reichel
    Cc: Dmitry Eremin-Solenikov
    Cc: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Shevchenko
     
  • Pull power supply and reset changes from Sebastian Reichel:
    - add types for USB Type C and PD chargers
    - add act8945a charger driver
    - add ACPI/DT bindings for goldfish-battery
    - add support for versatile reset controller
    - misc fixes

    * tag 'for-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (24 commits)
    power: pm2301-charger: use __maybe_unused to hide pm functions
    power: ipaq-micro-battery: use __maybe_unused to hide pm functions
    power_supply: 88pm860x_charger: do not pass NULL to power_supply_put
    jz4740-battery: Correct voltage change check
    power_supply: lp8788-charger: initialize boolean 'found'
    goldfish: Enable ACPI-based enumeration for goldfish battery
    power: goldfish_battery: add devicetree bindings
    power: act8945a: add charger driver for ACT8945A
    power: add documentation for ACT8945A's charger DT bindings
    ARM: dts: n900: Rename isp1704 to isp1707 to match correct name
    power_supply: bq27xxx_battery: Add of modalias and match table when CONFIG_OF is enabled
    power_supply: bq2415x_charger: Add of modalias and match table when CONFIG_OF is enabled
    power_supply: bq2415x_charger: Do not add acpi modalias when CONFIG_ACPI is not enabled
    power_supply: isp1704_charger: Add compatible of match for nxp,isp1707
    power_supply: isp1704_charger: Error messages when probe fail
    power_supply: Add types for USB Type C and PD chargers
    power: bq24735-charger: add 'ti,external-control' option
    power: bq24735-charger: document 'ti,external-control' option
    power: bq24735-charger: fix failed i2c with ac-detect
    power: reset: Fix dependencies for !HAS_IOMEM archs
    ...

    Linus Torvalds
     

03 Mar, 2016

7 commits

  • The pm2301 charger driver uses nested #ifdefs to check for both
    CONFIG_PM and CONFIG_PM_SLEEP in an attempt to hide its
    suspend and runtime-pm operations when they are unused, but
    it does not hide the clear_lpn_pin() function in the same
    way, so we get a build warning when everything is
    disabled:

    drivers/power/pm2301_charger.c:123:13: error: 'clear_lpn_pin' defined but not used [-Werror=unused-function]

    This removes all the #ifdef and instead uses __maybe_unused
    annotations to let the compiler know it can silently drop
    the function definition.

    For the PM2XXX_PM_OPS, we can use an IS_ENABLED() check
    to avoid defining the structure when CONFIG_PM is not set without
    the #ifdef.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Sebastian Reichel

    Arnd Bergmann
     
  • The ipaq micro battery driver has suspend/resume functions that
    are accessed using SIMPLE_DEV_PM_OPS, which hide the reference
    when CONFIG_PM_SLEEP is not set, resulting in a warning about
    unused functions:

    drivers/power/ipaq_micro_battery.c:284:12: error: 'micro_batt_suspend' defined but not used [-Werror=unused-function]
    drivers/power/ipaq_micro_battery.c:292:12: error: 'micro_batt_resume' defined but not used [-Werror=unused-function]

    This adds __maybe_unused annotations to let the compiler know
    it can silently drop the function definition.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Sebastian Reichel

    Arnd Bergmann
     
  • In the case where power_supply_get_by_name returns NULL the current
    error return path calls power_supply_put with a NULL psy which will
    cause a null pointer dereference. Avoid this with an immediate
    return.

    Signed-off-by: Colin Ian King
    Signed-off-by: Sebastian Reichel

    Colin Ian King
     
  • The check is supposed to avoid redundant update notifications, so it
    should check for the difference between old and new voltage exceeding
    a threshold.

    Also make sure the result of a failed read is never stored.

    Signed-off-by: Maarten ter Huurne
    Signed-off-by: Sebastian Reichel

    Maarten ter Huurne
     
  • The boolean 'found' is not initialized and hence garbage. It should
    be initialized as false.

    Found with static analysis using CoverityScan

    Signed-off-by: Colin Ian King
    Acked-by: Milo Kim
    Signed-off-by: Sebastian Reichel

    Colin Ian King
     
  • Add the ACPI bindings to the goldfish battery driver.

    Signed-off-by: Yu Ning
    Signed-off-by: Jin Qian
    Signed-off-by: Alan Cox
    Signed-off-by: Sebastian Reichel

    Yu Ning
     
  • Add device tree bindings to the Goldfish virtual platform battery drivers.

    Signed-off-by: Greg Hackmann
    Signed-off-by: Jin Qian
    Signed-off-by: Alan Cox
    Signed-off-by: Sebastian Reichel

    Greg Hackmann
     

25 Feb, 2016

1 commit

  • This patch adds new driver for Active-semi ACT8945A ActivePath
    charger (part of ACT8945A MFD driver) providing power supply class
    information to userspace.

    The driver can be configured through DT (such as, total timer,
    precondition timer and input over-voltage threshold).

    Signed-off-by: Wenyou Yang
    Reviewed-by: Krzysztof Kozlowski
    [ add "|| COMPILE_TEST" to MFD_ACT8945A dependency ]
    Signed-off-by: Sebastian Reichel

    Wenyou Yang
     

22 Feb, 2016

6 commits


15 Feb, 2016

7 commits


14 Jan, 2016

1 commit

  • Currently in bq27541 driver, the average power register address is
    incorrectly set to 0x76, which would result in an error:
    bq27xxx-battery 2-0055: error reading average power register 10: -11
    According to the bq27541 datasheet, fix this problem by setting
    the average power register address to 0x24.

    Fixes: d74534c27775 ("power: bq27xxx_battery: Add support for additional bq27xxx family devices")
    Signed-off-by: Liu Xiang
    Acked-by: Andrew F. Davis
    Signed-off-by: Sebastian Reichel

    Liu Xiang
     

08 Jan, 2016

1 commit


07 Jan, 2016

3 commits