Commit fd71b9a0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull power supply and reset updates from Sebastian Reichel:
 "Power-supply core:
   - new charging_orange_full_green RGB LED trigger
   - simplify and cleanup power-supply LED trigger code
   - expose power information via hwmon compatibility layer

  New hardware support:
   - enable battery support for Qualcomm Snapdragon X Elite
   - new battery driver for Maxim MAX17201/MAX17205
   - new battery driver for Lenovo Yoga C630 laptop (custom EC)

  Cleanups:
   - cleanup 'struct i2c_device_id' initializations
   - misc small battery driver cleanups and fixes"

* tag 'for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply:
  power: supply: sysfs: use power_supply_property_is_writeable()
  power: supply: qcom_battmgr: Enable battery support on x1e80100
  power: supply: add support for MAX1720x standalone fuel gauge
  dt-bindings: power: supply: add support for MAX17201/MAX17205 fuel gauge
  power: reset: piix4: add missing MODULE_DESCRIPTION() macro
  power: supply: samsung-sdi-battery: Constify struct power_supply_maintenance_charge_table
  power: supply: samsung-sdi-battery: Constify struct power_supply_vbat_ri_table
  power: supply: lenovo_yoga_c630_battery: add Lenovo C630 driver
  power: supply: ingenic: Fix some error handling paths in ingenic_battery_get_property()
  power: supply: ab8500: Clean some error messages
  power: supply: ab8500: Use iio_read_channel_processed_scale()
  power: supply: ab8500: Fix error handling when calling iio_read_channel_processed()
  power: supply: hwmon: Add support for power sensors
  power: supply: ab8500: remove unused struct 'inst_curr_result_list'
  power: supply: bd99954: remove unused struct 'battery_data'
  power: supply: leds: Add activate() callback to triggers
  power: supply: leds: Share trig pointer for online and charging_full
  power: supply: leds: Add power_supply_[un]register_led_trigger()
  power: supply: Drop explicit initialization of struct i2c_device_id::driver_data to 0
parents c5d2be66 be6299c6
Loading
Loading
Loading
Loading
+58 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/maxim,max17201.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Maxim MAX17201 fuel gauge

maintainers:
  - Dimitri Fedrau <dima.fedrau@gmail.com>

allOf:
  - $ref: power-supply.yaml#

properties:
  compatible:
    oneOf:
      - const: maxim,max17201
      - items:
          - enum:
              - maxim,max17205
          - const: maxim,max17201

  reg:
    items:
      - description: ModelGauge m5 registers
      - description: Nonvolatile registers

  reg-names:
    items:
      - const: m5
      - const: nvmem

  interrupts:
    maxItems: 1

required:
  - compatible
  - reg
  - reg-names

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;

      fuel-gauge@36 {
        compatible = "maxim,max17201";
        reg = <0x36>, <0xb>;
        reg-names = "m5", "nvmem";
        interrupt-parent = <&gpio0>;
        interrupts = <31 IRQ_TYPE_LEVEL_LOW>;
      };
    };
+1 −0
Original line number Diff line number Diff line
@@ -106,4 +106,5 @@ static struct pci_driver piix4_poweroff_driver = {

module_pci_driver(piix4_poweroff_driver);
MODULE_AUTHOR("Paul Burton <paul.burton@mips.com>");
MODULE_DESCRIPTION("Intel PIIX4 power-off driver");
MODULE_LICENSE("GPL");
+21 −0
Original line number Diff line number Diff line
@@ -167,6 +167,15 @@ config BATTERY_LEGO_EV3
	help
	  Say Y here to enable support for the LEGO MINDSTORMS EV3 battery.

config BATTERY_LENOVO_YOGA_C630
	tristate "Lenovo Yoga C630 battery"
	depends on EC_LENOVO_YOGA_C630
	help
	  This driver enables battery support on the Lenovo Yoga C630 laptop.

	  To compile the driver as a module, choose M here: the module will be
	  called lenovo_yoga_c630_battery.

config BATTERY_PMU
	tristate "Apple PMU battery"
	depends on PPC32 && ADB_PMU
@@ -402,6 +411,18 @@ config BATTERY_MAX17042

	  Driver can be build as a module (max17042_battery).

config BATTERY_MAX1720X
	tristate "Maxim MAX17201/MAX17205 Fuel Gauge"
	depends on I2C
	select REGMAP_I2C
	help
	  MAX1720x is a family of fuel-gauge systems for lithium-ion (Li+)
	  batteries in handheld and portable equipment. MAX17201 are
	  configured to operate with a single lithium cell, the MAX17205
	  can operate with multiple cells.

	  Say Y to include support for the MAX17201/MAX17205 Fuel Gauges.

config BATTERY_MAX1721X
	tristate "MAX17211/MAX17215 standalone gas-gauge"
	depends on W1
+2 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ obj-$(CONFIG_BATTERY_DS2782) += ds2782_battery.o
obj-$(CONFIG_BATTERY_GAUGE_LTC2941)	+= ltc2941-battery-gauge.o
obj-$(CONFIG_BATTERY_GOLDFISH)	+= goldfish_battery.o
obj-$(CONFIG_BATTERY_LEGO_EV3)	+= lego_ev3_battery.o
obj-$(CONFIG_BATTERY_LENOVO_YOGA_C630) += lenovo_yoga_c630_battery.o
obj-$(CONFIG_BATTERY_PMU)	+= pmu_battery.o
obj-$(CONFIG_BATTERY_QCOM_BATTMGR)	+= qcom_battmgr.o
obj-$(CONFIG_BATTERY_OLPC)	+= olpc_battery.o
@@ -52,6 +53,7 @@ obj-$(CONFIG_CHARGER_DA9150) += da9150-charger.o
obj-$(CONFIG_BATTERY_DA9150)	+= da9150-fg.o
obj-$(CONFIG_BATTERY_MAX17040)	+= max17040_battery.o
obj-$(CONFIG_BATTERY_MAX17042)	+= max17042_battery.o
obj-$(CONFIG_BATTERY_MAX1720X)	+= max1720x_battery.o
obj-$(CONFIG_BATTERY_MAX1721X)	+= max1721x_battery.o
obj-$(CONFIG_BATTERY_RT5033)	+= rt5033_battery.o
obj-$(CONFIG_CHARGER_RT5033)	+= rt5033_charger.o
+1 −1
Original line number Diff line number Diff line
@@ -1225,8 +1225,8 @@ static bool ab8500_chargalg_time_to_restart(struct ab8500_chargalg *di)
 */
static void ab8500_chargalg_algorithm(struct ab8500_chargalg *di)
{
	const struct power_supply_maintenance_charge_table *mt;
	struct power_supply_battery_info *bi = di->bm->bi;
	struct power_supply_maintenance_charge_table *mt;
	int charger_status;
	int ret;

Loading