27 Sep, 2022

1 commit

  • This is the 5.15.70 stable release

    * tag 'v5.15.70': (2444 commits)
    Linux 5.15.70
    ALSA: hda/sigmatel: Fix unused variable warning for beep power change
    cgroup: Add missing cpus_read_lock() to cgroup_attach_task_all()
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    arch/arm/boot/dts/imx6ul.dtsi
    arch/arm/mm/mmu.c
    arch/arm64/boot/dts/freescale/imx8mp-evk.dts
    drivers/gpu/drm/imx/dcss/dcss-kms.c
    drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
    drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.h
    drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
    drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
    drivers/soc/fsl/Kconfig
    drivers/soc/imx/gpcv2.c
    drivers/usb/dwc3/host.c
    net/dsa/slave.c
    sound/soc/fsl/imx-card.c

    Jason Liu
     

29 Jul, 2022

1 commit

  • [ Upstream commit 80192eff64eee9b3bc0594a47381937b94b9d65a ]

    of_find_matching_node_and_match() returns a node pointer with refcount
    incremented, we should use of_node_put() on it when not need anymore.
    Add missing of_node_put() to avoid refcount leak.

    Fixes: 0e545f57b708 ("power: reset: driver for the Versatile syscon reboot")
    Signed-off-by: Miaoqian Lin
    Reviewed-by: Linus Walleij
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Sasha Levin

    Miaoqian Lin
     

30 Jun, 2022

2 commits

  • This is the 5.15.50 stable release

    * tag 'v5.15.50': (1395 commits)
    Linux 5.15.50
    arm64: mm: Don't invalidate FROM_DEVICE buffers at start of DMA transfer
    serial: core: Initialize rs485 RTS polarity already on probe
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    drivers/bus/fsl-mc/fsl-mc-bus.c
    drivers/crypto/caam/ctrl.c
    drivers/pci/controller/dwc/pci-imx6.c
    drivers/spi/spi-fsl-qspi.c
    drivers/tty/serial/fsl_lpuart.c
    include/uapi/linux/dma-buf.h

    Jason Liu
     
  • This is the 5.15.41 stable release

    * tag 'v5.15.41': (1977 commits)
    Linux 5.15.41
    usb: gadget: uvc: allow for application to cleanly shutdown
    usb: gadget: uvc: rename function to be more consistent
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi
    arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi
    arch/arm64/configs/defconfig
    drivers/clk/imx/clk-imx8qxp-lpcg.c
    drivers/dma/imx-sdma.c
    drivers/gpu/drm/bridge/nwl-dsi.c
    drivers/mailbox/imx-mailbox.c
    drivers/net/phy/at803x.c
    drivers/tty/serial/fsl_lpuart.c
    security/keys/trusted-keys/trusted_core.c

    Jason Liu
     

15 Jun, 2022

2 commits

  • [ Upstream commit 58e4a2d27d3255e4e8c507fdc13734dccc9fc4c7 ]

    The extcon_get_extcon_dev() function returns error pointers on error,
    NULL when it's a -EPROBE_DEFER defer situation, and ERR_PTR(-ENODEV)
    when the CONFIG_EXTCON option is disabled. This is very complicated for
    the callers to handle and a number of them had bugs that would lead to
    an Oops.

    In real life, there are two things which prevented crashes. First,
    error pointers would only be returned if there was bug in the caller
    where they passed a NULL "extcon_name" and none of them do that.
    Second, only two out of the eight drivers will build when CONFIG_EXTCON
    is disabled.

    The normal way to write this would be to return -EPROBE_DEFER directly
    when appropriate and return NULL when CONFIG_EXTCON is disabled. Then
    the error handling is simple and just looks like:

    dev->edev = extcon_get_extcon_dev(acpi_dev_name(adev));
    if (IS_ERR(dev->edev))
    return PTR_ERR(dev->edev);

    For the two drivers which can build with CONFIG_EXTCON disabled, then
    extcon_get_extcon_dev() will now return NULL which is not treated as an
    error and the probe will continue successfully. Those two drivers are
    "typec_fusb302" and "max8997-battery". In the original code, the
    typec_fusb302 driver had an 800ms hang in tcpm_get_current_limit() but
    now that function is a no-op. For the max8997-battery driver everything
    should continue working as is.

    Signed-off-by: Dan Carpenter
    Reviewed-by: Hans de Goede
    Reviewed-by: Heikki Krogerus
    Reviewed-by: Guenter Roeck
    Acked-by: Sebastian Reichel
    Signed-off-by: Chanwoo Choi
    Signed-off-by: Sasha Levin

    Dan Carpenter
     
  • [ Upstream commit f61509a6f0b70f5bedea34efaf8065621689bd7a ]

    Some "T3 MRD" mini-PCs / HDMI-sticks without a battery use a different
    value then "5.11" for their DMI BIOS version field.

    Drop the BIOS version check so that the no-battery "T3 MRD" DMI quirk
    applies to these too.

    Fixes: 3a06b912a5ce ("power: supply: axp288_fuel_gauge: Make "T3 MRD" no_battery_list DMI entry more generic")
    Signed-off-by: Hans de Goede
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Sasha Levin

    Hans de Goede
     

