23 Oct, 2020

1 commit

  • All avs drivers have now been moved to their corresponding soc specific
    directories. Additionally, they don't depend on the POWER_AVS Kconfig
    anymore. Therefore, let's simply drop the drivers/power/avs directory
    altogether.

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

    Ulf Hansson
     

21 May, 2019

1 commit


11 Aug, 2016

1 commit


27 Jul, 2016

1 commit

  • Pull power supply and reset updates from Sebastian Reichel:
    - introduce reboot mode driver
    - add DT support to max8903
    - add power supply support for axp221
    - misc fixes

    * tag 'for-v4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply:
    power: reset: add reboot mode driver
    dt-bindings: power: reset: add document for reboot-mode driver
    power_supply: fix return value of get_property
    power: qcom_smbb: Make an extcon for usb cable detection
    max8903: adds support for initiation via device tree
    max8903: adds documentation for device tree bindings.
    max8903: remove unnecessary 'out of memory' error message.
    max8903: removes non zero validity checks on gpios.
    max8903: adds requesting of gpios.
    max8903: cleans up confusing relationship between dc_valid, dok and dcm.
    max8903: store pointer to pdata instead of copying it.
    power_supply: bq27xxx_battery: Group register mappings into one table
    docs: Move brcm,bcm21664-resetmgr.txt
    power/reset: make syscon_poweroff() static
    power: axp20x_usb: Add support for usb power-supply on axp22x pmics
    power_supply: bq27xxx_battery: Index register numbers by enum
    power_supply: bq27xxx_battery: Fix copy/paste error in header comment
    MAINTAINERS: Add file patterns for power supply device tree bindings
    power: reset: keystone: Enable COMPILE_TEST

    Linus Torvalds
     

30 Jun, 2016

1 commit

  • On these PMICs the usb cable connection/disconnection is
    indicated by the usb-valid interrupt being high or low
    respectively. Let's make an extcon for that, so we can notify usb
    drivers of the cable state.

    Cc: Bjorn Andersson
    Cc: Chanwoo Choi
    Signed-off-by: Stephen Boyd
    Reviewed-by: Chanwoo Choi
    Signed-off-by: Sebastian Reichel

    Stephen Boyd
     

21 Jun, 2016

1 commit

  • instead of defining all functions as static inlines,
    let's move them to udc-core and export them with
    EXPORT_SYMBOL_GPL, that way we can make sure that
    only GPL drivers will use them.

    As a side effect, it'll be nicer to add tracepoints
    to the gadget API.

    While at that, also fix Kconfig dependencies to
    avoid randconfig build failures.

    Acked-By: Sebastian Reichel
    Acked-by: Peter Chen
    Signed-off-by: Felipe Balbi

    Felipe Balbi
     

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
     

08 Dec, 2015

1 commit

  • Currently the reset/power off handlers (POWER_RESET) and Adaptive Voltage
    Scaling class (POWER_AVS) are not built when POWER_SUPPLY is disabled.
    The POWER_RESET is also not visible in drivers main section of config.

    However they do not really depend on power supply so they can be built
    always. The objects for power supply drivers already depend on
    particular Kconfig symbols so there is no need for any changes in
    drivers/power/Makefile.

    This allows selecting POWER_RESET from main drivers config section and
    fixes following build warning (encountered on ARM exynos defconfig when
    POWER_SUPPLY is disabled manually):

    warning: (ARCH_HISI && ARCH_INTEGRATOR && ARCH_EXYNOS && ARCH_VEXPRESS && REALVIEW_DT) selects POWER_RESET which has unmet direct dependencies (POWER_SUPPLY)
    warning: (ARCH_EXYNOS) selects POWER_RESET_SYSCON which has unmet direct dependencies (POWER_SUPPLY && POWER_RESET && OF)
    warning: (ARCH_EXYNOS) selects POWER_RESET_SYSCON_POWEROFF which has unmet direct dependencies (POWER_SUPPLY && POWER_RESET && OF)

    Reported-by: Pavel Fedin
    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Sebastian Reichel

    Krzysztof Kozlowski
     

