aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-03-23dt-bindings: power: supply: lp8727: Convert to DT schema formatSebastian Reichel2-43/+90
Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: da9150: Convert to DT schema formatSebastian Reichel4-49/+103
Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: axp20x: Convert to DT schema formatSebastian Reichel6-86/+95
Convert the binding to DT schema format. Cc: Chen-Yu Tsai <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: act8945a: Convert to DT schema formatSebastian Reichel2-44/+76
Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: pm8941-coincell: Convert to DT schema formatSebastian Reichel2-48/+57
Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: pm8941-charger: Convert to DT schema formatSebastian Reichel2-150/+169
Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: ucs1002: Convert to DT schema formatSebastian Reichel2-27/+51
Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: max8903: Convert to DT schema formatSebastian Reichel2-24/+67
Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: max17042: Convert to DT schema formatSebastian Reichel2-35/+78
Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: max14656: Convert to DT schema formatSebastian Reichel2-23/+45
Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: max17040: Convert to DT schema formatSebastian Reichel2-52/+95
Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: lego-ev3-battery: Convert to DT schema formatSebastian Reichel2-21/+55
Convert the binding to DT schema format. Cc: David Lechner <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: David Lechner <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: n900-battery: Convert to DT schema formatSebastian Reichel2-25/+49
Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel <[email protected]> Rejected-by: Pali Rohár <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: twl4030: Convert to DT schema formatSebastian Reichel2-30/+68
Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: tps65217: Convert to DT schema formatSebastian Reichel2-17/+43
Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: tps65090: Convert to DT schema formatSebastian Reichel2-17/+36
Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: sc2731-charger: Convert to DT schema formatSebastian Reichel2-40/+53
Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: sc27xx-fg: Convert to DT schema formatSebastian Reichel2-59/+98
Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: ds2760: Convert to DT schema formatSebastian Reichel2-26/+43
Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: sbs-manager: Convert to DT schema formatSebastian Reichel2-66/+107
Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: sbs-charger: Convert to DT schema formatSebastian Reichel2-21/+55
Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: isp1704: Convert to DT schema formatSebastian Reichel2-17/+42
Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: bq24735: Convert to DT schema formatSebastian Reichel2-39/+89
Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: bq2415x: Convert to DT schema formatSebastian Reichel2-47/+98
Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: bq24190: Convert to DT schema formatSebastian Reichel2-61/+92
Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: bq24257: Convert to DT schema formatSebastian Reichel2-62/+124
Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: bq25890: Convert to DT schema formatSebastian Reichel2-60/+123
Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: cpcap-charger: Convert to DT schema formatSebastian Reichel2-40/+106
Convert the binding to DT schema format. I also added the missing bits used by the only in-tree user and implemented in the driver. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Tony Lindgren <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-23dt-bindings: power: supply: cpcap-battery: Convert to DT schema formatSebastian Reichel2-31/+87
Convert the binding to DT schema format. I also added the missing bits used by the only in-tree user and implemented in the driver. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Tony Lindgren <[email protected]> Reviewed-by: Rob Herring <[email protected]>
2021-03-22power: supply: max1721x: Correct spellingXiaofeng Cao1-7/+7
Change 'stanalone' to 'standalone' Change 'mesaurement' to 'measurement' Change 'nonvilatile' to 'nonvolatile' Change 'unical' to 'unique' Change 'unaccesable' to 'unaccessible' Change 'correcpondent' to 'correspond' Signed-off-by: Xiaofeng Cao <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-03-22power: supply: ds2781: use kobj_to_dev()dongjian1-4/+4
Use kobj_to_dev() instead of open-coding it Signed-off-by: dongjian <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-03-22power: supply: charger-manager: Fix a typoBhaskar Chowdhury1-1/+1
s/systme/system/ Signed-off-by: Bhaskar Chowdhury <[email protected]> Acked-by: Randy Dunlap <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-03-22power: reset: remove unneeded semicolondongjian1-1/+1
Fixes coccicheck warning: drivers/power/reset/vexpress-poweroff.c:136:2-3: Unneeded semicolon Signed-off-by: dongjian <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-03-22power: supply: Use IRQF_ONESHOTdongjian4-4/+4
Fixes coccicheck error: drivers/power/supply/pm2301_charger.c:1089:7-27: ERROR: drivers/power/supply/lp8788-charger.c:502:8-28: ERROR: drivers/power/supply/tps65217_charger.c:239:8-33: ERROR: drivers/power/supply/tps65090-charger.c:303:8-33: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT Signed-off-by: dongjian <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-03-21power: supply: bq27xxx: Add support for BQ78Z100LI Qingwu3-0/+47
Add support for TI BQ78Z100, I2C interface gas gauge. It provides a fully integrated safety protection and authentication for 1 to 2-series cell Li-Ion and Li-Polymer battery packs. The patch was tested with BQ78Z100 equipment. CASE I: Discharging: POWER_SUPPLY_NAME=bq78z100-0 POWER_SUPPLY_STATUS=Discharging POWER_SUPPLY_PRESENT=1 POWER_SUPPLY_VOLTAGE_NOW=3386000 POWER_SUPPLY_CURRENT_NOW=-5000 POWER_SUPPLY_CAPACITY=27 POWER_SUPPLY_CAPACITY_LEVEL=Normal POWER_SUPPLY_TEMP=269 POWER_SUPPLY_TIME_TO_EMPTY_NOW=1249920 POWER_SUPPLY_TECHNOLOGY=Li-ion POWER_SUPPLY_CHARGE_FULL=6494000 POWER_SUPPLY_CHARGE_NOW=1736000 POWER_SUPPLY_CHARGE_FULL_DESIGN=6000000 POWER_SUPPLY_CYCLE_COUNT=1 POWER_SUPPLY_POWER_AVG=-20000 POWER_SUPPLY_HEALTH=Good POWER_SUPPLY_MANUFACTURER=Texas Instruments CASE II : No discharging current: POWER_SUPPLY_NAME=bq78z100-0 POWER_SUPPLY_STATUS=Not charging POWER_SUPPLY_PRESENT=1 POWER_SUPPLY_VOLTAGE_NOW=3386000 POWER_SUPPLY_CURRENT_NOW=0 POWER_SUPPLY_CAPACITY=27 POWER_SUPPLY_CAPACITY_LEVEL=Normal POWER_SUPPLY_TEMP=270 POWER_SUPPLY_TECHNOLOGY=Li-ion POWER_SUPPLY_CHARGE_FULL=6494000 POWER_SUPPLY_CHARGE_NOW=1734000 POWER_SUPPLY_CHARGE_FULL_DESIGN=6000000 POWER_SUPPLY_CYCLE_COUNT=1 POWER_SUPPLY_POWER_AVG=0 POWER_SUPPLY_HEALTH=Good POWER_SUPPLY_MANUFACTURER=Texas Instruments Signed-off-by: LI Qingwu <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-03-21dt-bindings: power: bq27xxx: add bq78z100LI Qingwu1-0/+1
Add bindings for TI BQ78Z100. An I2C interface gas gauge. It provides a fully integrated safety protection and authentication for 1 to 2-series cell Li-Ion and Li-Polymer battery packs. Signed-off-by: LI Qingwu <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-03-15power: supply: bq27xxx: make status more robustMatthias Schiffer1-45/+43
There are multiple issues in bq27xxx_battery_status(): - On BQ28Q610 is was observed that the "full" flag may be set even while the battery is charging or discharging. With the current logic to make "full" override everything else, it look a very long time (>20min) for the status to change from "full" to "discharging" after unplugging the supply on a device with low power consumption - The POWER_SUPPLY_STATUS_NOT_CHARGING check depends on power_supply_am_i_supplied(), which will not work when the supply doesn't exist as a separate device known to Linux We can solve both issues by deriving the status from the current instead of the flags field. The flags are now only used to distinguish "full" from "not charging", and to determine the sign of the current on BQ27XXX_O_ZERO devices. Signed-off-by: Matthias Schiffer <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-03-15power: supply: bq27xxx: fix power_avg for newer ICsMatthias Schiffer2-25/+27
On all newer bq27xxx ICs, the AveragePower register contains a signed value; in addition to handling the raw value as unsigned, the driver code also didn't convert it to µW as expected. At least for the BQ28Z610, the reference manual incorrectly states that the value is in units of 1mW and not 10mW. I have no way of knowing whether the manuals of other supported ICs contain the same error, or if there are models that actually use 1mW. At least, the new code shouldn't be *less* correct than the old version for any device. power_avg is removed from the cache structure, se we don't have to extend it to store both a signed value and an error code. Always getting an up-to-date value may be desirable anyways, as it avoids inconsistent current and power readings when switching between charging and discharging. Signed-off-by: Matthias Schiffer <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-03-15power: supply: bq27xxx: fix sign of current_now for newer ICsMatthias Schiffer1-1/+1
Commit cd060b4d0868 ("power: supply: bq27xxx: fix polarity of current_now") changed the sign of current_now for all bq27xxx variants, but on BQ28Z610 I'm now seeing negated values *with* that patch. The GTA04/Openmoko device that was used for testing uses a BQ27000 or BQ27010 IC, so I assume only the BQ27XXX_O_ZERO code path was incorrect. Revert the behaviour for newer ICs. Fixes: cd060b4d0868 "power: supply: bq27xxx: fix polarity of current_now" Signed-off-by: Matthias Schiffer <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-03-15power: supply: axp20x_usb_power: Add missing check in axp20x_usb_power_probeDinghao Liu1-1/+3
There are two regmap_update_bits() calls but only one of them has return value check, which is odd. Add a return value check and terminate the execution flow on failure just like the other call. Signed-off-by: Dinghao Liu <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-03-15power: supply: z2_battery: Drop unused variableLinus Walleij1-3/+0
The kernel test robot reports an unused variable in the Z2 battery code caused by a recent commit. Fixes: a3b4388ea19b ("power: supply: z2_battery: Convert to GPIO descriptors") Reported-by: kernel test robot <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-03-09power: supply: core: provide function stubs if CONFIG_POWER_SUPPLY=nRay Chi1-0/+6
Fix build error when CONFIG_POWER_SUPPLY is not enabled. The build error occurs in mips (cavium_octeon_defconfig). mips-linux-gnu-ld: drivers/usb/dwc3/core.o: in function `dwc3_remove': drivers/usb/dwc3/core.c:1657: undefined reference to `power_supply_put' mips-linux-gnu-ld: drivers/usb/dwc3/core.o: in function `dwc3_get_properties': drivers/usb/dwc3/core.c:1270: undefined reference to `power_supply_get_by_name' mips-linux-gnu-ld: drivers/usb/dwc3/core.o: in function `dwc3_probe': drivers/usb/dwc3/core.c:1632: undefined reference to `power_supply_put' Fixes: 59fa3def35de ("usb: dwc3: add a power supply for current control") Reported-by: Naresh Kamboju <[email protected]> Signed-off-by: Ray Chi <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-03-06power: supply: smb347-charger: Clean up whitespaces in the codeDmitry Osipenko1-4/+3
Improve formatting of the code by removing unnecessary whitespaces. Signed-off-by: Dmitry Osipenko <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-03-06power: supply: smb347-charger: Improve interrupt initializationDmitry Osipenko1-22/+36
A previous commit attempted to fix IRQ usage in a case where interrupt is failed to initialize, but it missed couple more cases that could be improved. The interrupt could be undefined and then everything related to interrupt shouldn't be touched by driver. Secondly, we shouldn't ignore errors that aren't directly related to enabling interrupt in hardware, like enabling h/w write-access or requesting interrupt. Improve interrupt initialization in the driver in order to handle the missing cases. Signed-off-by: Dmitry Osipenko <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-03-06power: supply: s3c_adc_battery: remove unused pdata in suspend/resumeKrzysztof Kozlowski1-4/+0
The "pdata" local variable is not used in suspend/resume handlers since commit 7776bcd241e0 ("power: supply: s3c-adc-battery: Convert to GPIO descriptors"): drivers/power/supply/s3c_adc_battery.c: In function ‘s3c_adc_bat_suspend’: drivers/power/supply/s3c_adc_battery.c:405:28: warning: unused variable ‘pdata’ [-Wunused-variable] drivers/power/supply/s3c_adc_battery.c: In function ‘s3c_adc_bat_resume’: drivers/power/supply/s3c_adc_battery.c:422:28: warning: unused variable ‘pdata’ [-Wunused-variable] Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-03-06power: supply: s3c_adc_battery: add SPDX license identifierKrzysztof Kozlowski1-10/+5
Add SPDX license identifier and replace license boilerplate. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-03-06MAINTAINERS: power: supply: add entry for S3C ADC battery driverKrzysztof Kozlowski1-0/+7
The S3C ADC battery driver is a very old piece of code but still used by (very old as well) S3C24xx platforms (iPAQ h1930/h1940/rx1950). Currently the header file is not covered by maintainers file, so it might look abandoned. Add a new entry for entire S3C ADC battery driver with Krzysztof Kozlowski as maintainer (as Krzysztof maintains still Samsung S3C24xx platform) to indicate that some basic review can take place. However considering that the S3C24xx platform is quite old with only few users currently and Krzysztof does not have the actual hardware, let's mark the driver as "Odd fixes". Cc: Sebastian Reichel <[email protected]> Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-03-06power: supply: cw2015: Add CHARGE_NOW supportMartin Ashby1-0/+6
CHARGE_NOW is expected by some user software (such as waybar) instead of 'CAPACITY', in order to correctly calculate remaining battery life. Signed-off-by: Martin Ashby <[email protected]> Reviewed-by: Tobias Schramm <[email protected]> Tested-by: Tobias Schramm <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-03-06power: supply: max8997-charger: remove unneeded semicolonJiapeng Chong1-1/+1
Fix the following coccicheck warnings: ./drivers/power/supply/max8997_charger.c:266:3-4: Unneeded semicolon. Reported-by: Abaci Robot <[email protected]> Signed-off-by: Jiapeng Chong <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-03-05Linux 5.12-rc2Linus Torvalds1-1/+1