14 Apr, 2022

2 commits

  • [ Upstream commit 5ac121b81b4051e7fc83d5b3456a5e499d5bd147 ]

    The AXP288's recommended and factory default Vhold value (minimum
    input voltage below which the input current draw will be reduced)
    is 4.4V. This lines up with other charger IC's such as the TI
    bq2419x/bq2429x series which use 4.36V or 4.44V.

    For some reason some BIOS-es initialize Vhold to 4.6V or even 4.7V
    which combined with the typical voltage drop over typically low
    wire gauge micro-USB cables leads to the input-current getting
    capped below 1A (with a 2A capable dedicated charger) based on Vhold.

    This leads to slow charging, or even to the device slowly discharging
    if the device is in heavy use.

    As the Linux AXP288 drivers use the builtin BC1.2 charger detection
    and send the input-current-limit according to the detected charger
    there really is no reason not to use the recommended 4.4V Vhold.

    Set Vhold to 4.4V to fix the slow charging issue on various devices.

    There is one exception, the special-case of the HP X2 2-in-1s which
    combine this BC1.2 capable PMIC with a Type-C port and a 5V/3A factory
    provided charger with a Type-C plug which does not do BC1.2. These
    have their input-current-limit hardcoded to 3A (like under Windows)
    and use a higher Vhold on purpose to limit the current when used
    with other chargers. To avoid touching Vhold on these HP X2 laptops
    the code setting Vhold is added to an else branch of the if checking
    for these models.

    Note this also fixes the sofar unused VBUS_ISPOUT_VHOLD_SET_MASK
    define, which was wrong.

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

    Hans de Goede
     
  • [ Upstream commit d4f408cdcd26921c1268cb8dcbe8ffb6faf837f3 ]

    As stated in [1], negative current values are used for discharging
    batteries.

    AXP PMICs internally have two different ADC channels for shunt current
    measurement: one used during charging and one during discharging.
    The values reported by these ADCs are unsigned.
    While the driver properly selects ADC channel to get the data from,
    it doesn't apply negative sign when reporting discharging current.

    [1] Documentation/ABI/testing/sysfs-class-power

    Signed-off-by: Evgeny Boger
    Acked-by: Chen-Yu Tsai
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Sasha Levin

    Evgeny Boger
     

08 Apr, 2022