05 Dec, 2015

1 commit


07 Nov, 2015

1 commit

  • Pull MFD updates from Lee Jones:
    "New Device Support:
    - Add support for 88pm860; 88pm80x
    - Add support for 24c08 EEPROM; at24
    - Add support for Broxton Whiskey Cove; intel*
    - Add support for RTS522A; rts5227
    - Add support for I2C devices; intel_quark_i2c_gpio

    New Functionality:
    - Add microphone support; arizona
    - Add general purpose switch support; arizona
    - Add fuel-gauge support; da9150-core
    - Add shutdown support; sec-core
    - Add charger support; tps65217
    - Add flexible serial communication unit support; atmel-flexcom
    - Add power button support; axp20x
    - Add led-flash support; rt5033

    Core Frameworks:
    - Supply a generic macro for defining Regmap IRQs
    - Rework ACPI child device matching

    Fix-ups:
    - Use Regmap to access registers; tps6105x
    - Use DEFINE_RES_IRQ_NAMED() macro; da9150
    - Re-arrange device registration order; intel_quark_i2c_gpio
    - Allow OF matching; cros_ec_i2c, atmel-hlcdc, hi6421-pmic, max8997, sm501
    - Handle deferred probe; twl6040
    - Improve accuracy of headphone detect; arizona
    - Unnecessary MODULE_ALIAS() removal; bcm590xx, rt5033
    - Remove unused code; htc-i2cpld, arizona, pcf50633-irq, sec-core
    - Simplify code; kempld, rts5209, da903x, lm3533, da9052, arizona
    - Remove #iffery; arizona
    - DT binding adaptions; many

    Bug Fixes:
    - Fix possible NULL pointer dereference; wm831x, tps6105x
    - Fix 64bit bug; intel_soc_pmic_bxtwc
    - Fix signedness issue; arizona"

    * tag 'mfd-for-linus-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (73 commits)
    bindings: mfd: s2mps11: Add documentation for s2mps15 PMIC
    mfd: sec-core: Remove unused s2mpu02-rtc and s2mpu02-clk children
    extcon: arizona: Add extcon specific device tree binding document
    MAINTAINERS: Add binding docs for Cirrus Logic/Wolfson Arizona devices
    mfd: arizona: Remove bindings covered in new subsystem specific docs
    mfd: rt5033: Add RT5033 Flash led sub device
    mfd: lpss: Add Intel Broxton PCI IDs
    mfd: lpss: Add Broxton ACPI IDs
    mfd: arizona: Signedness bug in arizona_runtime_suspend()
    mfd: axp20x: Add a cell for the power button part of the, axp288 PMICs
    mfd: dt-bindings: Document pulled down WRSTBI pin on S2MPS1X
    mfd: sec-core: Disable buck voltage reset on watchdog falling edge
    mfd: sec-core: Dump PMIC revision to find out the HW
    mfd: arizona: Use correct type ID for device tree config
    mfd: arizona: Remove use of codec build config #ifdefs
    mfd: arizona: Simplify adding subdevices
    mfd: arizona: Downgrade type mismatch messages to dev_warn
    mfd: arizona: Factor out checking of jack detection state
    mfd: arizona: Factor out DCVDD isolation control
    mfd: Make TPS6105X select REGMAP_I2C
    ...

    Linus Torvalds
     

19 Oct, 2015

1 commit


16 Oct, 2015

1 commit


13 Oct, 2015

1 commit


29 Sep, 2015

