aboutsummaryrefslogtreecommitdiff
path: root/drivers/power/supply/Makefile
AgeCommit message (Collapse)AuthorFilesLines
2024-07-23Merge tag 'for-v6.11' of ↵Linus Torvalds1-0/+2
git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply 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
2024-07-04power: supply: add support for MAX1720x standalone fuel gaugeDimitri Fedrau1-0/+1
The MAX17201 monitors a single cell pack. The MAX17205 monitors and balances a 2S or 3S pack or monitors a multiple-series cell pack. Both devices use a I2C interface. Signed-off-by: Dimitri Fedrau <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sebastian Reichel <[email protected]>
2024-07-01power: supply: add ChromeOS EC based charge control driverThomas Weißschuh1-0/+1
The ChromeOS Embedded Controller implements a command to control charge thresholds and behaviour. Use it to implement the standard Linux charge_control_start_threshold, charge_control_end_threshold and charge_behaviour sysfs UAPIs. The driver is designed to be probed via the cros_ec mfd device. Acked-by: Sebastian Reichel <[email protected]> Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Tzung-Bi Shih <[email protected]>
2024-06-26power: supply: lenovo_yoga_c630_battery: add Lenovo C630 driverDmitry Baryshkov1-0/+1
On the Lenovo Yoga C630 WOS laptop the EC provides access to the adapter and battery status. Add the driver to read power supply status on the laptop. Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sebastian Reichel <[email protected]>
2023-09-15power: supply: Add driver for pm8916 lbcNikita Travkin1-0/+1
pm8916 LBC is a Linear Battery Charger hardware block in pm8916 PMIC. This block implements simple CC/CV charging for Li-Po batteries. The hardware has internal state machine to switch between modes and works mostly autonomously, only needing the limits and targets to be set to operate. This driver allows setting limits and enabling the LBC block, monitoring it's state. Signed-off-by: Nikita Travkin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sebastian Reichel <[email protected]>
2023-09-15power: supply: Add pm8916 VM-BMS supportNikita Travkin1-0/+1
This driver adds basic support for VM-BMS found in pm8916. VM-BMS is a very basic fuel-gauge hardware block that is, sadly, incapable of any gauging. The hardware supports measuring OCV in sleep mode, where the battery is not in use, or measuring average voltage over time when the device is active. This driver implements basic value readout from this block. Signed-off-by: Nikita Travkin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sebastian Reichel <[email protected]>
2023-09-15power: supply: Introduce MM8013 fuel gauge driverKonrad Dybcio1-0/+1
Add a driver for the Mitsumi MM8013 fuel gauge. The driver is a vastly cleaned up and improved version of the one that shipped in some obscure Lenovo downstream kernel [1], with some register definitions borrowed from ChromeOS EC platform code [2]. [1] https://github.com/adazem009/kernel_lenovo_bengal/commit/b6b346427a871715709bd22aae449b9383f3b66b [2] https://chromium.googlesource.com/chromiumos/platform/ec/+/master/driver/battery/mm8013.h Signed-off-by: Konrad Dybcio <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sebastian Reichel <[email protected]>
2023-07-03Merge tag 'for-v6.5' of ↵Linus Torvalds1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: - Add new Qualcomm PMI8998/PM660 SMB2 charger - bq256xx: support systems without thermistors - cros_pchg: fix peripheral device status after system resume - axp20x_usb_power: add support for AXP192 - qcom-pon: add support for pm8941 - at91-reset: prepare to expose reset reason to sysfs - switch all I2C drivers back to use .probe instead of .probe_new - convert some more DT bindings to YAML - misc cleanups * tag 'for-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (28 commits) MAINTAINERS: add documentation file for Microchip SAMA5D2 shutdown controller dt-bindings: power: reset: atmel,sama5d2-shdwc: convert to yaml dt-bindings: power: reset: atmel,at91sam9260-shdwc: convert to yaml power: reset: at91-reset: change the power on reason prototype power: reset: qcom-pon: add support for pm8941-pon dt-bindings: power: reset: qcom-pon: define pm8941-pon power: supply: add Qualcomm PMI8998 SMB2 Charger driver dt-bindings: power: supply: qcom,pmi8998-charger: add bindings for smb2 driver power: supply: rt9467: Make charger-enable control as logic level power: supply: Switch i2c drivers back to use .probe() power: reset: add HAS_IOPORT dependencies dt-bindings: power: supply: axp20x: Add AXP192 compatible power: supply: axp20x_usb_power: Add support for AXP192 power: supply: axp20x_usb_power: Remove variant IDs from VBUS polling check power: supply: axp20x_usb_power: Use regmap field for VBUS disabling power: supply: axp20x_usb_power: Use regmap fields for USB BC feature power: supply: axp20x_usb_power: Use regmap fields for VBUS monitor feature power: supply: axp20x_usb_power: Simplify USB current limit handling power: supply: hwmon: constify pointers to hwmon_channel_info power: supply: twl4030_madc_battery: Refactor twl4030_madc_bat_ext_changed() ...
2023-06-09power: supply: add Qualcomm PMI8998 SMB2 Charger driverCaleb Connolly1-0/+1
Add a driver for the SMB2 charger block found in the Qualcomm PMI8998 and PM660. This driver is capable of utilising Qualcomm's Automatic Power Source Detection (APSD) BC1.2 implementation, as well as Automatic Input Current Limiting (AICL) to configure the maximum input current limit of DCP (wall) chargers. Quick Charge is not currently supported. Most devices using the smb2 charger have a secondary dedicated charger chip which is used in parallel to enable faster charger without overheating. However, not all do, as a result to ensure safety until these are supported, the maximum current is limited to ~1A via the FAST_CHARGE_CURRENT_CFG register. Signed-off-by: Caleb Connolly <[email protected]> Tested-by: Joel Selvaraj <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2023-06-08power: supply: rt5033_charger: Add RT5033 charger device driverJakob Hauser1-0/+1
This patch adds device driver of Richtek RT5033 PMIC. The driver supports switching charger. rt5033 charger provides three charging modes. The charging modes are pre-charge mode, fast charge mode and constant voltage mode. They vary in charge rate, the charge parameters can be controlled by i2c interface. Tested-by: Raymond Hackley <[email protected]> Signed-off-by: Jakob Hauser <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Acked-by: Sebastian Reichel <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/9556d4ebb30fd321e37aa0eb343554122e4720c9.1684182964.git.jahau@rocketmail.com
2023-02-27Merge tag 'soc-drivers-6.3' of ↵Linus Torvalds1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC driver updates from Arnd Bergmann: "As usual, there are lots of minor driver changes across SoC platforms from NXP, Amlogic, AMD Zynq, Mediatek, Qualcomm, Apple and Samsung. These usually add support for additional chip variations in existing drivers, but also add features or bugfixes. The SCMI firmware subsystem gains a unified raw userspace interface through debugfs, which can be used for validation purposes. Newly added drivers include: - New power management drivers for StarFive JH7110, Allwinner D1 and Renesas RZ/V2M - A driver for Qualcomm battery and power supply status - A SoC device driver for identifying Nuvoton WPCM450 chips - A regulator coupler driver for Mediatek MT81xxv" * tag 'soc-drivers-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (165 commits) power: supply: Introduce Qualcomm PMIC GLINK power supply soc: apple: rtkit: Do not copy the reg state structure to the stack soc: sunxi: SUN20I_PPU should depend on PM memory: renesas-rpc-if: Remove redundant division of dummy soc: qcom: socinfo: Add IDs for IPQ5332 and its variant dt-bindings: arm: qcom,ids: Add IDs for IPQ5332 and its variant dt-bindings: power: qcom,rpmpd: add RPMH_REGULATOR_LEVEL_LOW_SVS_L1 firmware: qcom_scm: Move qcom_scm.h to include/linux/firmware/qcom/ MAINTAINERS: Update qcom CPR maintainer entry dt-bindings: firmware: document Qualcomm SM8550 SCM dt-bindings: firmware: qcom,scm: add qcom,scm-sa8775p compatible soc: qcom: socinfo: Add Soc IDs for IPQ8064 and variants dt-bindings: arm: qcom,ids: Add Soc IDs for IPQ8064 and variants soc: qcom: socinfo: Add support for new field in revision 17 soc: qcom: smd-rpm: Add IPQ9574 compatible soc: qcom: pmic_glink: remove redundant calculation of svid soc: qcom: stats: Populate all subsystem debugfs files dt-bindings: soc: qcom,rpmh-rsc: Update to allow for generic nodes soc: qcom: pmic_glink: add CONFIG_NET/CONFIG_OF dependencies soc: qcom: pmic_glink: Introduce altmode support ...
2023-02-24Merge tag 'for-v6.3' of ↵Linus Torvalds1-0/+2
git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: "Nothing special for the power-supply subystem this time. - power-supply core: remove faulty cooling logic - convert all sysfs show() handlers from *printf() use sysfs_emit() - bq25890: add dual-charger support required by Lenovo Yoga Tab 3 Pro - bq27xxx: fix reporting critical level - syscon-reboot: add priority property support - new rt9467 charger driver - new rt9471 charger driver - new Odroid Go Ultra poweroff driver - misc minor fixes and cleanups" * tag 'for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (32 commits) power: reset: odroid-go-ultra: fix I2C dependency power: supply: leds: explicitly include linux/leds.h dt-bindings: power: supply: pm8941-coincell: Don't require charging properties dt-bindings: power: supply: pm8941-coincell: Add PM8998 compatible power: reset: add Odroid Go Ultra poweroff driver power: supply: rt9467: Fix spelling mistake "attache" -> "attach" power: supply: rt9471: fix using wrong ce_gpio in rt9471_probe() power: supply: max77650: Make max77650_charger_disable() return void Documentation: power: rt9467: Document exported sysfs entries power: supply: rt9467: Add Richtek RT9467 charger driver dt-bindings: power: supply: Add Richtek RT9467 battery charger Documentation: power: rt9471: Document exported sysfs entries power: supply: rt9471: Add Richtek RT9471 charger driver dt-bindings: power: supply: Add Richtek RT9471 battery charger power: supply: max1721x: Use strscpy() is more robust and safer power: supply: test-power: use strscpy() instead of strncpy() power: supply: bq27xxx: fix reporting critical level power: supply: bq256xx: Init ichg/vbat value with chip default value power: supply: collie_battery: Convert to GPIO descriptors (part 2) power: supply: remove faulty cooling logic ...
2023-02-13power: supply: Introduce Qualcomm PMIC GLINK power supplyBjorn Andersson1-0/+1
The PMIC GLINK service, running on a coprocessor of modern Qualcomm platforms, deals with battery charging and fuel gauging, as well as reporting status of AC and wireless power supplies. As this is just one of the functionalities provided by the PMIC GLINK service, this power supply driver is implemented as an auxilirary bus driver, spawned by the main "pmic glink" driver when the PMIC GLINK service is detected. Signed-off-by: Bjorn Andersson <[email protected]> Tested-by: Konrad Dybcio <[email protected]> # SM8350 PDX215 Reviewed-by: Neil Armstrong <[email protected]> Tested-by: Neil Armstrong <[email protected]> # on SM8550-MTP & SM8450-HDK Signed-off-by: Bjorn Andersson <[email protected]> Acked-by: Sebastian Reichel <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-02-03power: supply: rt9467: Add Richtek RT9467 charger driverChiaEn Wu1-0/+1
RT9467 is a switch-mode single cell Li-Ion/Li-Polymer battery charger for portable applications. It integrates a synchronous PWM controller, power MOSFETs, input current sensing and regulation, high-accuracy voltage regulation, and charge termination. The charge current is regulated through integrated sensing resistors. The RT9467 also features USB On-The-Go (OTG) support. It also integrates D+/D- pin for USB host/charging port detection. Co-developed-by: ChiYuan Huang <[email protected]> Signed-off-by: ChiYuan Huang <[email protected]> Signed-off-by: ChiaEn Wu <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2023-02-03power: supply: rt9471: Add Richtek RT9471 charger driverChiYuan Huang1-0/+1
Add support for the RT9471 3A 1-Cell Li+ battery charger. The RT9471 is a highly-integrated 3A switch mode battery charger with low impedance power path to better optimize the charging efficiency. Co-developed-by: Alina Yu <[email protected]> Signed-off-by: Alina Yu <[email protected]> Signed-off-by: ChiYuan Huang <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2023-02-01power: remove pda_power supply driverArnd Bergmann1-1/+0
This driver was used for a couple of Intel PXA and Samsung S3C24xx based PDAs, but all of those are now removed from the kernel, so the driver itself is no longer useful. Cc: Anton Vorontsov <[email protected]> Cc: [email protected] Acked-by: Sebastian Reichel <[email protected]> Acked-by: Robert Jarzmik <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
2023-01-20power: remove tosa_battery driverArnd Bergmann1-1/+0
The PXA tosa machine is removed, so this driver is no longer in use. Cc: [email protected] Acked-by: Sebastian Reichel <[email protected]> Acked-by: Robert Jarzmik <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
2023-01-20power: remove z2_battery driverArnd Bergmann1-1/+0
The PXA z2 platform is gone, and this driver is now orphaned. Cc: [email protected] Cc: Peter Edwards <[email protected]> Acked-by: Sebastian Reichel <[email protected]> Acked-by: Robert Jarzmik <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
2023-01-16power: remove s3c adc battery driverArnd Bergmann1-1/+0
The s3c-adc driver is removed along with the s3c24xx platform, so the battery driver is no longer needed either. Reviewed-by: Krzysztof Kozlowski <[email protected]> Acked-by: Sebastian Reichel <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
2022-10-07Merge tag 'for-v6.1' of ↵Linus Torvalds1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: - new maintenance charging documentation - mt6370: new charger driver - bq25890: support input current limit - added Qualcomm PMK8350 PON support - misc minor fixes * tag 'for-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (22 commits) power: supply: ab8500: remove unused static local variable power: supply: mt6370: Fix return value check in mt6370_chg_probe() power: supply: ab8500: Remove unused struct ab8500_chargalg_sysfs_entry power: supply: mt6370: uses IIO interfaces, depends on IIO power: supply: max1721x: Fix spelling mistake "Gauage" -> "Gauge" power: supply: mt6370: Add MediaTek MT6370 charger driver dt-bindings: power: supply: Add MediaTek MT6370 Charger lib: add linear range index macro power: supply: bq25890: Fix enum conversion in bq25890_power_supply_set_property() power: supply: bq27xxx: fix NULL vs 0 warnings power: supply: bq27xxx: fix __be16 warnings power: supply: bq25890: Add support for setting IINLIM power: supply: bq25890: Disable PUMPX_EN on errors power: supply: Fix repeated word in comments power: supply: adp5061: show unknown capacity_level as text power: supply: adp5061: fix out-of-bounds read in adp5061_get_chg_type() power: supply: tps65217: Fix comments typo power: reset: qcom-pon: add support for qcom,pmk8350-pon compatible string dt-bindings: power: reset: qcom-pon: Add new compatible "qcom,pmk8350-pon" power: supply: cw2015: Use device managed API to simplify the code ...
2022-09-28power: supply: Add charger driver for Rockchip RK817Chris Morgan1-0/+1
Add support for the Rockchip rk817 battery charger integrated into the rk817 PMIC. Signed-off-by: Chris Morgan <[email protected]> Signed-off-by: Maya Matuszczyk <[email protected]> Acked-by: Sebastian Reichel <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-09-16power: supply: mt6370: Add MediaTek MT6370 charger driverChiaEn Wu1-0/+1
MediaTek MT6370 is a SubPMIC consisting of a single cell battery charger with ADC monitoring, RGB LEDs, dual channel flashlight, WLED backlight driver, display bias voltage supply, one general purpose LDO, and the USB Type-C & PD controller complies with the latest USB Type-C and PD standards. Add support for the MediaTek MT6370 Charger driver. The charger module of MT6370 supports High-Accuracy Voltage/Current Regulation, Average Input Current Regulation, Battery Temperature Sensing, Over-Temperature Protection, DPDM Detection for BC1.2. Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: ChiaEn Wu <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2022-03-04power: supply: Add a driver for Injoinic power bank ICsSamuel Holland1-0/+1
This driver supports several chip variants which all share the same I2C register interface. Since the chip will turn off and become inaccessible under conditions outside of software control (e.g. upon button press or input voltage removal), some special handling is needed to delay the initialization of the IC until it is accessible. Signed-off-by: Samuel Holland <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2022-03-04power: supply: Static data for Samsung batteriesLinus Walleij1-0/+1
If we detect a Samsung SDI battery, we return a static struct power_supply_battery_info and avoid looking further. Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2022-02-11power: supply: ug3105_battery: Add driver for uPI uG3105 battery monitorHans de Goede1-0/+1
Add a new battery driver for the uPI uG3105 battery monitor. Note the uG3105 is not a full-featured autonomous fuel-gauge. Instead it is expected to be use in combination with some always on microcontroller reading its coulomb-counter before it can wrap (must be read every 400 seconds!). Since Linux does not monitor coulomb-counter changes while the device is off or suspended, the coulomb counter is not used atm. So far this driver is only used on x86/ACPI (non devicetree) devs (also note there is no of_match table). Therefor there is no devicetree bindings documentation for this driver's "upisemi,rsns-microohm" property since this is not used in actual devicetree files and the dt bindings maintainers have requested properties with no actual dt users to _not_ be added to the dt bindings. The property's name has been chosen so that it should not need to be changed if/when devicetree enumeration support gets added later, as it mirrors "maxim,rsns-microohm" from the "maxim,max17042" bindings. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-11-16power: supply: max77976: add Maxim MAX77976 charger driverLuca Ceresoli1-0/+1
Add support for the MAX77976 3.5/5.5A 1-Cell Li+ Battery Charger. This is a simple implementation enough to be used as a simple battery charger without OTG and boost. Signed-off-by: Luca Ceresoli <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-08-13Merge tag 'ib-mt6360-for-5.15-signed' into psy-nextSebastian Reichel1-0/+1
Immutable branch between regulator and power-supply for for 5.15 This immutable branch introduces the MT6360 charger driver, which requires a new linear range helper. Signed-off-by: Sebastian Reichel <[email protected]>
2021-08-13power: supply: mt6360_charger: add MT6360 charger supportGene Chen1-0/+1
Add basic support for the battery charger for MT6360 PMIC Signed-off-by: Gene Chen <[email protected]> Reviewed-by: Matti Vaittinen <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-07-16power: supply: PCHG: Peripheral device chargerDaisuke Nojiri1-0/+1
This patch adds a driver for PCHG (Peripheral CHarGer). PCHG is a framework managing power supplies for peripheral devices. This driver creates a sysfs node for each peripheral charge port: /sys/class/power_supply/peripheral<n> where <n> is the index of a charge port. For example, when a stylus is connected to a NFC/WLC port, the node returns: /sys/class/power_supply/peripheral0/ capacity=50 charge_type=Standard scope=Device status=Charging type=Battery Signed-off-by: Daisuke Nojiri <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-07-16power: supply: ab8500: Rename charging algorithm symbolsLinus Walleij1-1/+1
The "abx500" name on the charging algorithm stems from the ambition to produce a series of these analog basebands, re-using the same charging algorithm driver. No ASICs beside AB8500 and AB8505 were ever produced so this terminology is confusing. Rename the algorithm file and symbols to reflect the more narrow scope. Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-06-04power: supply: Drop BD70528 supportMatti Vaittinen1-1/+0
The only known BD70528 use-cases are such that the PMIC is controlled from separate MCU which is not running Linux. I am not aware of any Linux driver users. Furthermore, it seems there is no demand for this IC. Let's ease the maintenance burden and drop the driver. We can always add it back if there is sudden need for it. Signed-off-by: Matti Vaittinen <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-06-03power: supply: pm2301_charger: Delete driverLinus Walleij1-1/+1
The PM2301 was only used in tandem with AB9540, part of U9540, a platform that was cancelled and never deployed in products. Delete it. Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-04-08power: supply: Add AC driver for Surface Aggregator ModuleMaximilian Luz1-0/+1
On newer Microsoft Surface models (specifically 7th-generation, i.e. Surface Pro 7, Surface Book 3, Surface Laptop 3, and Surface Laptop Go), battery and AC status/information is no longer handled via standard ACPI devices, but instead directly via the Surface System Aggregator Module (SSAM), i.e. the embedded controller on those devices. While on previous generation models, AC status is also handled via SSAM, an ACPI shim was present to translate the standard ACPI AC interface to SSAM requests. The SSAM interface itself, which is modeled closely after the ACPI interface, has not changed. This commit introduces a new SSAM client device driver to support AC status/information via the aforementioned interface on said Surface models. Signed-off-by: Maximilian Luz <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-04-08power: supply: Add battery driver for Surface Aggregator ModuleMaximilian Luz1-0/+1
On newer Microsoft Surface models (specifically 7th-generation, i.e. Surface Pro 7, Surface Book 3, Surface Laptop 3, and Surface Laptop Go), battery and AC status/information is no longer handled via standard ACPI devices, but instead directly via the Surface System Aggregator Module (SSAM), i.e. the embedded controller on those devices. While on previous generation models, battery status is also handled via SSAM, an ACPI shim was present to translate the standard ACPI battery interface to SSAM requests. The SSAM interface itself, which is modeled closely after the ACPI interface, has not changed. This commit introduces a new SSAM client device driver to support battery status/information via the aforementioned interface on said Surface models. It is in parts based on the standard ACPI battery driver. Signed-off-by: Maximilian Luz <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-01-14power: supply: Add battery gauge driver for Acer Iconia Tab A500Dmitry Osipenko1-0/+1
This patch adds battery gauge driver for Acer Iconia Tab A500 device. The battery gauge function is provided via the Embedded Controller, which is found on the Acer A500. Signed-off-by: Dmitry Osipenko <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-01-13power/supply: Add ltc4162-l-chargerMike Looijmans1-0/+1
Add support for the LTC4162-L Li-Ion battery charger. The driver allows reading back telemetry and to set some charging options like the input current limit. Signed-off-by: Mike Looijmans <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2021-01-06power: supply: bq256xx: Introduce the BQ256XX charger driverRicardo Rivera-Matos1-0/+1
The BQ256XX family of devices are highly integrated buck chargers for single cell batteries. Signed-off-by: Ricardo Rivera-Matos <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2020-10-04power: supply: bq25980: Add support for the BQ259xx familyDan Murphy1-0/+1
Add support for the BQ25980, BQ25975 and BQ25960 family of flash chargers. Signed-off-by: Dan Murphy <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2020-08-28power: supply: Add support for RN5T618/RC5T619 charger and fuel gaugeAndreas Kemnade1-0/+1
Both chips have charger and a fuel gauge. This adds basic support for displaying the state of the battery and the input power, settings are not modified. There are some defaults set via OTP. Charging also starts after plugging USB. Known issues of the fuel gauge: There are drivers in the wild which disable the fuel gauge at shutdown. If a kernel is booted without fuel gauge support, after such a driver has been used, the fuel gauge will stay off and decalibrate. If this driver is used after that, it might display wrong values for charge level. Signed-off-by: Andreas Kemnade <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2020-07-21power: supply: bq25150 introduce the bq25150Ricardo Rivera-Matos1-0/+1
Introduce the bq2515x family of chargers. The BQ2515X family of devices are highly integrated battery management ICs that integrate the most common functions for wearable devices namely a charger, an output voltage rail, ADC for battery and system monitoring, and a push-button controller. Datasheets: bq25150 - http://www.ti.com/lit/ds/symlink/bq25150.pdf bq25155 - http://www.ti.com/lit/ds/symlink/bq25155.pdf Signed-off-by: Ricardo Rivera-Matos <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2020-05-28Merge tag 'tags/ib-mfd-iio-power-v5.8' into psy-nextSebastian Reichel1-0/+1
This merges the MP2629 battery charge management immutable branch between MFD, IIO and power-supply due for the v5.8 merge window into power-supply for-next branch. Signed-off-by: Sebastian Reichel <[email protected]>
2020-05-26power: supply: Add support for mps mp2629 battery chargerSaravanan Sekar1-0/+1
The mp2629 provides switching-mode battery charge management for single-cell Li-ion or Li-polymer battery. Driver supports the access/control input source and battery charging parameters. Signed-off-by: Saravanan Sekar <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2020-05-10power: supply: Support ROHM bd99954 chargerMatti Vaittinen1-0/+1
The ROHM BD99954 is a Battery Management LSI for 1-4 cell Lithium-Ion secondary battery intended to be used in space-constraint equipment such as Low profile Notebook PC, Tablets and other applications. BD99954 provides a Dual-source Battery Charger, two port BC1.2 detection and a Battery Monitor. Support ROHM BD99954 Charger IC. Signed-off-by: Matti Vaittinen <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2020-05-03power: supply: add CellWise cw2015 fuel gauge driverTobias Schramm1-0/+1
This patch adds a driver for the CellWise cw2015 fuel gauge. The CellWise cw2015 is a shuntless, single-cell Li-Ion fuel gauge used in the pine64 Pinebook Pro laptop and some Raspberry Pi UPS HATs. Signed-off-by: Tobias Schramm <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-07-30power/supply: Drop obsolete JZ4740 driverPaul Cercueil1-1/+0
It has been replaced with the more mature ingenic-battery driver. Signed-off-by: Paul Cercueil <[email protected]> Tested-by: Artur Rojek <[email protected]> Acked-by: Sebastian Reichel <[email protected]> Signed-off-by: Paul Burton <[email protected]>
2019-07-15Merge tag 'for-v5.3' of ↵Linus Torvalds1-0/+2
git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: "Core: - add HWMON compat layer - new properties: - input power limit - input voltage limit Drivers: - qcom-pon: add gen2 support - new driver for storing reboot move in NVMEM - new driver for Wilco EC charger configuration - simplify getting the adapter of a client" * tag 'for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: power: reset: nvmem-reboot-mode: add CONFIG_OF dependency power_supply: wilco_ec: Add charging config driver power: supply: cros: allow to set input voltage and current limit power: supply: add input power and voltage limit properties power: supply: fix semicolon.cocci warnings power: reset: nvmem-reboot-mode: use NVMEM as reboot mode write interface dt-bindings: power: reset: add document for NVMEM based reboot-mode reset: qcom-pon: Add support for gen2 pon dt-bindings: power: reset: qcom: Add qcom,pm8998-pon compatibility line power: supply: Add HWMON compatibility layer power: supply: sbs-manager: simplify getting the adapter of a client power: supply: rt9455_charger: simplify getting the adapter of a client power: supply: rt5033_battery: simplify getting the adapter of a client power: supply: max17042_battery: simplify getting the adapter of a client power: supply: max17040_battery: simplify getting the adapter of a client power: supply: max14656_charger_detector: simplify getting the adapter of a client power: supply: bq25890_charger: simplify getting the adapter of a client power: supply: bq24257_charger: simplify getting the adapter of a client power: supply: bq24190_charger: simplify getting the adapter of a client
2019-07-05power_supply: wilco_ec: Add charging config driverNick Crews1-0/+1
Add a driver to control the charging algorithm used on Wilco devices. See Documentation/ABI/testing/sysfs-class-power-wilco for the userspace interface and other info. Signed-off-by: Nick Crews <[email protected]> Reviewed-by: Enric Balletbo i Serra <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-06-27power: supply: Initial support for ROHM BD70528 PMIC charger blockMatti Vaittinen1-0/+1
ROHM BD70528 PMIC includes battery charger block. Support charger staus queries and doing few basic settings like input current limit and charging current. Signed-off-by: Matti Vaittinen <[email protected]> Acked-by: Sebastian Reichel <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-23power: supply: Add HWMON compatibility layerAndrey Smirnov1-0/+1
Add code implementing HWMON adapter/compatibility layer to allow expositing various sensors present on power supply devices via HWMON subsystem. This is done in order to allow userspace to use single ABI/library(libsensors) to access/manipulate all of the sensors of the system. Signed-off-by: Andrey Smirnov <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Tested-by: Chris Healy <[email protected]> Cc: Chris Healy <[email protected]> Cc: Cory Tusar <[email protected]> Cc: Lucas Stach <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: Guenter Roeck <[email protected]> Cc: Sebastian Reichel <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Sebastian Reichel <[email protected]>
2019-05-15Merge tag 'for-v5.2' of ↵Linus Torvalds1-1/+3
git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: "Core: - Add over-current health state - Add standard, adaptive and custom charge types - Add new properties for start/end charge threshold New Drivers / Hardware: - UCS1002 Programmable USB Port Power Controller - Ingenic JZ47xx Battery Fuel Gauge - AXP20x USB Power: Add AXP813 support - AT91 poweroff: Add SAM9X60 support - OLPC battery: Add XO-1.5 and XO-1.75 support Misc Changes: - syscon-reboot: support mask property - AXP288 fuel gauge: Blacklist ACEPC T8/T11. Looks like some vendor thought it's a good idea to build a desktop system with a fuel gauge, that slowly "discharges"... - cpcap-battery: Fix calculation errors - misc fixes" * tag 'for-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (54 commits) power: supply: olpc_battery: force the le/be casts power: supply: ucs1002: Fix build error without CONFIG_REGULATOR power: supply: ucs1002: Fix wrong return value checking power: supply: Add driver for Microchip UCS1002 dt-bindings: power: supply: Add bindings for Microchip UCS1002 power: supply: core: Add POWER_SUPPLY_HEALTH_OVERCURRENT constant power: supply: core: fix clang -Wunsequenced power: supply: core: Add missing documentation for CHARGE_CONTROL_* properties power: supply: core: Add CHARGE_CONTROL_{START_THRESHOLD,END_THRESHOLD} properties power: supply: core: Add Standard, Adaptive, and Custom charge types power: supply: axp288_fuel_gauge: Add ACEPC T8 and T11 mini PCs to the blacklist power: supply: bq27xxx_battery: Notify also about status changes power: supply: olpc_battery: Have the framework register sysfs files for us power: supply: olpc_battery: Add OLPC XO 1.75 support power: supply: olpc_battery: Avoid using platform_info power: supply: olpc_battery: Use devm_power_supply_register() power: supply: olpc_battery: Move priv data to a struct power: supply: olpc_battery: Use DT to get battery version x86/platform/olpc: Use a correct version when making up a battery node x86/platform/olpc: Trivial code move in DT fixup ...