12 Feb, 2019

7 commits

  • The touchscreen driver, max11801, which is on 12c2 bus, won't be probed
    when using the hdcp specific DTS (this is disabling 12c2, since it
    will acquire it for DDC communications). Since this driver won't be
    probed, it will spam the dmesg with the pr_err from max11801_read_adc()
    function. This function is periodically called by the battery driver. For
    this reason, I removed the pr_err() call.
    Also, to be noticed that the function signature is u32, but in case of an
    error it will return a negative integer. In order to correctly propagate
    errors, I changed the function signature to int. This is safe, since the
    read value from i2c is on 16 bits (MSB and LSB on 8 bits).

    Also, the function calibration_voltage is calling max11801_read_adc from
    touchscreen driverm which can return negative values in case of an
    error. I case of an error, just stop reading ADC data and return 0 as
    voltage_data.

    Signed-off-by: Robert Chiras

    Robert Chiras
     
  • Charger interrupt can't be caught anymore after plug in DC 5V in/out dozens of
    times, that caused by VBUS_I or CHG_I pending interrupt not cleared in time. The root
    cause is VBUS_I and CHG_I will be triggered in very narrow window, and VBUS_I/CHG_I
    act as the sub-interrupt of charger and share the same interrupt handler. Thus if CHG_I
    interrupt status is coming while VBUS_I handler is running, CHG_I interrupt status will
    never be cleared, since interrupt has been disabled in ISR. The unclear CHG_I interrupt
    status make pf1550 never trigger next interrupt again. So clear all charger interrupt
    status in ISR to workaround instead of ack for every sub-intterrupt.

    Signed-off-by: Robin Gong

    Robin Gong
     
  • That's pf1550's internal interrupt, useless for charger.

    Signed-off-by: Robin Gong

    Robin Gong
     
  • Add basic pf1550 charger driver.

    Signed-off-by: Robin Gong

    Robin Gong
     
  • cherry-pick below patch:

    ENGR00288351 sabresd_battery: fix usb charger detect when resume back on mx6sl

    Fix below redundant log after first resume back on mx6slevk:
    max8903-charger max8903.12: USB Charger Connected

    It's caused by not add enough prepare for uok&dok which are connected, such as
    i.MX6SL-EVK. In this case the board only support DC charger detect, so we
    didn't need judge the uok pin for USB charger detect, although uok share with
    dok pin.

    Signed-off-by: Robin Gong
    (cherry picked from commit c5ba4940a72e8124db7ef91a67b337df4e45e3b0)
    (cherry picked from commit bcd7f8e5e19528abfc1c095049b55b3d409b27af)

    Robin Gong
     
  • cherry-pick below patch:

    ENGR00277663-3 power: sabresd_battery: remove check charger offset on mx6slevk

    No need check the charger offset on mx6slevk, since there is no adc converter

    Signed-off-by: Robin Gong
    (cherry picked from commit 7683c62cf2290629f09983744d5a3987a4d64669)
    (cherry picked from commit 5f29715585ae82a435aa5ba0fe6393a53c10f87d)

    Robin Gong
     
  • cherry-pick below patch:
    ENGR00275004-4: power: sabresd_battery: add sabresd_battery driver

    Add sabresd battery driver which based on Max8903 charger IC.

    Signed-off-by: Robin Gong

    Robin Gong
     

13 Jan, 2019

1 commit

  • commit ed54ffbe554f0902689fd6d1712bbacbacd11376 upstream.

    According to [1] and [2], the temperature values are in tenths of degree
    Celsius. Exposing the Celsius value makes the battery appear on fire:

    $ upower -i /org/freedesktop/UPower/devices/battery_olpc_battery
    ...
    temperature: 236.9 degrees C

    Tested on OLPC XO-1 and OLPC XO-1.75 laptops.

    [1] include/linux/power_supply.h
    [2] Documentation/power/power_supply_class.txt

    Fixes: fb972873a767 ("[BATTERY] One Laptop Per Child power/battery driver")
    Cc: stable@vger.kernel.org
    Signed-off-by: Lubomir Rintel
    Acked-by: Pavel Machek
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Greg Kroah-Hartman

    Lubomir Rintel
     

01 Dec, 2018