1 commit

  • This patch adds basic support for bq24250 and bq24251 which are very
    similar to the bq24257 the driver was originally written for. Basic
    support means the ability to select a device through Kconfig, DT and
    ACPI, an instance variable allowing to check which chip is active, and
    the reporting back of the selected device through the model_name power
    supply sysfs property.

    This patch by itself is not sufficient to actually use those two added
    devices in a real-world setting due to some feature differences which
    are addressed by other patches in this series.

    Signed-off-by: Andreas Dannenberg
    Reviewed-by: Krzysztof Kozlowski
    Signed-off-by: Sebastian Reichel

    Andreas Dannenberg
     

25 Sep, 2015

1 commit

  • This patch adds support for the tps65217 charger driver. This driver is
    responsible for controlling the charger aspect of the tps65217 mfd.
    Currently, this mainly consists of turning on and off the charger, but
    some other features of the charger can be supported through this driver.

    Signed-off-by: Enric Balletbo i Serra
    Signed-off-by: Sebastian Reichel

    Enric Balletbo i Serra
     

23 Sep, 2015

1 commit

  • Rename functions that are used by multiple devices. New devices
    have been added and the function names and driver name are no longer
    general enough for the functionality they provide.

    Signed-off-by: Andrew F. Davis
    Acked-by: Tony Lindgren
    Acked-by: GUAN Xuetao
    Signed-off-by: Sebastian Reichel

    Andrew F. Davis
     

22 Sep, 2015

2 commits

  • Add the Qualcomm Switch-Mode Battery Charger and Boost driver, found in
    pm8941.

    Signed-off-by: Courtney Cavin
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Sebastian Reichel

    Courtney Cavin
     
  • This adds a driver for the usb power_supply bits of the axp20x PMICs.

    I initially started writing my own driver, before coming aware of
    Bruno Prémont's excellent earlier RFC with a driver for this.

    My driver was lacking CURRENT_MAX and VOLTAGE_MIN support Bruno's
    drvier has, so I've copied the code for those from his driver.

    Note that the AC-power-supply and battery charger bits will need separate
    drivers. Each one needs its own devictree child-node so that other
    devicetree nodes can reference the right power-supply, and thus each one
    will get its own mfd-cell / platform_device and platform-driver.

    Cc: Bruno Prémont
    Acked-by: Lee Jones
    Signed-off-by: Bruno Prémont
    Signed-off-by: Hans de Goede
    Signed-off-by: Sebastian Reichel

    Hans de Goede
     

05 Aug, 2015

1 commit

  • The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is
    not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer
    functionality only, can still be compiled if GPIOLIB is not enabled.

    Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where
    appropriate.

    Signed-off-by: Geert Uytterhoeven
    Acked-by: Linus Walleij
    Signed-off-by: Sebastian Reichel

    Geert Uytterhoeven
     

30 May, 2015

1 commit


24 May, 2015

3 commits


08 Mar, 2015

1 commit

  • New power_supply driver at driver/power which interfaces with the
    axp20x mfd driver as a cell. Provides battery info, monitors for
    changes, and generates alerts on temperature and capacity issues

    Signed-off-by: Todd Brandt
    Acked-by: Jacob Pan
    Signed-off-by: Sebastian Reichel

    Todd Brandt
     

26 Feb, 2015

1 commit


22 Jan, 2015

3 commits

  • Both the LTC2941 and LTC2943 measure battery capacity.
    The LTC2943 is compatible with the LTC2941, it adds voltage and
    temperature monitoring, and uses a slightly different conversion
    formula for the charge counter.

    To avoid confusion with e.g. the LTC2945, the driver is called
    LTC2941 instead of LTC294X.

    v2: Fix units of measurement: uV, uA and centidegrees.
    v3: Correctly set configuration register. Allow negative values
    for the sense resistor.
    v4: Run checkpatch.pl and fix all errors and warnings.
    v5: Prefix "lltc," to devicetree properties.

    Signed-off-by: Mike Looijmans
    [ removed .owner field ]
    Signed-off-by: Sebastian Reichel

    Mike Looijmans
     
  • To guerantee proper charing and managing batteries even in suspend,
    charger-manager has used rtc device with rtc framework interface.
    However, it is better to use alarmtimer for cleaner and more appropriate
    operation.
    This patch makes driver to use alarmtimer for polling work in suspend and
    removes all deprecated codes related with using rtc interface.

    Signed-off-by: Jonghwa Lee
    Signed-off-by: Sebastian Reichel

    Jonghwa Lee
     
  • This is only a small clean-up. The driver can be built without SYSFS
    as there exist stubs for used functions.

    Signed-off-by: Karol Wrona
    Reviewed-by: Krzysztof Kozlowski
    Signed-off-by: Sebastian Reichel

    Karol Wrona
     

