/Linux-v5.10/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 25 #define DRV_NAME "cros-usbpd-charger" 41 struct charger_data *charger; member 92 return port->port_number >= port->charger->num_usbpd_ports; in cros_usbpd_charger_port_is_dedicated() 95 static int cros_usbpd_charger_ec_command(struct charger_data *charger, in cros_usbpd_charger_ec_command() argument 103 struct cros_ec_dev *ec_dev = charger->ec_dev; in cros_usbpd_charger_ec_command() 109 return -ENOMEM; in cros_usbpd_charger_ec_command() 111 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 | ab8500_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) ST-Ericsson SA 2012 5 * Charger driver for AB8500 31 #include <linux/mfd/abx500/ab8500-bm.h> 37 /* Charger constants */ 92 /* Lowest charger voltage is 3.39V -> 0x4E */ 105 /*External charger control*/ 110 /* UsbLineStatus register - usb types */ 172 * struct ab8500_charger_interrupts - ab8500 interupts 216 * struct ab8500_charger - ab8500 Charger device information [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 45 static int tps65217_config_charger(struct tps65217_charger *charger) in tps65217_config_charger() argument 54 * is not recommended to do so. In sleep mode, the charger continues in tps65217_config_charger() 56 * values. Therefore, the charger would get the wrong temperature in tps65217_config_charger() 62 * NTC TYPE (for battery temperature measurement) in tps65217_config_charger() 67 ret = tps65217_clear_bits(charger->tps, TPS65217_REG_CHGCONFIG1, in tps65217_config_charger() 71 dev_err(charger->dev, in tps65217_config_charger() 79 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 | 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 | da9150-charger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * DA9150 Charger Driver 44 static inline int da9150_charger_supply_online(struct da9150_charger *charger, in da9150_charger_supply_online() argument 48 val->intval = (psy == charger->supply_online) ? 1 : 0; in da9150_charger_supply_online() 53 /* Charger Properties */ 54 static int da9150_charger_vbus_voltage_now(struct da9150_charger *charger, in da9150_charger_vbus_voltage_now() argument 59 /* Read processed value - mV units */ in da9150_charger_vbus_voltage_now() 60 ret = iio_read_channel_processed(charger->vbus_chan, &v_val); in da9150_charger_vbus_voltage_now() 65 val->intval = v_val * 1000; in da9150_charger_vbus_voltage_now() 70 static int da9150_charger_ibus_current_avg(struct da9150_charger *charger, in da9150_charger_ibus_current_avg() argument [all …]
|
D | mp2629_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * MP2629 battery charger driver 148 "mp2629-batt-volt", 149 "mp2629-system-volt", 150 "mp2629-input-volt", 151 "mp2629-batt-current", 152 "mp2629-input-current", 155 static int mp2629_read_adc(struct mp2629_charger *charger, in mp2629_read_adc() argument 162 ret = iio_read_channel_processed(charger->iiochan[ch], &chval); in mp2629_read_adc() 166 val->intval = chval * 1000; in mp2629_read_adc() [all …]
|
D | max8903_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * max8903_charger.c - Maxim 8903 USB/Adapter Charger Driver 31 POWER_SUPPLY_PROP_STATUS, /* Charger status output */ 44 val->intval = POWER_SUPPLY_STATUS_UNKNOWN; in max8903_get_property() 45 if (gpio_is_valid(data->pdata->chg)) { in max8903_get_property() 46 if (gpio_get_value(data->pdata->chg) == 0) in max8903_get_property() 47 val->intval = POWER_SUPPLY_STATUS_CHARGING; in max8903_get_property() 48 else if (data->usb_in || data->ta_in) in max8903_get_property() 49 val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING; in max8903_get_property() 51 val->intval = POWER_SUPPLY_STATUS_DISCHARGING; in max8903_get_property() [all …]
|
D | abx500_chargalg.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) ST-Ericsson SA 2012 32 #include <linux/mfd/abx500/ab8500-bm.h> 38 /* End-of-charge criteria counter */ 177 * struct abx500_charge_curr_maximization - Charger maximization parameters 178 * @original_iset: the non optimized/maximised charger current 182 * @condition_cnt: number of iterations needed before a new charger current 184 * @max_current: maximum charger current 185 * @wait_cnt: to avoid too fast current step down in case of charger 208 * struct abx500_chargalg - abx500 Charging algorithm device information [all …]
|
D | z2_battery.c | 1 // SPDX-License-Identifier: GPL-2.0-only 29 static unsigned long z2_read_bat(struct z2_charger *charger) in z2_read_bat() argument 32 data = i2c_smbus_read_byte_data(charger->client, in z2_read_bat() 33 charger->info->batt_I2C_reg); in z2_read_bat() 37 return data * charger->info->batt_mult / charger->info->batt_div; in z2_read_bat() 44 struct z2_charger *charger = power_supply_get_drvdata(batt_ps); in z2_batt_get_property() local 45 struct z2_battery_info *info = charger->info; in z2_batt_get_property() 49 val->intval = charger->bat_status; in z2_batt_get_property() 52 val->intval = info->batt_tech; in z2_batt_get_property() 55 if (info->batt_I2C_reg >= 0) in z2_batt_get_property() [all …]
|
/Linux-v5.10/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. */ 46 enum usb_phy_type type) in __usb_find_phy() argument 51 if (phy->type != type) in __usb_find_phy() 57 return ERR_PTR(-ENODEV); in __usb_find_phy() 65 return ERR_PTR(-ENODEV); in __of_usb_find_phy() 68 if (node != phy->dev->of_node) in __of_usb_find_phy() 74 return ERR_PTR(-EPROBE_DEFER); in __of_usb_find_phy() [all …]
|
/Linux-v5.10/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-v5.10/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 | lp8727_charger.txt | 1 Binding for TI/National Semiconductor LP8727 Charger 4 - compatible: "ti,lp8727" 5 - reg: I2C slave address 27h 8 - interrupts: interrupt specifier (see interrupt binding[0]) 9 - debounce-ms: interrupt debounce time. (u32) 12 - charger-type: "ac" or "usb" (string) 13 - eoc-level: value of 'enum lp8727_eoc_level' (u8) 14 - charging-current: value of 'enum lp8727_ichg' (u8) 16 [0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt 25 interrupt-parent = <&gpio5>; /* base = 128 */ [all …]
|
D | qcom_smbb.txt | 1 Qualcomm Switch-Mode Battery Charger and Boost 4 - compatible: 6 Value type: <stringlist> 8 - "qcom,pm8941-charger" 10 - reg: 12 Value type: <prop-encoded-array> 15 - interrupts: 17 Value type: <prop-encoded-array> 21 - charge done 22 - charge fast mode [all …]
|
D | qcom,coincell-charger.txt | 1 Qualcomm Coincell Charger: 7 - compatible: 9 Value type: <string> 10 Definition: must be: "qcom,pm8941-coincell" 12 - reg: 14 Value type: <u32> 15 Definition: base address of the coincell charger registers 17 - qcom,rset-ohms: 19 Value type: <u32> 20 Definition: resistance (in ohms) for current-limiting resistor [all …]
|
D | lt3651-charger.txt | 1 Analog Devices LT3651 Charger Power Supply bindings: lt3651-charger 4 - compatible: Should contain one of the following: 5 * "lltc,ltc3651-charger", (DEPRECATED: Use "lltc,lt3651-charger") 6 * "lltc,lt3651-charger" 7 - lltc,acpr-gpios: Connect to ACPR output. See remark below. 10 - lltc,fault-gpios: Connect to FAULT output. See remark below. 11 - lltc,chrg-gpios: Connect to CHRG output. See remark below. 13 The lt3651 outputs are open-drain type and active low. The driver assumes the 24 charger: battery-charger { 25 compatible = "lltc,lt3651-charger"; [all …]
|
/Linux-v5.10/Documentation/devicetree/bindings/mfd/ |
D | ab8500.txt | 1 * AB8500 Multi-Functional Device (MFD) 4 - compatible : contains "stericsson,ab8500" or "stericsson,ab8505"; 5 - interrupts : contains the IRQ line for the AB8500 6 - interrupt-controller : describes the AB8500 as an Interrupt Controller (has its own domain) 7 - #interrupt-cells : should be 2, for 2-cell format 8 - The first cell is the AB8500 local IRQ number 9 - The second cell is used to specify optional parameters 10 - bits[3:0] trigger type and level flags: 11 1 = low-to-high edge triggered 12 2 = high-to-low edge triggered [all …]
|
/Linux-v5.10/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-v5.10/Documentation/devicetree/bindings/power/supply/ab8500/ |
D | fg.txt | 4 device comprising: power and energy-management-module, 5 wall-charger, usb-charger, audio codec, general purpose adc, 8 Fuelgauge support is part of energy-management-modules, other 10 main-charger, usb-combo-charger and battery-temperature-monitoring. 15 - compatible = This shall be: "stericsson,ab8500-fg" 16 - battery = Shall be battery specific information 19 compatible = "stericsson,ab8500-fg"; 27 'battery technology type' used. 30 thermistor-on-batctrl: 41 thermistor-on-batctrl; [all …]
|
/Linux-v5.10/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-v5.10/include/linux/mfd/abx500/ |
D | ux500_chargalg.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * Copyright (C) ST-Ericsson SA 2012 4 * Author: Johan Gardsmark <johan.gardsmark@stericsson.com> for ST-Ericsson. 13 * Valid only for supplies of type: 14 * - POWER_SUPPLY_TYPE_MAINS, 15 * - POWER_SUPPLY_TYPE_USB, 31 * struct ux500_charger - power supply ux500 charger sub class 33 * @ops ux500 charger operations 34 * @max_out_volt maximum output charger voltage in mV 35 * @max_out_curr maximum output charger current in mA [all …]
|
/Linux-v5.10/Documentation/devicetree/bindings/w1/ |
D | w1.txt | 5 Slave devices are listed as sub-nodes of such master devices. For now, only 11 charger: charger { 12 compatible = "gpio-charger"; 13 charger-type = "mains"; 18 compatible = "w1-gpio"; 23 power-supplies = <&charger>;
|