/linux-6.12.1/drivers/power/supply/ |
D | cros_usbpd-charger.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Power supply driver for ChromeOS EC based USB PD Charger. 5 * Copyright (c) 2014 - 2018 Google, Inc 26 #define DRV_NAME "cros-usbpd-charger" 42 struct charger_data *charger; member 82 return port->port_number >= port->charger->num_usbpd_ports; in cros_usbpd_charger_port_is_dedicated() 85 static int cros_usbpd_charger_ec_command(struct charger_data *charger, in cros_usbpd_charger_ec_command() argument 93 struct cros_ec_dev *ec_dev = charger->ec_dev; in cros_usbpd_charger_ec_command() 99 return -ENOMEM; in cros_usbpd_charger_ec_command() 101 msg->version = version; in cros_usbpd_charger_ec_command() [all …]
|
D | act8945a_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Power supply driver for the Active-semi ACT8945A PMIC 19 static const char *act8945a_charger_manufacturer = "Active-semi"; 22 * ACT8945A Charger Register Map 209 static int act8945a_get_capacity_level(struct act8945a_charger *charger, in act8945a_get_capacity_level() argument 214 int lbo_level = gpiod_get_value(charger->lbo_gpio); in act8945a_get_capacity_level() 268 * Riset(K) = 2336 * (1V/Ichg(mA)) - 0.205 276 static int act8945a_get_current_max(struct act8945a_charger *charger, in act8945a_get_current_max() argument 282 int chgin_level = gpiod_get_value(charger->chglev_gpio); in act8945a_get_current_max() 346 struct act8945a_charger *charger = power_supply_get_drvdata(psy); in act8945a_charger_get_property() local [all …]
|
D | max8903_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * max8903_charger.c - Maxim 8903 USB/Adapter Charger Driver 27 struct gpio_desc *cen; /* Charger Enable input */ 30 struct gpio_desc *chg; /* Charger status output */ 32 struct gpio_desc *dcm; /* Current-Limit Mode input (1: DC, 2: USB) */ 40 POWER_SUPPLY_PROP_STATUS, /* Charger status output */ 53 val->intval = POWER_SUPPLY_STATUS_UNKNOWN; in max8903_get_property() 54 if (data->chg) { in max8903_get_property() 55 if (gpiod_get_value(data->chg)) in max8903_get_property() 57 val->intval = POWER_SUPPLY_STATUS_CHARGING; in max8903_get_property() [all …]
|
D | ab8500_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) ST-Ericsson SA 2012 5 * Charger driver for AB8500 36 #include "ab8500-bm.h" 37 #include "ab8500-chargalg.h" 39 /* Charger constants */ 94 /* Lowest charger voltage is 3.39V -> 0x4E */ 107 /*External charger control*/ 112 /* UsbLineStatus register - usb types */ 174 * struct ab8500_charger_interrupts - ab8500 interrupts [all …]
|
D | rt5033_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Battery charger driver for RT5033 9 #include <linux/devm-helpers.h> 18 #include <linux/mfd/rt5033-private.h> 43 static int rt5033_get_charger_state(struct rt5033_charger *charger) in rt5033_get_charger_state() argument 45 struct regmap *regmap = charger->regmap; in rt5033_get_charger_state() 72 if (charger->otg) in rt5033_get_charger_state() 78 static int rt5033_get_charger_type(struct rt5033_charger *charger) in rt5033_get_charger_type() argument 80 struct regmap *regmap = charger->regmap; in rt5033_get_charger_type() 100 static int rt5033_get_charger_current_limit(struct rt5033_charger *charger) in rt5033_get_charger_current_limit() argument [all …]
|
D | tps65217_charger.c | 1 // SPDX-License-Identifier: GPL-2.0 2 // Battery charger driver for TI's tps65217 8 * Battery charger driver for TI's tps65217 44 static int tps65217_config_charger(struct tps65217_charger *charger) in tps65217_config_charger() argument 53 * is not recommended to do so. In sleep mode, the charger continues in tps65217_config_charger() 55 * values. Therefore, the charger would get the wrong temperature in tps65217_config_charger() 61 * NTC TYPE (for battery temperature measurement) in tps65217_config_charger() 66 ret = tps65217_clear_bits(charger->tps, TPS65217_REG_CHGCONFIG1, in tps65217_config_charger() 70 dev_err(charger->dev, in tps65217_config_charger() 78 static int tps65217_enable_charging(struct tps65217_charger *charger) in tps65217_enable_charging() argument [all …]
|
D | gpio-charger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de> 18 #include <linux/power/gpio-charger.h> 31 struct power_supply *charger; member 44 struct power_supply *charger = devid; in gpio_charger_irq() local 46 power_supply_changed(charger); in gpio_charger_irq() 59 int ndescs = gpio_charger->current_limit_gpios->ndescs; in set_charge_current_limit() 60 struct gpio_desc **gpios = gpio_charger->current_limit_gpios->desc; in set_charge_current_limit() 63 if (!gpio_charger->current_limit_map_size) in set_charge_current_limit() 64 return -EINVAL; in set_charge_current_limit() [all …]
|
D | da9150-charger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * DA9150 Charger Driver 42 static inline int da9150_charger_supply_online(struct da9150_charger *charger, in da9150_charger_supply_online() argument 46 val->intval = (psy == charger->supply_online) ? 1 : 0; in da9150_charger_supply_online() 51 /* Charger Properties */ 52 static int da9150_charger_vbus_voltage_now(struct da9150_charger *charger, in da9150_charger_vbus_voltage_now() argument 57 /* Read processed value - mV units */ in da9150_charger_vbus_voltage_now() 58 ret = iio_read_channel_processed(charger->vbus_chan, &v_val); in da9150_charger_vbus_voltage_now() 63 val->intval = v_val * 1000; in da9150_charger_vbus_voltage_now() 68 static int da9150_charger_ibus_current_avg(struct da9150_charger *charger, in da9150_charger_ibus_current_avg() argument [all …]
|
D | isp1704_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * ISP1704 USB Charger Detection driver 6 * Copyright (C) 2012 - 2013 Pali Rohár <pali@kernel.org> 63 return usb_phy_io_read(isp->phy, reg); in isp1704_read() 68 return usb_phy_io_write(isp->phy, val, reg); in isp1704_write() 73 gpiod_set_value(isp->enable_gpio, on); in isp1704_charger_set_power() 77 * Determine is the charging port DCP (dedicated charger) or CDP (Host/HUB 88 int type = POWER_SUPPLY_TYPE_USB_DCP; in isp1704_charger_type() local 103 /* Enable strong pull-up on DP (1.5K) and reset */ in isp1704_charger_type() 110 type = POWER_SUPPLY_TYPE_USB_CDP; in isp1704_charger_type() [all …]
|
D | lt3651-charger.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Driver for Analog Devices (Linear Technology) LT3651 charger IC. 19 struct power_supply *charger; member 28 struct power_supply *charger = devid; in lt3651_charger_irq() local 30 power_supply_changed(charger); in lt3651_charger_irq() 48 if (!lt3651_charger->chrg_gpio) { in lt3651_charger_get_property() 49 val->intval = POWER_SUPPLY_STATUS_UNKNOWN; in lt3651_charger_get_property() 52 if (gpiod_get_value(lt3651_charger->chrg_gpio)) in lt3651_charger_get_property() 53 val->intval = POWER_SUPPLY_STATUS_CHARGING; in lt3651_charger_get_property() 55 val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING; in lt3651_charger_get_property() [all …]
|
D | ab8500_chargalg.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) ST-Ericsson SA 2012 34 #include "ab8500-bm.h" 35 #include "ab8500-chargalg.h" 40 /* End-of-charge criteria counter */ 169 * struct ab8500_charge_curr_maximization - Charger maximization parameters 170 * @original_iset_ua: the non optimized/maximised charger current 172 * @condition_cnt: number of iterations needed before a new charger current 174 * @max_current_ua: maximum charger current 175 * @wait_cnt: to avoid too fast current step down in case of charger [all …]
|
D | mp2629_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * MP2629 battery charger driver 140 "mp2629-batt-volt", 141 "mp2629-system-volt", 142 "mp2629-input-volt", 143 "mp2629-batt-current", 144 "mp2629-input-current", 147 static int mp2629_read_adc(struct mp2629_charger *charger, in mp2629_read_adc() argument 154 ret = iio_read_channel_processed(charger->iiochan[ch], &chval); in mp2629_read_adc() 158 val->intval = chval * 1000; in mp2629_read_adc() [all …]
|
D | rk817_charger.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Charger Driver for Rockchip rk817 12 #include <linux/devm-helpers.h> 68 * soc - state of charge - like the BSP this is stored as a percentage, 143 return -EINVAL; in rk817_chg_cur_to_reg() 166 return -EINVAL; in rk817_chg_cur_from_reg() 170 static void rk817_bat_calib_vol(struct rk817_charger *charger) in rk817_bat_calib_vol() argument 177 regmap_bulk_read(charger->rk808->regmap, RK817_GAS_GAUGE_VCALIB0_H, in rk817_bat_calib_vol() 181 regmap_bulk_read(charger->rk808->regmap, RK817_GAS_GAUGE_VCALIB1_H, in rk817_bat_calib_vol() 186 charger->voltage_k = (4025 - 2300) * 1000 / in rk817_bat_calib_vol() [all …]
|
/linux-6.12.1/drivers/usb/phy/ |
D | phy.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * phy.c -- USB phy handling 5 * Copyright (C) 2004-2013 Texas Instruments 17 /* Default current range by charger type. */ 52 enum usb_phy_type type) in __usb_find_phy() argument 57 if (phy->type != type) in __usb_find_phy() 63 return ERR_PTR(-ENODEV); in __usb_find_phy() 71 return ERR_PTR(-ENODEV); in __of_usb_find_phy() 74 if (node != phy->dev->of_node) in __of_usb_find_phy() 80 return ERR_PTR(-EPROBE_DEFER); in __of_usb_find_phy() [all …]
|
/linux-6.12.1/Documentation/power/ |
D | charger-manager.rst | 2 Charger Manager 7 Charger Manager provides in-kernel battery charger management that 8 requires temperature monitoring during suspend-to-RAM state 12 Charger Manager is a platform_driver with power-supply-class entries. 13 An instance of Charger Manager (a platform-device created with Charger-Manager) 16 the system may need multiple instances of Charger Manager. 21 Charger Manager supports the following: 25 they may be activated at the same time. Each charger may have its 26 own power-supply-class and each power-supply-class can provide 28 aggregates charger-related information from multiple sources and [all …]
|
/linux-6.12.1/Documentation/devicetree/bindings/power/supply/ |
D | gpio-charger.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/power/supply/gpio-charger.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Sebastian Reichel <sre@kernel.org> 19 const: gpio-charger 21 charger-type: 23 - unknown 24 - battery 25 - ups [all …]
|
D | ti,lp8727.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: TI/National Semiconductor LP8727 Charger 10 - Sebastian Reichel <sre@kernel.org> 13 - $ref: power-supply.yaml# 25 debounce-ms: 30 type: object 34 charger-type: 36 - ac [all …]
|
D | charger-manager.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/power/supply/charger-manager.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Charger Manager 10 - Sebastian Reichel <sre@kernel.org> 13 Binding for the legacy charger manager driver. 18 const: charger-manager 20 cm-chargers: 22 $ref: /schemas/types.yaml#/definitions/string-array [all …]
|
/linux-6.12.1/drivers/phy/ti/ |
D | phy-tusb1210.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * tusb1210.c - TUSB1210 USB ULPI PHY driver 46 /* TUSB1210 charger detection work states */ 77 struct device *dev = tusb->dev; in tusb1210_ulpi_write() 89 struct device *dev = tusb->dev; in tusb1210_ulpi_read() 107 gpiod_set_value_cansleep(tusb->gpio_reset, 1); in tusb1210_power_on() 108 gpiod_set_value_cansleep(tusb->gpio_cs, 1); in tusb1210_power_on() 113 tusb1210_ulpi_write(tusb, TUSB1210_VENDOR_SPECIFIC2, tusb->vendor_specific2); in tusb1210_power_on() 122 gpiod_set_value_cansleep(tusb->gpio_reset, 0); in tusb1210_power_off() 123 gpiod_set_value_cansleep(tusb->gpio_cs, 0); in tusb1210_power_off() [all …]
|
/linux-6.12.1/drivers/regulator/ |
D | max77693-regulator.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 // max77693.c - Regulator driver for the Maxim 77693 and 77843 5 // Copyright (C) 2013-2015 Samsung Electronics 19 #include <linux/mfd/max77693-common.h> 20 #include <linux/mfd/max77693-private.h> 21 #include <linux/mfd/max77843-private.h> 46 * MAX77693 CHARGER regulator - Min : 20mA, Max : 2580mA, step : 20mA 48 * 0x04 ~ 0x7E = (60 + (X - 3) * 20) mA 58 unsigned int chg_min_uA = rdev->constraints->min_uA; in max77693_chg_get_current_limit() 59 unsigned int chg_max_uA = rdev->constraints->max_uA; in max77693_chg_get_current_limit() [all …]
|
/linux-6.12.1/Documentation/devicetree/bindings/mfd/ |
D | maxim,max77693.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Chanwoo Choi <cw00.choi@samsung.com> 11 - Krzysztof Kozlowski <krzk@kernel.org> 18 includes voltage current regulators, charger, LED/flash, haptic motor driver 31 charger: 37 max77693-muic: 38 type: object 44 const: maxim,max77693-muic [all …]
|
D | maxim,max14577.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Krzysztof Kozlowski <krzk@kernel.org> 17 includes voltage safeout regulators, charger and MicroUSB management IC. 20 includes voltage safeout and LDO regulators, charger, fuel-gauge and MicroUSB 26 - maxim,max14577 27 - maxim,max77836 35 wakeup-source: true 37 charger: [all …]
|
D | richtek,rt5033.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Jakob Hauser <jahau@rocketmail.com> 13 RT5033 is a multifunction device which includes battery charger, fuel gauge, 30 The regulators of RT5033 have to be instantiated under a sub-node named 34 type: object 37 type: object 42 charger: 43 type: object [all …]
|
/linux-6.12.1/Documentation/ABI/testing/ |
D | sysfs-class-power | 5 Contact: linux-pm@vger.kernel.org 14 Contact: linux-pm@vger.kernel.org 23 Contact: linux-pm@vger.kernel.org 30 What: /sys/class/power_supply/<supply_name>/type 32 Contact: linux-pm@vger.kernel.org 34 Describes the main type of the supply. 43 Contact: linux-pm@vger.kernel.org 66 Contact: linux-pm@vger.kernel.org 81 Contact: linux-pm@vger.kernel.org 94 read-only reporting, unless the 'online' state of the supply [all …]
|
/linux-6.12.1/Documentation/devicetree/bindings/regulator/ |
D | maxim,max8997.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Krzysztof Kozlowski <krzk@kernel.org> 14 regulators, charger controller with fuel gauge, RTC, clock outputs, haptic 15 motor driver, flash LED driver and Micro-USB Interface Controller. 17 The binding here is not complete and describes only regulator and charger 22 const: maxim,max8997-pmic 24 charger-supply: 30 - description: irq1 interrupt [all …]
|