20 Jan, 2015

2 commits

  • Add new driver for Maxim 77693 switch-mode charger (part of max77693
    MFD driver) providing power supply class information to userspace.

    The charger has +20V tolerant input. Current input can be set from 0 to
    2.58 A. The charger can deliver up to 2.1 A to the battery or 3.5 A to
    the system (when supplying additional current from battery to system).

    The driver is configured through DTS (battery and system related
    settings) and sysfs entries (timers and top-off charging threshold).

    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Sebastian Reichel

    Krzysztof Kozlowski
     
  • This patch adds device driver of Richtek PMIC.
    The driver support battery fuel gauge. Fuel gauge calculates and determines the
    battery state of charge (SOC) according to battery open circuit voltage (OCV).
    Also, this driver provides battery average voltage, voltage and battery present
    property.

    Cc: Sebastian Reichel
    Cc: Dmitry Eremin-Solenikov
    Cc: David Woodhouse
    Signed-off-by: Beomho Seo
    Acked-by: Chanwoo Choi
    Signed-off-by: Sebastian Reichel

    Beomho Seo
     

25 Sep, 2014

1 commit

  • Make the max14577 charger driver depending on SYSFS instead selecting
    it. This fixes warning on x86_64 with allmodconfig:

    scripts/kconfig/conf --allmodconfig Kconfig
    fs/sysfs/Kconfig:1:error: recursive dependency detected!
    fs/sysfs/Kconfig:1: symbol SYSFS is selected by CHARGER_MAX14577
    drivers/power/Kconfig:327: symbol CHARGER_MAX14577 depends on POWER_SUPPLY
    drivers/power/Kconfig:1: symbol POWER_SUPPLY is selected by HID_SONY
    drivers/hid/Kconfig:638: symbol HID_SONY depends on NEW_LEDS
    drivers/leds/Kconfig:8: symbol NEW_LEDS is selected by SENSORS_APPLESMC
    drivers/hwmon/Kconfig:299: symbol SENSORS_APPLESMC depends on HWMON
    drivers/hwmon/Kconfig:5: symbol HWMON is selected by EEEPC_LAPTOP
    drivers/platform/x86/Kconfig:496: symbol EEEPC_LAPTOP depends on HOTPLUG_PCI
    drivers/pci/hotplug/Kconfig:5: symbol HOTPLUG_PCI depends on SYSFS

    Signed-off-by: Krzysztof Kozlowski
    Reported-by: Stephen Rothwell
    Signed-off-by: Sebastian Reichel

    Krzysztof Kozlowski
     

24 Sep, 2014