1 commit

  • [ Upstream commit 9844fb2e351311210e6660a9a1c62d17424a6145 ]

    Use the new of_get_compatible_child() helper to lookup the usb sibling
    node instead of using of_find_compatible_node(), which searches the
    entire tree from a given start node and thus can return an unrelated
    (non-sibling) node.

    This also addresses a potential use-after-free (e.g. after probe
    deferral) as the tree-wide helper drops a reference to its first
    argument (i.e. the parent device node).

    While at it, also fix the related phy-node reference leak.

    Fixes: f5e4edb8c888 ("power: twl4030_charger: find associated phy by more reliable means.")
    Cc: stable # 4.2
    Cc: NeilBrown
    Cc: Felipe Balbi
    Cc: Sebastian Reichel
    Reviewed-by: Sebastian Reichel
    Signed-off-by: Johan Hovold
    Signed-off-by: Rob Herring
    Signed-off-by: Sasha Levin

    Johan Hovold
     

04 Oct, 2018

3 commits

  • [ Upstream commit 3ffa6583e24e1ad1abab836d24bfc9d2308074e5 ]

    If a device gets removed right after having registered a power_supply node,
    we might enter in a deadlock between the remove call (that has a lock on
    the parent device) and the deferred register work.

    Allow the deferred register work to exit without taking the lock when
    we are in the remove state.

    Stack trace on a Ubuntu 16.04:

    [16072.109121] INFO: task kworker/u16:2:1180 blocked for more than 120 seconds.
    [16072.109127] Not tainted 4.13.0-41-generic #46~16.04.1-Ubuntu
    [16072.109129] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [16072.109132] kworker/u16:2 D 0 1180 2 0x80000000
    [16072.109142] Workqueue: events_power_efficient power_supply_deferred_register_work
    [16072.109144] Call Trace:
    [16072.109152] __schedule+0x3d6/0x8b0
    [16072.109155] schedule+0x36/0x80
    [16072.109158] schedule_preempt_disabled+0xe/0x10
    [16072.109161] __mutex_lock.isra.2+0x2ab/0x4e0
    [16072.109166] __mutex_lock_slowpath+0x13/0x20
    [16072.109168] ? __mutex_lock_slowpath+0x13/0x20
    [16072.109171] mutex_lock+0x2f/0x40
    [16072.109174] power_supply_deferred_register_work+0x2b/0x50
    [16072.109179] process_one_work+0x15b/0x410
    [16072.109182] worker_thread+0x4b/0x460
    [16072.109186] kthread+0x10c/0x140
    [16072.109189] ? process_one_work+0x410/0x410
    [16072.109191] ? kthread_create_on_node+0x70/0x70
    [16072.109194] ret_from_fork+0x35/0x40
    [16072.109199] INFO: task test:2257 blocked for more than 120 seconds.
    [16072.109202] Not tainted 4.13.0-41-generic #46~16.04.1-Ubuntu
    [16072.109204] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [16072.109206] test D 0 2257 2256 0x00000004
    [16072.109208] Call Trace:
    [16072.109211] __schedule+0x3d6/0x8b0
    [16072.109215] schedule+0x36/0x80
    [16072.109218] schedule_timeout+0x1f3/0x360
    [16072.109221] ? check_preempt_curr+0x5a/0xa0
    [16072.109224] ? ttwu_do_wakeup+0x1e/0x150
    [16072.109227] wait_for_completion+0xb4/0x140
    [16072.109230] ? wait_for_completion+0xb4/0x140
    [16072.109233] ? wake_up_q+0x70/0x70
    [16072.109236] flush_work+0x129/0x1e0
    [16072.109240] ? worker_detach_from_pool+0xb0/0xb0
    [16072.109243] __cancel_work_timer+0x10f/0x190
    [16072.109247] ? device_del+0x264/0x310
    [16072.109250] ? __wake_up+0x44/0x50
    [16072.109253] cancel_delayed_work_sync+0x13/0x20
    [16072.109257] power_supply_unregister+0x37/0xb0
    [16072.109260] devm_power_supply_release+0x11/0x20
    [16072.109263] release_nodes+0x110/0x200
    [16072.109266] devres_release_group+0x7c/0xb0
    [16072.109274] wacom_remove+0xc2/0x110 [wacom]
    [16072.109279] hid_device_remove+0x6e/0xd0 [hid]
    [16072.109284] device_release_driver_internal+0x158/0x210
    [16072.109288] device_release_driver+0x12/0x20
    [16072.109291] bus_remove_device+0xec/0x160
    [16072.109293] device_del+0x1de/0x310
    [16072.109298] hid_destroy_device+0x27/0x60 [hid]
    [16072.109303] usbhid_disconnect+0x51/0x70 [usbhid]
    [16072.109308] usb_unbind_interface+0x77/0x270
    [16072.109311] device_release_driver_internal+0x158/0x210
    [16072.109315] device_release_driver+0x12/0x20
    [16072.109318] usb_driver_release_interface+0x77/0x80
    [16072.109321] proc_ioctl+0x20f/0x250
    [16072.109325] usbdev_do_ioctl+0x57f/0x1140
    [16072.109327] ? __wake_up+0x44/0x50
    [16072.109331] usbdev_ioctl+0xe/0x20
    [16072.109336] do_vfs_ioctl+0xa4/0x600
    [16072.109339] ? vfs_write+0x15a/0x1b0
    [16072.109343] SyS_ioctl+0x79/0x90
    [16072.109347] entry_SYSCALL_64_fastpath+0x24/0xab
    [16072.109349] RIP: 0033:0x7f20da807f47
    [16072.109351] RSP: 002b:00007ffc422ae398 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
    [16072.109353] RAX: ffffffffffffffda RBX: 00000000010b8560 RCX: 00007f20da807f47
    [16072.109355] RDX: 00007ffc422ae3a0 RSI: 00000000c0105512 RDI: 0000000000000009
    [16072.109356] RBP: 0000000000000000 R08: 00007ffc422ae3e0 R09: 0000000000000010
    [16072.109357] R10: 00000000000000a6 R11: 0000000000000246 R12: 0000000000000000
    [16072.109359] R13: 00000000010b8560 R14: 00007ffc422ae2e0 R15: 0000000000000000

    Reported-and-tested-by: Richard Hughes
    Tested-by: Aaron Skomra
    Signed-off-by: Benjamin Tissoires
    Fixes: 7f1a57fdd6cb ("power_supply: Fix possible NULL pointer dereference on early uevent")
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Benjamin Tissoires
     
  • [ Upstream commit 09bebb1adb21ecd04adf7ccb3b06f73e3a851e93 ]

    Vexpress platforms provide two different restart handlers: SYS_REBOOT
    that restart the entire system, while DB_RESET only restarts the
    daughter board containing the CPU. DB_RESET is overridden by SYS_REBOOT
    if it exists.

    notifier_chain_register used in register_restart_handler by design
    relies on notifiers to be registered once only, however vexpress restart
    notifier can get registered twice. When this happen it corrupts list
    of notifiers, as result some notifiers can be not called on proper
    event, traverse on list can be cycled forever, and second unregister
    can access already freed memory.

    So far, since this was the only restart handler in the system, no issue
    was observed even if the same notifier was registered twice. However
    commit 6c5c0d48b686 ("watchdog: sp805: add restart handler") added
    support for SP805 restart handlers and since the system under test
    contains two vexpress restart and two SP805 watchdog instances, it was
    observed that during the boot traversing the restart handler list looped
    forever as there's a cycle in that list resulting in boot hang.

    This patch fixes the issues by ensuring that the notifier is installed
    only once.

    Cc: Sebastian Reichel
    Signed-off-by: Sudeep Holla
    Fixes: 46c99ac66222 ("power/reset: vexpress: Register with kernel restart handler")
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Sudeep Holla
     
  • [ Upstream commit f2a42595f0865886a2d40524b0e9d15600848670 ]

    We should look at val which contains the value read from the register,
    not ret which is always 0 on a successful read.

    Signed-off-by: Hans de Goede
    Fixes: eac53b3664f59 ("power: supply: axp288_charger: Drop platform_data dependency")
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Hans de Goede
     