7 commits

  • [ Upstream commit c22fca40522e2be8af168f3087d87d85e404ea72 ]

    The HRTimer in the AB8500 charging code is using CLOCK_REALTIME
    to set an alarm some hours forward in time +/- 5 min for a safety
    timer.

    I have observed that this will sometimes fire sporadically
    early when charging a battery with the result that
    charging stops.

    As CLOCK_REALTIME can be subject to adjustments of time from
    sources such as NTP, this cannot be trusted and will likely
    for example fire events if the clock is set forward some hours
    by say NTP.

    Use CLOCK_MONOTONIC as indicated in other instances and the
    problem goes away. Also initialize the timer to REL mode
    as this is what will be used later.

    Fixes: 257107ae6b9b ("ab8500-chargalg: Use hrtimer")
    Cc: Lee Jones
    Suggested-by: Matti Vaittinen
    Signed-off-by: Linus Walleij
    Reviewed-by: Matti Vaittinen
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Sasha Levin

    Linus Walleij
     
  • [ Upstream commit 6dee930f6f6776d1e5a7edf542c6863b47d9f078 ]

    In free_charger_irq(), there is no free for 'WM8350_IRQ_CHG_FAST_RDY'.
    Therefore, it should be better to add it in order to avoid the memory leak.

    Fixes: 14431aa0c5a4 ("power_supply: Add support for WM8350 PMU")
    Signed-off-by: Jiasheng Jiang
    Acked-by: Charles Keepax
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Sasha Levin

    Jiasheng Jiang
     
  • [ Upstream commit b0b14b5ba11bec56fad344a4a0b2e16449cc8b94 ]

    As the potential failure of the wm8350_register_irq(),
    it should be better to check it and return error if fails.
    Also, use 'free_' in order to avoid same code.

    Fixes: 14431aa0c5a4 ("power_supply: Add support for WM8350 PMU")
    Signed-off-by: Jiasheng Jiang
    Acked-by: Charles Keepax
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Sasha Levin

    Jiasheng Jiang
     
  • [ Upstream commit f7731754fdce33dad19be746f647d6ac47c5d695 ]

    The datasheet says that the BQ24190_REG_POC_CHG_CONFIG bits can
    have a value of either 10(0x2) or 11(0x3) for OTG (5V boost regulator)
    mode.

    Sofar bq24190_vbus_is_enabled() was only checking for 10 but some BIOS-es
    uses 11 when enabling the regulator at boot.

    Make bq24190_vbus_is_enabled() also check for 11 so that it does not
    wrongly returns false when the bits are set to 11.

    Fixes: 66b6bef2c4e0 ("power: supply: bq24190_charger: Export 5V boost converter as regulator")
    Cc: Bastien Nocera
    Signed-off-by: Hans de Goede
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Sasha Levin

    Hans de Goede
     
  • [ Upstream commit de85193cff0d94d030a53656d8fcc41794807bef ]

    This driver can use an interrupt or polling in order get the charger's
    status.

    When using polling, a delayed work is used.

    However, the remove() function unconditionally call
    cancel_delayed_work_sync(), even if the delayed work is not used and is not
    initialized.

    In order to fix it, use devm_delayed_work_autocancel() and remove the now
    useless remove() function.

    Fixes: feb583e37f8a ("power: supply: add sbs-charger driver")
    Signed-off-by: Christophe JAILLET
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Sasha Levin

    Christophe JAILLET
     
  • [ Upstream commit 6a4760463dbc6b603690938c468839985189ce0a ]

    kobject_init_and_add() takes reference even when it fails.
    According to the doc of kobject_init_and_add():

    If this function returns an error, kobject_put() must be called to
    properly clean up the memory associated with the object.

    Fix memory leak by calling kobject_put().

    Fixes: 8c0984e5a753 ("power: move power supply drivers to power/supply")
    Signed-off-by: Miaoqian Lin
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Sasha Levin

    Miaoqian Lin
     
  • [ Upstream commit ba18dad0fb880cd29aa97b6b75560ef14d1061ba ]

    platform_get_irq() returns negative error number instead 0 on failure.
    And the doc of platform_get_irq() provides a usage example:

    int irq = platform_get_irq(pdev, 0);
    if (irq < 0)
    return irq;

    Fix the check of return value to catch errors correctly.

    Fixes: f7a388d6cd1c ("power: reset: Add a driver for the Gemini poweroff")
    Signed-off-by: Miaoqian Lin
    Reviewed-by: Linus Walleij
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Sasha Levin

    Miaoqian Lin
     

11 Mar, 2022

1 commit

  • This is the 5.15.27 stable release

    * tag 'v5.15.27': (3069 commits)
    Linux 5.15.27
    hamradio: fix macro redefine warning
    KVM: x86/mmu: Passing up the error state of mmu_alloc_shadow_roots()
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    arch/arm/boot/dts/imx7ulp.dtsi
    arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts
    arch/arm64/boot/dts/freescale/imx8mq.dtsi
    drivers/dma-buf/heaps/cma_heap.c
    drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
    drivers/gpu/drm/mxsfb/mxsfb_kms.c
    drivers/mmc/host/sdhci-esdhc-imx.c
    drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
    drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
    drivers/rpmsg/rpmsg_char.c
    drivers/soc/imx/gpcv2.c
    drivers/thermal/imx_thermal.c

    Jason Liu
     

27 Jan, 2022

1 commit

  • [ Upstream commit 1c1348bf056dee665760a3bd1cd30b0be7554fc2 ]

    The return value of platform_get_resource() needs to be checked.
    To avoid use of error pointer in case that there is no suitable
    resource.

    Fixes: d28c74c10751 ("power: reset: add driver for mt6323 poweroff")
    Signed-off-by: Jiasheng Jiang
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Sasha Levin

    Jiasheng Jiang
     