2 commits

  • Remove hard-coded values for:
    - Fast Charge current,
    - End Of Charge current,
    - Fast Charge timer,
    - Overvoltage Protection Threshold,
    - Battery Constant Voltage,
    and use DTS or sysfs to configure them. This allows using the max14577 charger
    driver with different batteries.

    Now the charger driver requires valid configuration data from DTS. In
    case of wrong configuration data it fails during probe.

    The fast charge timer is configured through sysfs entry.

    Signed-off-by: Krzysztof Kozlowski
    Acked-by: Andrew Morton
    Signed-off-by: Lee Jones

    Krzysztof Kozlowski
     
  • Add support for MAX77836 charger to the max14577 driver. The MAX77836
    charger is almost the same as 14577 model except:
    - No dead-battery detection;
    - Support for special charger (like in MAX77693);
    - Support for DX over-voltage protection (like in MAX77693);
    - Lower values of charging current (two times lower current for
    slow/fast charge, much lower EOC current);
    - Slightly different values in ChgTyp field of STATUS2 register. On
    MAX14577 0x6 is reserved and 0x7 dead battery. On the MAX77836 the
    0x6 means special charger and 0x7 is reserved. Regardless of these
    differences the driver maps them to one enum max14577_muic_charger_type.

    Signed-off-by: Krzysztof Kozlowski
    Acked-by: Andrew Morton
    Signed-off-by: Lee Jones

    Krzysztof Kozlowski
     

24 Jul, 2014

1 commit

  • This adds a driver for reading the battery status of the
    battery connected to the Atmel microcontroller on the
    iPAQ h3xxx series.

    Based on a driver from handhelds.org 2.6.21 kernel, written
    by Alessandro GARDICH.

    Signed-off-by: Dmitry Artamonow
    Signed-off-by: Linus Walleij
    Signed-off-by: Sebastian Reichel

    Dmitry Artamonow
     

26 Jan, 2014

1 commit

  • Pull networking updates from David Miller:

    1) BPF debugger and asm tool by Daniel Borkmann.

    2) Speed up create/bind in AF_PACKET, also from Daniel Borkmann.

    3) Correct reciprocal_divide and update users, from Hannes Frederic
    Sowa and Daniel Borkmann.

    4) Currently we only have a "set" operation for the hw timestamp socket
    ioctl, add a "get" operation to match. From Ben Hutchings.

    5) Add better trace events for debugging driver datapath problems, also
    from Ben Hutchings.

    6) Implement auto corking in TCP, from Eric Dumazet. Basically, if we
    have a small send and a previous packet is already in the qdisc or
    device queue, defer until TX completion or we get more data.

    7) Allow userspace to manage ipv6 temporary addresses, from Jiri Pirko.

    8) Add a qdisc bypass option for AF_PACKET sockets, from Daniel
    Borkmann.

    9) Share IP header compression code between Bluetooth and IEEE802154
    layers, from Jukka Rissanen.

    10) Fix ipv6 router reachability probing, from Jiri Benc.

    11) Allow packets to be captured on macvtap devices, from Vlad Yasevich.

    12) Support tunneling in GRO layer, from Jerry Chu.

    13) Allow bonding to be configured fully using netlink, from Scott
    Feldman.

    14) Allow AF_PACKET users to obtain the VLAN TPID, just like they can
    already get the TCI. From Atzm Watanabe.

    15) New "Heavy Hitter" qdisc, from Terry Lam.

    16) Significantly improve the IPSEC support in pktgen, from Fan Du.

    17) Allow ipv4 tunnels to cache routes, just like sockets. From Tom
    Herbert.

    18) Add Proportional Integral Enhanced packet scheduler, from Vijay
    Subramanian.

    19) Allow openvswitch to mmap'd netlink, from Thomas Graf.

    20) Key TCP metrics blobs also by source address, not just destination
    address. From Christoph Paasch.

    21) Support 10G in generic phylib. From Andy Fleming.

    22) Try to short-circuit GRO flow compares using device provided RX
    hash, if provided. From Tom Herbert.

    The wireless and netfilter folks have been busy little bees too.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (2064 commits)
    net/cxgb4: Fix referencing freed adapter
    ipv6: reallocate addrconf router for ipv6 address when lo device up
    fib_frontend: fix possible NULL pointer dereference
    rtnetlink: remove IFLA_BOND_SLAVE definition
    rtnetlink: remove check for fill_slave_info in rtnl_have_link_slave_info
    qlcnic: update version to 5.3.55
    qlcnic: Enhance logic to calculate msix vectors.
    qlcnic: Refactor interrupt coalescing code for all adapters.
    qlcnic: Update poll controller code path
    qlcnic: Interrupt code cleanup
    qlcnic: Enhance Tx timeout debugging.
    qlcnic: Use bool for rx_mac_learn.
    bonding: fix u64 division
    rtnetlink: add missing IFLA_BOND_AD_INFO_UNSPEC
    sfc: Use the correct maximum TX DMA ring size for SFC9100
    Add Shradha Shah as the sfc driver maintainer.
    net/vxlan: Share RX skb de-marking and checksum checks with ovs
    tulip: cleanup by using ARRAY_SIZE()
    ip_tunnel: clear IPCB in ip_tunnel_xmit() in case dst_link_failure() is called
    net/cxgb4: Don't retrieve stats during recovery
    ...

    Linus Torvalds
     

