]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
Merge tag 'for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 28 Apr 2021 22:43:58 +0000 (15:43 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 28 Apr 2021 22:43:58 +0000 (15:43 -0700)
Pull power supply and reset updates from Sebastian Reichel:
 "battery/charger driver changes:
   - core:
      - provide function stubs if CONFIG_POWER_SUPPLY=n
      - reduce loglevel for probe defer info
   - surface:
      - new battery and charger drivers for Surface
   - bq27xxx:
      - add bq78z100 support
      - fix current_now/power_avg for newer chips
   - cw2015:
      - add CHARGE_NOW support
   - ab8500:
      - drop pdata support
   - convert most DT bindings to YAML
   - lots of minor fixes and cleanups

  reset drivers:
   - ltc2952-poweroff:
      - make trigger delay configurable from DT
   - minor fixes and cleanups"

* tag 'for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (97 commits)
  power: supply: cpcap-battery: fix invalid usage of list cursor
  power: supply: bq256xx: add kerneldoc for structure members
  power: supply: act8945a: correct kerneldoc
  power: supply: max17040: remove unneeded double cast
  power: supply: max17040: handle device_property_read_u8_array() failure
  power: supply: max14577: remove unneeded variable initialization
  power: supply: surface-charger: Make symbol 'surface_ac_pm_ops' static
  power: supply: surface-battery: Make some symbols static
  power: reset: restart-poweroff: Add missing MODULE_DEVICE_TABLE
  power: reset: hisi-reboot: add missing MODULE_DEVICE_TABLE
  power: supply: s3c_adc_battery: fix possible use-after-free in s3c_adc_bat_remove()
  power: supply: generic-adc-battery: fix possible use-after-free in gab_remove()
  power: supply: Add AC driver for Surface Aggregator Module
  power: supply: Add battery driver for Surface Aggregator Module
  power: supply: bq25980: Move props from battery node
  power: supply: core: Use true and false for bool variable
  power: supply: goldfish: Remove the GOLDFISH dependency
  power: reset: ltc2952: make trigger delay configurable
  power: supply: cpcap-charger: Simplify bool conversion
  power: supply: cpcap-charger: Add usleep to cpcap charger to avoid usb plug bounce
  ...

1  2 
MAINTAINERS
drivers/power/supply/axp20x_usb_power.c
drivers/power/supply/sbs-battery.c
include/linux/power_supply.h

diff --cc MAINTAINERS
index 30b63eaf30f5201ce08114cea18659f5b48efb2e,6dd073d23cbd64cdc418d9204db4a401ef1b05f7..a938f79695a51c7e296b08260d26138388c5102b
@@@ -12002,14 -11861,14 +12002,22 @@@ F:        drivers/scsi/smartpqi/smartpqi*.[ch
  F:    include/linux/cciss*.h
  F:    include/uapi/linux/cciss*.h
  
+ MICROSOFT SURFACE BATTERY AND AC DRIVERS
+ M:    Maximilian Luz <luzmaximilian@gmail.com>
+ L:    linux-pm@vger.kernel.org
+ L:    platform-driver-x86@vger.kernel.org
+ S:    Maintained
+ F:    drivers/power/supply/surface_battery.c
+ F:    drivers/power/supply/surface_charger.c
 +MICROSOFT SURFACE DTX DRIVER
 +M:    Maximilian Luz <luzmaximilian@gmail.com>
 +L:    platform-driver-x86@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/driver-api/surface_aggregator/clients/dtx.rst
 +F:    drivers/platform/surface/surface_dtx.c
 +F:    include/uapi/linux/surface_aggregator/dtx.h
 +
  MICROSOFT SURFACE GPE LID SUPPORT DRIVER
  M:    Maximilian Luz <luzmaximilian@gmail.com>
  L:    platform-driver-x86@vger.kernel.org
index 70ea404b2a36767ecfc313e0df5af4231f61bf81,4bf92831cb06f1c6d2dfbefe78e981b9bc5f496a..8d7a10730e43d98e7e11291c5d27455064dabf4f
@@@ -1159,17 -1156,12 +1157,15 @@@ skip_gpio
  
                rc = sbs_get_battery_presence_and_health(
                                client, POWER_SUPPLY_PROP_PRESENT, &val);
-               if (rc < 0 || !val.intval) {
-                       dev_err(&client->dev, "Failed to get present status\n");
-                       rc = -ENODEV;
-                       goto exit_psupply;
-               }
+               if (rc < 0 || !val.intval)
+                       return dev_err_probe(&client->dev, -ENODEV,
+                                            "Failed to get present status\n");
        }
  
 -      INIT_DELAYED_WORK(&chip->work, sbs_delayed_work);
 +      rc = devm_delayed_work_autocancel(&client->dev, &chip->work,
 +                                        sbs_delayed_work);
 +      if (rc)
 +              return rc;
  
        chip->power_supply = devm_power_supply_register(&client->dev, sbs_desc,
                                                   &psy_cfg);
                "%s: battery gas gauge device registered\n", client->name);
  
        return 0;
- exit_psupply:
-       return rc;
  }
  
 -static int sbs_remove(struct i2c_client *client)
 -{
 -      struct sbs_info *chip = i2c_get_clientdata(client);
 -
 -      cancel_delayed_work_sync(&chip->work);
 -
 -      return 0;
 -}
 -
  #if defined CONFIG_PM_SLEEP
  
  static int sbs_suspend(struct device *dev)
Simple merge