11 Jan, 2022

3 commits

  • commit 80211be1b9dec04cc2805d3d81e2091ecac289a1 upstream.

    Instead of one shot run of ADC at beginning of charging, run continuous
    conversion to ensure that all charging-related values are monitored
    properly (input voltage, input current, themperature etc.).

    Signed-off-by: Yauhen Kharuzhy
    Reviewed-by: Hans de Goede
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Greg Kroah-Hartman

    Yauhen Kharuzhy
     
  • commit 644106cdb89844be2496b21175b7c0c2e0fab381 upstream.

    A new commit in LLVM causes an error on the use of 'long double' when
    '-mno-x87' is used, which the kernel does through an alias,
    '-mno-80387' (see the LLVM commit below for more details around why it
    does this).

    drivers/power/reset/ltc2952-poweroff.c:162:28: error: expression requires 'long double' type support, but target 'x86_64-unknown-linux-gnu' does not support it
    data->wde_interval = 300L * 1E6L;
    ^
    drivers/power/reset/ltc2952-poweroff.c:162:21: error: expression requires 'long double' type support, but target 'x86_64-unknown-linux-gnu' does not support it
    data->wde_interval = 300L * 1E6L;
    ^
    drivers/power/reset/ltc2952-poweroff.c:163:41: error: expression requires 'long double' type support, but target 'x86_64-unknown-linux-gnu' does not support it
    data->trigger_delay = ktime_set(2, 500L*1E6L);
    ^
    3 errors generated.

    This happens due to the use of a 'long double' literal. The 'E6' part of
    '1E6L' causes the literal to be a 'double' then the 'L' suffix promotes
    it to 'long double'.

    There is no visible reason for floating point values in this driver, as
    the values are only assigned to integer types. Use NSEC_PER_MSEC, which
    is the same integer value as '1E6L', to avoid changing functionality but
    fix the error.

    Fixes: 6647156c00cc ("power: reset: add LTC2952 poweroff driver")
    Link: https://github.com/ClangBuiltLinux/linux/issues/1497
    Link: https://github.com/llvm/llvm-project/commit/a8083d42b1c346e21623a1d36d1f0cadd7801d83
    Signed-off-by: Nathan Chancellor
    Reviewed-by: Nick Desaulniers
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Greg Kroah-Hartman

    Nathan Chancellor
     
  • commit 51c7b6a0398f54b9120795796a4cff4fc9634f7d upstream.

    We should not go on looking for more capacity tables after
    we realize we have looked at the last one in
    power_supply_find_ocv2cap_table().

    Fixes: 3afb50d7125b ("power: supply: core: Add some helpers to use the battery OCV capacity table")
    Cc: Chunyan Zhang
    Cc: Baolin Wang
    Signed-off-by: Linus Walleij
    Reviewed-by: Baolin Wang
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Greg Kroah-Hartman

    Linus Walleij
     

01 Dec, 2021

1 commit

  • This is the 5.15.5 stable release

    * tag 'v5.15.5': (1261 commits)
    Linux 5.15.5
    ALSA: hda: hdac_stream: fix potential locking issue in snd_hdac_stream_assign()
    ALSA: hda: hdac_ext_stream: fix potential locking issues
    ...

    Conflicts:
    arch/powerpc/platforms/85xx/Makefile
    drivers/crypto/caam/caampkc.c
    drivers/gpu/drm/bridge/nwl-dsi.c
    drivers/gpu/drm/imx/imx-drm-core.c
    drivers/remoteproc/imx_rproc.c
    drivers/soc/imx/gpcv2.c
    include/linux/rpmsg.h

    Jason Liu
     

19 Nov, 2021