05 Sep, 2018

2 commits

  • commit a427503edaaed9b75ed9746a654cece7e93e60a8 upstream.

    If an iio channel defines a basic property, there are duplicate entries
    in /sys/class/power/*/uevent.

    So add a check to avoid duplicates. Since all channels may be duplicates,
    we have to modify the related error check.

    Signed-off-by: H. Nikolaus Schaller
    Cc: stable@vger.kernel.org
    Fixes: e60fea794e6e ("power: battery: Generic battery driver using IIO")
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Greg Kroah-Hartman

    H. Nikolaus Schaller
     
  • commit 932d47448c3caa0fa99e84d7f5bc302aa286efd8 upstream.

    We did have sporadic problems in the pinctrl framework during boot
    where a pin group name unexpectedly became NULL leading to a NULL
    dereference in strcmp.

    Detailled analysis of the failing cases did reveal that there were
    two devm allocated objects close to each other. The second one was
    the affected group_desc in pinmux and the first one was the
    psy_desc->properties buffer of the gab driver.

    Review of the gab code showed that the address calculation for
    one memcpy() is wrong. It does

    properties + sizeof(type) * index

    but C is defined to do the index multiplication already for
    pointer + integer additions. Hence the factor was applied twice
    and the memcpy() does write outside of the properties buffer.
    Sometimes it happened to be the pinctrl and triggered the strcmp(NULL).

    Anyways, it is overkill to use a memcpy() here instead of a simple
    assignment, which is easier to read and has less risk for wrong
    address calculations. So we change code to a simple assignment.

    If we initialize the index to the first free location, we can even
    remove the local variable 'properties'.

    This bug seems to exist right from the beginning in 3.7-rc1 in

    commit e60fea794e6e ("power: battery: Generic battery driver using IIO")

    Signed-off-by: H. Nikolaus Schaller
    Cc: stable@vger.kernel.org
    Fixes: e60fea794e6e ("power: battery: Generic battery driver using IIO")
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Greg Kroah-Hartman

    H. Nikolaus Schaller
     

30 May, 2018

2 commits

  • [ Upstream commit dde5953f05a89eb63a0d666ffe51d447b2ac3e05 ]

    Temperature is measured in tenths of degree Celsius.

    Fixes: 085bc24d1553 ("Add LTC2941/LTC2943 Battery Gauge Driver")
    Signed-off-by: Ladislav Michl
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Ladislav Michl
     
  • [ Upstream commit 66ec32fc7cd116dab5c02603ea8ec28ff92da3b5 ]

    max17042_get_status uses the core power_supply_am_i_supplied. That
    function relies on DT properties to figure out the power supply
    topology, and will error out without DT.

    Fixes max17042 battery status being reported as "unknown".

    Signed-off-by: Pierre Bourdon
    Signed-off-by: Andre Heider
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Pierre Bourdon
     

12 Apr, 2018

1 commit

  • [ Upstream commit 165c2357744e41391902a2a72dd170beb60c28d5 ]

    Properly stop any work we may have queued on probe-errors / remove.

    Rather then adding a remove driver callback for this, and goto style
    error handling to probe, use a devm_action for this.

    The devm_action gets registered before we register any of the extcon
    notifiers which may queue the work, devm does cleanup in reverse order,
    so this ensures that the notifiers are removed before we cancel the work.

    Reviewed-by: Chen-Yu Tsai
    Signed-off-by: Hans de Goede
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Hans de Goede
     

19 Mar, 2018

2 commits

  • [ Upstream commit 09edcb647542487864e23aa8d2ef26be3e08978a ]

    If an error occurs when we enable the backup battery charging, we should
    go through the error handling path directly.

    Before commit db43e6c473b5 ("ab8500-bm: Add usb power path support") this
    was the case, but this commit has added some code between the last test and
    the 'out' label.
    So, in case of error, this added code is executed and the error may be
    silently ignored.

    Fix it by adding the missing 'goto out', as done in all other error
    handling paths.

    Fixes: db43e6c473b5 ("ab8500-bm: Add usb power path support")
    Signed-off-by: Christophe JAILLET
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Christophe JAILLET
     
  • [ Upstream commit bf59fddde1c3eab89eb8dca8f3d3dc097887d2bb ]

    'ret' is know to be 0 at this point, because it has not been updated by the
    the previous call to 'abx500_mask_and_set_register_interruptible()'.

    Fix it by updating 'ret' before checking if an error occurred.

    Fixes: 84edbeeab67c ("ab8500-charger: AB8500 charger driver")
    Signed-off-by: Christophe JAILLET
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Christophe JAILLET
     

04 Feb, 2018

1 commit

  • commit 348c7cf5fcbcb68838255759d4cb45d039af36d2 upstream.

    This change resolves a new compile-time warning
    when built as a loadable module:

    WARNING: modpost: missing MODULE_LICENSE() in drivers/power/reset/zx-reboot.o
    see include/linux/module.h for more information

    This adds the license as "GPL v2", which matches the header of the file.

    MODULE_DESCRIPTION and MODULE_AUTHOR are also added.

    Signed-off-by: Jesse Chan
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Greg Kroah-Hartman

    Jesse Chan
     

04 Nov, 2017

1 commit

  • MIPS will soon not be a part of Imagination Technologies, and as such
    many @imgtec.com email addresses will no longer be valid. This patch
    updates the addresses for those who:

    - Have 10 or more patches in mainline authored using an @imgtec.com
    email address, or any patches dated within the past year.

    - Are still with Imagination but leaving as part of the MIPS business
    unit, as determined from an internal email address list.

    - Haven't already updated their email address (ie. JamesH) or expressed
    a desire to be excluded (ie. Maciej).

    - Acked v2 or earlier of this patch, which leaves Deng-Cheng, Matt &
    myself.

    New addresses are of the form firstname.lastname@mips.com, and all
    verified against an internal email address list. An entry is added to
    .mailmap for each person such that get_maintainer.pl will report the new
    addresses rather than @imgtec.com addresses which will soon be dead.

    Instances of the affected addresses throughout the tree are then
    mechanically replaced with the new @mips.com address.

    Signed-off-by: Paul Burton
    Cc: Deng-Cheng Zhu
    Cc: Deng-Cheng Zhu
    Acked-by: Dengcheng Zhu
    Cc: Matt Redfearn
    Cc: Matt Redfearn
    Acked-by: Matt Redfearn
    Cc: Andrew Morton
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Cc: trivial@kernel.org
    Signed-off-by: Linus Torvalds

    Paul Burton
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

10 Sep, 2017

1 commit

  • Pull power supply and reset changes from Sebastian Reichel:
    "New chip/feature support:
    - bq27xxx: support updating battery config from DT
    - bq24190: support loading battery charge info from DT
    - LTC2941: add LTC2942/LTC2944 support
    - max17042: add ACPI support
    - max1721x: new driver

    Misc:
    - Move bq27xxx w1 driver from w1 into power-supply subsystem
    - Introduce power_supply_set_input_current_limit_from_supplier
    - constify stuff
    - some minor fixes"

    * tag 'for-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (39 commits)
    power: supply: bq27xxx: enable writing capacity values for bq27421
    power: supply: bq24190_charger: Get input_current_limit from our supplier
    power: supply: bq24190_charger: Export 5V boost converter as regulator
    power: supply: bq24190_charger: Add power_supply_battery_info support
    power: supply: bq24190_charger: Add property system-minimum-microvolt
    power: supply: bq24190_charger: Enable devicetree config
    dt-bindings: power: supply: Add docs for TI BQ24190 battery charger
    power: supply: bq27xxx: Remove duplicate chip data arrays
    power: supply: bq27xxx: Enable data memory update for certain chips
    power: supply: bq27xxx: Add chip IDs for previously shadowed chips
    power: supply: bq27xxx: Create single chip data table
    power: supply: bq24190_charger: Add ti,bq24192i to devicetree table
    power: supply: bq24190_charger: Add input_current_limit property
    power: supply: Add power_supply_set_input_current_limit_from_supplier helper
    power: supply: max17042_battery: Fix compiler warning
    power: supply: core: Delete two error messages for a failed memory allocation in power_supply_check_supplies()
    power: supply: make device_attribute const
    power: supply: max17042_battery: Fix ACPI interrupt issues
    power: supply: max17042_battery: Add support for ACPI enumeration
    power: supply: lp8788: Make several arrays static const * const
    ...

    Linus Torvalds
     

08 Sep, 2017

1 commit

  • Pull MFD updates from Lee Jones:
    "New Drivers
    - RK805 Power Management IC (PMIC)
    - ROHM BD9571MWV-M MFD Power Management IC (PMIC)
    - Texas Instruments TPS68470 Power Management IC (PMIC) & LEDs

    New Device Support:
    - Add support for HiSilicon Hi6421v530 to hi6421-pmic-core
    - Add support for X-Powers AXP806 to axp20x
    - Add support for X-Powers AXP813 to axp20x
    - Add support for Intel Sunrise Point LPSS to intel-lpss-pci

    New Functionality:
    - Amend API to provide register layout; atmel-smc

    Fix-ups:
    - DT re-work; omap, nokia
    - Header file location change {I2C => MFD}; dm355evm_msp, tps65010
    - Fix chip ID formatting issue(s); rk808
    - Optionally register touchscreen devices; da9052-core
    - Documentation improvements; twl-core
    - Constification; rtsx_pcr, ab8500-core, da9055-i2c, da9052-spi
    - Drop unnecessary static declaration; max8925-i2c
    - Kconfig changes (missing deps and remove module support)
    - Slim down oversized licence statement; hi6421-pmic-core
    - Use managed resources (devm_*); lp87565
    - Supply proper error checking/handling; t7l66xb

    Bug Fixes:
    - Fix counter duplication issue; da9052-core
    - Fix potential NULL deference issue; max8998
    - Leave SPI-NOR write-protection bit alone; lpc_ich
    - Ensure device is put into reset during suspend; intel-lpss
    - Correct register offset variable size; omap-usb-tll"

    * tag 'mfd-next-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (61 commits)
    mfd: intel_soc_pmic: Differentiate between Bay and Cherry Trail CRC variants
    mfd: intel_soc_pmic: Export separate mfd-cell configs for BYT and CHT
    dt-bindings: mfd: Add bindings for ZII RAVE devices
    mfd: omap-usb-tll: Fix register offsets
    mfd: da9052: Constify spi_device_id
    mfd: intel-lpss: Put I2C and SPI controllers into reset state on suspend
    mfd: da9055: Constify i2c_device_id
    mfd: intel-lpss: Add missing PCI ID for Intel Sunrise Point LPSS devices
    mfd: t7l66xb: Handle return value of clk_prepare_enable
    mfd: Add ROHM BD9571MWV-M PMIC DT bindings
    mfd: intel_soc_pmic_chtwc: Turn Kconfig option into a bool
    mfd: lp87565: Convert to use devm_mfd_add_devices()
    mfd: Add support for TPS68470 device
    mfd: lpc_ich: Do not touch SPI-NOR write protection bit on Haswell/Broadwell
    mfd: syscon: atmel-smc: Add helper to retrieve register layout
    mfd: axp20x: Use correct platform device ID for many PEK
    dt-bindings: mfd: axp20x: Introduce bindings for AXP813
    mfd: axp20x: Add support for AXP813 PMIC
    dt-bindings: mfd: axp20x: Add AXP806 to supported list of chips
    mfd: Add ROHM BD9571MWV-M MFD PMIC driver
    ...

    Linus Torvalds
     

06 Sep, 2017

1 commit

  • Pull power management updates from Rafael Wysocki:
    "This time (again) cpufreq gets the majority of changes which mostly
    are driver updates (including a major consolidation of intel_pstate),
    some schedutil governor modifications and core cleanups.

    There also are some changes in the system suspend area, mostly related
    to diagnostics and debug messages plus some renames of things related
    to suspend-to-idle. One major change here is that suspend-to-idle is
    now going to be preferred over S3 on systems where the ACPI tables
    indicate to do so and provide requsite support (the Low Power Idle S0
    _DSM in particular). The system sleep documentation and the tools
    related to it are updated too.

    The rest is a few cpuidle changes (nothing major), devfreq updates,
    generic power domains (genpd) framework updates and a few assorted
    modifications elsewhere.

    Specifics:

    - Drop the P-state selection algorithm based on a PID controller from
    intel_pstate and make it use the same P-state selection method
    (based on the CPU load) for all types of systems in the active mode
    (Rafael Wysocki, Srinivas Pandruvada).

    - Rework the cpufreq core and governors to make it possible to take
    cross-CPU utilization updates into account and modify the schedutil
    governor to actually do so (Viresh Kumar).

    - Clean up the handling of transition latency information in the
    cpufreq core and untangle it from the information on which drivers
    cannot do dynamic frequency switching (Viresh Kumar).

    - Add support for new SoCs (MT2701/MT7623 and MT7622) to the mediatek
    cpufreq driver and update its DT bindings (Sean Wang).

    - Modify the cpufreq dt-platdev driver to autimatically create
    cpufreq devices for the new (v2) Operating Performance Points (OPP)
    DT bindings and update its whitelist of supported systems (Viresh
    Kumar, Shubhrajyoti Datta, Marc Gonzalez, Khiem Nguyen, Finley
    Xiao).

    - Add support for Ux500 to the cpufreq-dt driver and drop the
    obsolete dbx500 cpufreq driver (Linus Walleij, Arnd Bergmann).

    - Add new SoC (R8A7795) support to the cpufreq rcar driver (Khiem
    Nguyen).

    - Fix and clean up assorted issues in the cpufreq drivers and core
    (Arvind Yadav, Christophe Jaillet, Colin Ian King, Gustavo Silva,
    Julia Lawall, Leonard Crestez, Rob Herring, Sudeep Holla).

    - Update the IO-wait boost handling in the schedutil governor to make
    it less aggressive (Joel Fernandes).

    - Rework system suspend diagnostics to make it print fewer messages
    to the kernel log by default, add a sysfs knob to allow more
    suspend-related messages to be printed and add Low Power S0 Idle
    constraints checks to the ACPI suspend-to-idle code (Rafael
    Wysocki, Srinivas Pandruvada).

    - Prefer suspend-to-idle over S3 on ACPI-based systems with the
    ACPI_FADT_LOW_POWER_S0 flag set and the Low Power Idle S0 _DSM
    interface present in the ACPI tables (Rafael Wysocki).

    - Update documentation related to system sleep and rename a number of
    items in the code to make it cleare that they are related to
    suspend-to-idle (Rafael Wysocki).

    - Export a variable allowing device drivers to check the target
    system sleep state from the core system suspend code (Florian
    Fainelli).

    - Clean up the cpuidle subsystem to handle the polling state on x86
    in a more straightforward way and to use %pOF instead of full_name
    (Rafael Wysocki, Rob Herring).

    - Update the devfreq framework to fix and clean up a few minor issues
    (Chanwoo Choi, Rob Herring).

    - Extend diagnostics in the generic power domains (genpd) framework
    and clean it up slightly (Thara Gopinath, Rob Herring).

    - Fix and clean up a couple of issues in the operating performance
    points (OPP) framework (Viresh Kumar, Waldemar Rymarkiewicz).

    - Add support for RV1108 to the rockchip-io Adaptive Voltage Scaling
    (AVS) driver (David Wu).

    - Fix the usage of notifiers in CPU power management on some
    platforms (Alex Shi).

    - Update the pm-graph system suspend/hibernation and boot profiling
    utility (Todd Brandt).

    - Make it possible to run the cpupower utility without CPU0 (Prarit
    Bhargava)"

    * tag 'pm-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (87 commits)
    cpuidle: Make drivers initialize polling state
    cpuidle: Move polling state initialization code to separate file
    cpuidle: Eliminate the CPUIDLE_DRIVER_STATE_START symbol
    cpufreq: imx6q: Fix imx6sx low frequency support
    cpufreq: speedstep-lib: make several arrays static, makes code smaller
    PM: docs: Delete the obsolete states.txt document
    PM: docs: Describe high-level PM strategies and sleep states
    PM / devfreq: Fix memory leak when fail to register device
    PM / devfreq: Add dependency on PM_OPP
    PM / devfreq: Move private devfreq_update_stats() into devfreq
    PM / devfreq: Convert to using %pOF instead of full_name
    PM / AVS: rockchip-io: add io selectors and supplies for RV1108
    cpufreq: ti: Fix 'of_node_put' being called twice in error handling path
    cpufreq: dt-platdev: Drop few entries from whitelist
    cpufreq: dt-platdev: Automatically create cpufreq device with OPP v2
    ARM: ux500: don't select CPUFREQ_DT
    cpuidle: Convert to using %pOF instead of full_name
    cpufreq: Convert to using %pOF instead of full_name
    PM / Domains: Convert to using %pOF instead of full_name
    cpufreq: Cap the default transition delay value to 10 ms
    ...

    Linus Torvalds
     

04 Sep, 2017

1 commit

  • include/linux/i2c is not for client devices. Move the header file to a
    more appropriate location.

    Signed-off-by: Wolfram Sang
    Acked-by: Greg Kroah-Hartman
    Acked-by: Alexandre Belloni
    Acked-by: Mark Brown
    Acked-by: Sebastian Reichel
    Acked-by: Jonathan Cameron
    Acked-by: Dmitry Torokhov
    Acked-by: Kishon Vijay Abraham I
    Acked-by: Bartlomiej Zolnierkiewicz
    Acked-by: Thierry Reding
    Acked-by: Tony Lindgren
    Acked-by: Daniel Thompson
    Acked-by: Linus Walleij
    Acked-by: Guenter Roeck
    Signed-off-by: Lee Jones

    Wolfram Sang
     

31 Aug, 2017

2 commits

  • Tested on Pyra prototype with bq27421.

    Signed-off-by: H. Nikolaus Schaller
    Signed-off-by: Sebastian Reichel

    H. Nikolaus Schaller
     
  • On some devices the USB Type-C port power (USB PD 2.0) negotiation is
    done by a separate port-controller IC, while the current limit is
    controlled through another (charger) IC.

    It has been decided to model this by modelling the external Type-C
    power brick (adapter/charger) as a power-supply class device which
    supplies the charger-IC, with its voltage-now and current-max representing
    the negotiated voltage and max current draw.

    This commit adds support for this to the bq24190_charger driver by adding
    an external_power_changed callback and calling
    power_supply_set_input_current_limit_from_supplier from this callback.
    This callback will only get called if the bq24190 has a parent-supply.

    Note this replaces the functionality to get the current-limit from an
    extcon device, which will be removed in a follow-up commit.

    Signed-off-by: Hans de Goede
    Tony Lindgren
    Signed-off-by: Sebastian Reichel

    Hans de Goede
     

30 Aug, 2017

5 commits


29 Aug, 2017

7 commits

  • Support data memory update on BQ27425. Parameters from TI datasheets are also
    provided for BQ27500, 545, 421, 441, 621; however these are commented out,
    as they are not tested.

    Add BQ27XXX_O_CFGUP & _O_RAM for use in bq27xxx_chip_data[n].opts
    and by data memory update functions.

    Signed-off-by: Liam Breck
    Signed-off-by: Sebastian Reichel

    Liam Breck
     
  • For the existing features, these chips act like others already ID'd,
    so they had false but functional IDs. We will be adding features
    which require correct IDs, so the following IDs are added:
    BQ2752X, 531, 542, 546, 742, 425, 441, 621

    Chip-specific features are now tracked by BQ27XXX_O_* flags in di->opts.

    No functional changes to the driver.

    Signed-off-by: Liam Breck
    Signed-off-by: Sebastian Reichel

    Liam Breck
     
  • To support new features which require different data for each chip, we
    unify the bq27xxx_regs and bq27xxx_battery_props tables into a single one.

    No functional changes to the driver.

    Signed-off-by: Liam Breck
    Signed-off-by: Sebastian Reichel

    Liam Breck
     
  • bq24192i was previously only in ID table, so add it to DT table.

    Cc: Tony Lindgren
    Cc: Hans de Goede
    Signed-off-by: Liam Breck
    Acked-by: Tony Lindgren
    Signed-off-by: Sebastian Reichel

    Liam Breck
     
  • Export the input current limit of the charger as a
    POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT property on the charger
    power_supply class device.

    Signed-off-by: Hans de Goede
    Signed-off-by: Sebastian Reichel

    Hans de Goede
     
  • On some devices the USB Type-C port power (USB PD 2.0) negotiation is
    done by a separate port-controller IC, while the current limit is
    controlled through another (charger) IC.

    It has been decided to model this by modelling the external Type-C
    power brick (adapter/charger) as a power-supply class device which
    supplies the charger-IC, with its voltage-now and current-max representing
    the negotiated voltage and max current draw.

    This commit adds a power_supply_set_input_current_limit_from_supplier
    helper function which charger power-supply drivers can call to get
    the max-current from their supplier and have this applied
    through their set_property call-back to their input-current-limit.

    Signed-off-by: Hans de Goede
    Signed-off-by: Sebastian Reichel

    Hans de Goede
     
  • Fix drivers/power/supply/max17042_battery.c:1059:6:
    warning: 'acpi_id' may be used uninitialized in this function.

    No idea why my gcc version did not catch this.

    Reported-by: kbuild test robot
    Signed-off-by: Hans de Goede
    Signed-off-by: Sebastian Reichel

    Hans de Goede