16 Jan, 2014

1 commit

  • On archs like S390 or um this driver cannot build nor work.
    Make it depend on HAS_IOMEM to bypass build failures.

    drivers/built-in.o: In function `goldfish_battery_probe':
    drivers/power/goldfish_battery.c:181: undefined reference to `devm_ioremap'

    Signed-off-by: Richard Weinberger
    Signed-off-by: David S. Miller

    Richard Weinberger
     

24 Dec, 2013

1 commit

  • MAX14577 chip is a multi-function device which includes MUIC, charger and
    voltage regulator. The driver is located in drivers/mfd.

    This patch supports battery charging control of MAX14577 chip and provides
    power supply class information to userspace.

    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Kyungmin Park
    Signed-off-by: Anton Vorontsov

    Krzysztof Kozlowski
     

02 Dec, 2013

1 commit

  • max17042 now uses regmap interface but does not enable config option. This
    patch fixes the following build errors:

    drivers/power/max17042_battery.c:661:15: error: variable ‘max17042_regmap_config’ has initializer but incomplete type
    drivers/power/max17042_battery.c:662:2: error: unknown field ‘reg_bits’ specified in initializer
    drivers/power/max17042_battery.c:662:2: warning: excess elements in struct initializer
    drivers/power/max17042_battery.c:662:2: warning: (near initialization for ‘max17042_regmap_config’)
    drivers/power/max17042_battery.c:663:2: error: unknown field ‘val_bits’ specified in initializer
    drivers/power/max17042_battery.c:663:2: warning: excess elements in struct initializer
    drivers/power/max17042_battery.c:663:2: warning: (near initialization for ‘max17042_regmap_config’)
    drivers/power/max17042_battery.c:664:2: error: unknown field ‘val_format_endian’ specified in initializer
    drivers/power/max17042_battery.c:664:23: error: ‘REGMAP_ENDIAN_NATIVE’ undeclared here (not in a function)
    drivers/power/max17042_battery.c:664:2: warning: excess elements in struct initializer
    drivers/power/max17042_battery.c:664:2: warning: (near initialization for ‘max17042_regmap_config’)
    drivers/power/max17042_battery.c: In function ‘max17042_probe’:
    drivers/power/max17042_battery.c:684:2: error: implicit declaration of function ‘devm_regmap_init_i2c’

    Signed-off-by: Austin Boyle
    Acked-by: Jonghwa Lee
    Signed-off-by: Anton Vorontsov

    Austin Boyle
     

26 Oct, 2013

1 commit

  • Adds support for the bq24735 charger chipset. The bq24735 is a
    high-efficiency, synchronous battery charger.

    It allows control of the charging current, input current, and the charger
    voltage DAC's through SMBus.

    Signed-off-by: Darbha Sriharsha
    Signed-off-by: Rhyland Klein
    Thanks-to: Stephen Warren
    Thanks-to: Thierry Reding
    Thanks-to: Manish Badarkhe
    Signed-off-by: Anton Vorontsov

    Darbha Sriharsha
     

13 Sep, 2013

1 commit