7 commits

  • [ Upstream commit cdf10ffe8f626d8a2edc354abf063df0078b2d71 ]

    When registering the IRQ handler fails, do not just return the error code,
    this will free the devm_kzalloc()-ed data struct while leaving the queued
    work queued and the registered power_supply registered with both of them
    now pointing to free-ed memory, resulting in various kernel crashes
    soon afterwards.

    Instead properly tear-down things on IRQ handler register errors.

    Fixes: 703df6c09795 ("power: bq27xxx_battery: Reorganize I2C into a module")
    Cc: Andrew F. Davis
    Signed-off-by: Hans de Goede
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Sasha Levin

    Hans de Goede
     
  • [ Upstream commit 1d422ecfc48ee683ae1ccc9217764f6310c0ffce ]

    Add check the return value of devm_regmap_init_i2c(), otherwise
    later access may cause null-ptr-deref as follows:

    KASAN: null-ptr-deref in range [0x0000000000000360-0x0000000000000367]
    RIP: 0010:regmap_read+0x33/0x170
    Call Trace:
    max17040_probe+0x61b/0xff0 [max17040_battery]
    ? write_comp_data+0x2a/0x90
    ? max17040_set_property+0x1d0/0x1d0 [max17040_battery]
    ? tracer_hardirqs_on+0x33/0x520
    ? __sanitizer_cov_trace_pc+0x1d/0x50
    ? _raw_spin_unlock_irqrestore+0x4b/0x60
    ? trace_hardirqs_on+0x63/0x2d0
    ? write_comp_data+0x2a/0x90
    ? __sanitizer_cov_trace_pc+0x1d/0x50
    ? max17040_set_property+0x1d0/0x1d0 [max17040_battery]
    i2c_device_probe+0xa31/0xbe0

    Fixes: 6455a8a84bdf ("power: supply: max17040: Use regmap i2c")
    Reported-by: Hulk Robot
    Signed-off-by: Yang Yingliang
    Reviewed-by: Krzysztof Kozlowski
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Sasha Levin

    Yang Yingliang
     
  • [ Upstream commit bf895295e9a73411889816f1a0c1f4f1a2d9c678 ]

    Currently the rt5033_battery driver provides voltage values in mV. It
    should be µV as stated in Documentation/power/power_supply_class.rst.

    Fixes: b847dd96e659 ("power: rt5033_battery: Add RT5033 Fuel gauge device driver")
    Cc: Beomho Seo
    Cc: Chanwoo Choi
    Signed-off-by: Jakob Hauser
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Sasha Levin

    Jakob Hauser
     
  • [ Upstream commit f558c8072c3461b65c12c0068b108f78cebc8246 ]

    devm_of_iomap() returns error code or valid pointer. Check its return
    value with IS_ERR().

    Fixes: bd3127733f2c ("power: reset: at91-reset: use devm_of_iomap")
    Reported-by: Cristian Birsan
    Signed-off-by: Claudiu Beznea
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Sasha Levin

    Claudiu Beznea
     
  • commit 0cf48167b87e388fa1268c9fe6d2443ae7f43d8a upstream.

    The gauge requires us to clear the status bits manually for some alerts
    to be properly dismissed. Previously the IRQ was configured to react only
    on falling edge, which wasn't technically correct (the ALRT line is active
    low), but it had a happy side-effect of preventing interrupt storms
    on uncleared alerts from happening.

    Fixes: 7fbf6b731bca ("power: supply: max17042: Do not enforce (incorrect) interrupt trigger type")
    Cc:
    Signed-off-by: Sebastian Krzyszkowiak
    Reviewed-by: Krzysztof Kozlowski
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Greg Kroah-Hartman

    Sebastian Krzyszkowiak
     
  • commit 223a3b82834f036a62aa831f67cbf1f1d644c6e2 upstream.

    On Galaxy S3 (i9300/i9305), which has the max17047 fuel gauge and no
    current sense resistor (rsns), the RepSOC register does not provide an
    accurate state of charge value. The reported value is wrong, and does
    not change over time. VFSOC however, which uses the voltage fuel gauge
    to determine the state of charge, always shows an accurate value.

    For devices without current sense, VFSOC is already used for the
    soc-alert (0x0003 is written to MiscCFG register), so with this change
    the source of the alert and the PROP_CAPACITY value match.

    Fixes: 359ab9f5b154 ("power_supply: Add MAX17042 Fuel Gauge Driver")
    Cc:
    Reviewed-by: Krzysztof Kozlowski
    Suggested-by: Wolfgang Wiedmeyer
    Signed-off-by: Henrik Grimler
    Reviewed-by: Hans de Goede
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Greg Kroah-Hartman

    Henrik Grimler
     
  • commit e660dbb68c6b3f7b9eb8b9775846a44f9798b719 upstream.

    max17042_set_soc_threshold gets called with offset set to 1, which means
    that minimum threshold value would underflow once SOC got down to 0,
    causing invalid alerts from the gauge.

    Fixes: e5f3872d2044 ("max17042: Add support for signalling change in SOC")
    Cc:
    Signed-off-by: Sebastian Krzyszkowiak
    Reviewed-by: Krzysztof Kozlowski
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Greg Kroah-Hartman

    Sebastian Krzyszkowiak
     

02 Nov, 2021

4 commits

  • part2 of commit(b4568bee5d2a11d55fbd6272297e0ff67ebac941).
    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
    Signed-off-by: Vipul Kumar
    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)
    Signed-off-by: Vipul Kumar
    (cherry picked from commit 52692baf477ebd3a025999001e4a0d9a8b81e11b)

    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)
    Signed-off-by: Vipul Kumar
    (cherry picked from commit c00d547719c695c7ff02180edaf58b90344d419c)

    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
    TODO: checkpatch warnings
    Signed-off-by: Vipul Kumar
    (cherry picked from commit cf4e6e09dd3d436fa63d19f0ae1ee391cdb7544d)

    Robin Gong
     

31 Aug, 2021

1 commit

  • Pull power supply and reset updates from Sebastian Reichel:
    "Battery/charger related:
    - cros-peripheral-charger: new driver
    - mt6360-charger: new driver
    - simple-battery: support reading chemistry info
    - max17042-battery: add max77849 support
    - sbs-battery: add time_to_empty_now support
    - smb347-charger: prepare USB OTG support
    - rn5t618: add voltage_now support
    - axp288: cleanup & optimizations
    - max17042_battery: cleanups
    - ab8500: cleanups
    - misc minor cleanups and DT binding fixes

    reset related:
    - tps65086-restart: new driver
    - linkstation-poweroff: support NETGEAR ReadyNAS Duo v2"

    * tag 'for-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (51 commits)
    power: supply: core: Fix parsing of battery chemistry/technology
    power: supply: max17042_battery: log SOC threshold using debug log level
    power: supply: max17042_battery: more robust chip type checks
    power: supply: max17042_battery: fix typo in MAx17042_TOFF
    power: supply: max17042_battery: clean up MAX17055_V_empty
    power: supply: smb347-charger: Implement USB VBUS regulator
    power: supply: smb347-charger: Add missing pin control activation
    power: supply: smb347-charger: Utilize generic regmap caching
    power: supply: smb347-charger: Make smb347_set_writable() IRQ-safe
    dt-bindings: power: supply: smb347-charger: Document USB VBUS regulator
    power: reset: Add TPS65086 restart driver
    dt-bindings: power: supply: max17042: describe interrupt
    power: supply: max17042: remove duplicated STATUS bit defines
    power: supply: max17042: handle fails of reading status register
    power: supply: core: Parse battery chemistry/technology
    dt-bindings: power: Extend battery bindings with chemistry
    power: reset: linkstation-poweroff: add new device
    power: reset: linkstation-poweroff: prepare for new devices
    power: supply: bq24735: reorganize ChargeOption command macros
    power: supply: rn5t618: Add voltage_now property
    ...

    Linus Torvalds
     

21 Aug, 2021

1 commit

  • The power_supply_get_battery_info() fails if device-chemistry property
    is missing in a device-tree because error variable is propagated to the
    final return of the function, fix it.

    Fixes: 4eef766b7d4d ("power: supply: core: Parse battery chemistry/technology")
    Signed-off-by: Dmitry Osipenko
    Reviewed-by: Linus Walleij
    Signed-off-by: Sebastian Reichel

    Dmitry Osipenko
     

17 Aug, 2021

4 commits


16 Aug, 2021

2 commits

  • SMB347 can supply power to USB VBUS, implement the USB VBUS regulator.
    USB VBUS needs to be powered for switching OTG-cable USB port into host
    mode.

    Signed-off-by: Dmitry Osipenko
    Signed-off-by: Sebastian Reichel

    Dmitry Osipenko
     
  • Pin control needs to be activated by setting the enable bit, otherwise
    hardware rejects all pin changes. Previously this stayed unnoticed on
    Nexus 7 because pin control was enabled by default after rebooting from
    downstream kernel, which uses driver that enables the bit and charger
    registers are non-volatile until power supply (battery) is disconnected.
    Configure the pin control enable bit. This fixes the potentially
    never-enabled charging on devices that use pin control.

    Signed-off-by: Dmitry Osipenko
    Signed-off-by: Sebastian Reichel

    Dmitry Osipenko