/kernel/linux/linux-5.10/drivers/power/supply/ |
D | da9030_battery.c | 3 * Battery charger driver for Dialog Semiconductor DA9030 105 /* charger status */ 139 struct da9030_charger *charger = s->private; in bat_debug_show() local 141 seq_printf(s, "charger is %s\n", charger->is_on ? "on" : "off"); in bat_debug_show() 142 if (charger->chdet) { in bat_debug_show() 144 charger->mA, charger->mV); in bat_debug_show() 148 charger->adc.vbat_res, in bat_debug_show() 149 da9030_reg_to_mV(charger->adc.vbat_res)); in bat_debug_show() 151 charger->adc.vbatmin_res, in bat_debug_show() 152 da9030_reg_to_mV(charger->adc.vbatmin_res)); in bat_debug_show() [all …]
|
D | da9150-charger.c | 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 60 ret = iio_read_channel_processed(charger->vbus_chan, &v_val); 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 76 ret = iio_read_channel_processed(charger->ibus_chan, &i_val); in da9150_charger_ibus_current_avg() 86 static int da9150_charger_tjunc_temp(struct da9150_charger *charger, in da9150_charger_tjunc_temp() argument 92 ret = iio_read_channel_processed(charger->tjunc_chan, &t_val); in da9150_charger_tjunc_temp() [all …]
|
D | bq24735-charger.c | 2 * Battery charger driver for TI BQ24735 32 #include <linux/power/bq24735-charger.h> 47 struct power_supply *charger; member 108 static int bq24735_config_charger(struct bq24735 *charger) in bq24735_config_charger() argument 110 struct bq24735_platform *pdata = charger->pdata; in bq24735_config_charger() 120 ret = bq24735_write_word(charger->client, in bq24735_config_charger() 123 dev_err(&charger->client->dev, in bq24735_config_charger() 124 "Failed to write charger current : %d\n", in bq24735_config_charger() 133 ret = bq24735_write_word(charger->client, in bq24735_config_charger() 136 dev_err(&charger->client->dev, in bq24735_config_charger() [all …]
|
D | z2_battery.c | 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() 56 val->intval = z2_read_bat(charger); in z2_batt_get_property() 84 struct z2_charger *charger = power_supply_get_drvdata(batt_ps); in z2_batt_ext_power_changed() local 86 schedule_work(&charger->bat_work); in z2_batt_ext_power_changed() [all …]
|
D | tps65217_charger.c | 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() 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 83 /* charger already enabled */ in tps65217_enable_charging() 84 if (charger->online) in tps65217_enable_charging() [all …]
|
D | mp2629_charger.c | 3 * MP2629 battery charger driver 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() 171 static int mp2629_get_prop(struct mp2629_charger *charger, in mp2629_get_prop() argument 178 ret = regmap_field_read(charger->regmap_fields[fld], &rval); in mp2629_get_prop() 187 static int mp2629_set_prop(struct mp2629_charger *charger, in mp2629_set_prop() argument 197 return regmap_field_write(charger->regmap_fields[fld], rval); in mp2629_set_prop() 200 static int mp2629_get_battery_capacity(struct mp2629_charger *charger, in mp2629_get_battery_capacity() argument 206 ret = mp2629_read_adc(charger, MP2629_BATT_VOLT, &vnow); in mp2629_get_battery_capacity() 210 ret = mp2629_get_prop(charger, CHARGE_VLIM, &vlim); in mp2629_get_battery_capacity() [all …]
|
D | Kconfig | 38 backup batteries, and optional builtin charger. 55 tristate "MAX8925 battery charger support" 58 Say Y here to enable support for the battery charger in the Maxim 62 tristate "WM831X backup battery charger support" 65 Say Y here to enable support for the backup battery charger 94 tristate "ADP5061 battery charger driver" 99 charger. 105 tristate "Active-semi ACT8945A charger driver" 109 Active-semi ActivePath ACT8945A charger. 230 tristate "SBS Compliant charger" [all …]
|
D | cros_usbpd-charger.c | 3 * Power supply driver for ChromeOS EC based USB PD Charger. 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() 119 ret = cros_ec_cmd_xfer_status(charger->ec_device, msg); in cros_usbpd_charger_ec_command() 127 static int cros_usbpd_charger_get_num_ports(struct charger_data *charger) in cros_usbpd_charger_get_num_ports() argument 132 ret = cros_usbpd_charger_ec_command(charger, 0, in cros_usbpd_charger_get_num_ports() 141 static int cros_usbpd_charger_get_usbpd_num_ports(struct charger_data *charger) in cros_usbpd_charger_get_usbpd_num_ports() argument [all …]
|
D | act8945a_charger.c | 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() 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 347 struct regmap *regmap = charger->regmap; in act8945a_charger_get_property() 364 ret = act8945a_get_capacity_level(charger, in act8945a_charger_get_property() 368 ret = act8945a_get_current_max(charger, in act8945a_charger_get_property() 384 static int act8945a_enable_interrupt(struct act8945a_charger *charger) in act8945a_enable_interrupt() argument [all …]
|
D | tps65090-charger.c | 3 * Battery charger driver for TI's tps65090 44 static int tps65090_low_chrg_current(struct tps65090_charger *charger) in tps65090_low_chrg_current() argument 48 if (charger->passive_mode) in tps65090_low_chrg_current() 51 ret = tps65090_write(charger->dev->parent, TPS65090_REG_CG_CTRL5, in tps65090_low_chrg_current() 54 dev_err(charger->dev, "%s(): error reading in register 0x%x\n", in tps65090_low_chrg_current() 61 static int tps65090_enable_charging(struct tps65090_charger *charger) in tps65090_enable_charging() argument 66 if (charger->passive_mode) in tps65090_enable_charging() 69 ret = tps65090_read(charger->dev->parent, TPS65090_REG_CG_CTRL0, in tps65090_enable_charging() 72 dev_err(charger->dev, "%s(): error reading in register 0x%x\n", in tps65090_enable_charging() 77 ret = tps65090_write(charger->dev->parent, TPS65090_REG_CG_CTRL0, in tps65090_enable_charging() [all …]
|
D | charger-manager.c | 6 * This driver enables to monitor battery health and control charger 8 * Charger manager depends on other devices. Register this later than 23 #include <linux/power/charger-manager.h> 40 { "FAST-CHARGER", EXTCON_CHG_USB_FAST }, 41 { "SLOW-CHARGER", EXTCON_CHG_USB_SLOW }, 93 * @cm: the Charger Manager representing the battery. 145 * @cm: the Charger Manager representing the battery. 181 * @cm: the Charger Manager representing the battery. 209 * @cm: the Charger Manager representing the battery. 222 /* If at least one of the charger is charging, return yes */ in is_charging() [all …]
|
D | max77650-charger.c | 6 // Battery charger driver for MAXIM 77650/77651 charger/power-supply. 24 /* Charger is OFF. */ 26 /* Charger is in prequalification mode. */ 28 /* Charger is in fast-charge constant current mode. */ 30 /* Charger is in JEITA modified fast-charge constant-current mode. */ 32 /* Charger is in fast-charge constant-voltage mode. */ 34 /* Charger is in JEITA modified fast-charge constant-voltage mode. */ 36 /* Charger is in top-off mode. */ 38 /* Charger is in JEITA modified top-off mode. */ 40 /* Charger is done. */ [all …]
|
D | ab8500_charger.c | 5 * Charger driver for AB8500 37 /* Charger constants */ 92 /* Lowest charger voltage is 3.39V -> 0x4E */ 105 /*External charger control*/ 216 * struct ab8500_charger - ab8500 Charger device information 221 * @ac_conn: This will be true when the AC charger has been plugged 223 * charger is enabled 225 * charger is enabled 231 * @invalid_charger_detect_state State when forcing AB to use invalid charger 236 * @adc_main_charger_v ADC channel for main charger voltage [all …]
|
D | max8997_charger.c | 25 POWER_SUPPLY_PROP_ONLINE, /* charger is active or not */ 28 /* Note that the charger control is done by a current regulator "CHARGER" */ 33 struct charger_data *charger = power_supply_get_drvdata(psy); in max8997_battery_get_property() local 34 struct i2c_client *i2c = charger->iodev->i2c; in max8997_battery_get_property() 85 struct charger_data *charger; in max8997_battery_probe() local 135 charger = devm_kzalloc(&pdev->dev, sizeof(*charger), GFP_KERNEL); in max8997_battery_probe() 136 if (!charger) in max8997_battery_probe() 139 platform_set_drvdata(pdev, charger); in max8997_battery_probe() 142 charger->dev = &pdev->dev; in max8997_battery_probe() 143 charger->iodev = iodev; in max8997_battery_probe() [all …]
|
D | Makefile | 43 obj-$(CONFIG_CHARGER_SBS) += sbs-charger.o 50 obj-$(CONFIG_CHARGER_DA9150) += da9150-charger.o 61 obj-$(CONFIG_CHARGER_PCF50633) += pcf50633-charger.o 64 obj-$(CONFIG_CHARGER_CPCAP) += cpcap-charger.o 69 obj-$(CONFIG_CHARGER_LP8788) += lp8788-charger.o 70 obj-$(CONFIG_CHARGER_GPIO) += gpio-charger.o 71 obj-$(CONFIG_CHARGER_MANAGER) += charger-manager.o 72 obj-$(CONFIG_CHARGER_LT3651) += lt3651-charger.o 75 obj-$(CONFIG_CHARGER_MAX77650) += max77650-charger.o 84 obj-$(CONFIG_CHARGER_BQ24735) += bq24735-charger.o [all …]
|
D | lt3651-charger.c | 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() 137 lt3651_charger->charger = devm_power_supply_register(&pdev->dev, in lt3651_charger_probe() 139 if (IS_ERR(lt3651_charger->charger)) { in lt3651_charger_probe() 140 ret = PTR_ERR(lt3651_charger->charger); in lt3651_charger_probe() 157 dev_name(&pdev->dev), lt3651_charger->charger); in lt3651_charger_probe() 167 dev_name(&pdev->dev), lt3651_charger->charger); in lt3651_charger_probe() 177 dev_name(&pdev->dev), lt3651_charger->charger); in lt3651_charger_probe() [all …]
|
/kernel/linux/linux-5.10/include/linux/power/ |
D | charger-manager.h | 6 * Charger Manager. 45 * @wq: the workqueue to control charger according to the state of 46 * charger cable. If charger cable is attached, enable charger. 47 * But if charger cable is detached, disable charger. 49 * (External Connector) when charger cable is attached/detached. 50 * @attached: the state of charger cable. 51 * true: the charger cable is attached 52 * false: the charger cable is detached 53 * @charger: the instance of struct charger_regulator. 54 * @cm: the Charger Manager representing the battery. [all …]
|
/kernel/linux/linux-5.10/Documentation/power/ |
D | charger-manager.rst | 2 Charger Manager 7 Charger Manager provides in-kernel battery charger management that 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 28 aggregates charger-related information from multiple sources and 43 Charger Manager provides a function "cm_suspend_again" that can be 48 that are used by Charger Manager. [all …]
|
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/mfd/ |
D | max14577.txt | 4 Battery Charger and SFOUT LDO output for powering USB devices. It is 19 - charger : 20 Node for configuring the charger driver. 22 - compatible : "maxim,max14577-charger" 23 or "maxim,max77836-charger" 59 - for max14577: CHARGER, SAFEOUT. 60 - for max77836: CHARGER, SAFEOUT, LDO1, LDO2. 86 CHARGER { 87 regulator-name = "CHARGER"; 94 charger { [all …]
|
/kernel/linux/linux-5.10/include/linux/mfd/ |
D | rt5033-private.h | 57 /* RT5033 Charger state register */ 109 /* RT5033 charger property - model, manufacturer */ 111 #define RT5033_CHARGER_MODEL "RT5033WSC Charger" 115 * RT5033 charger fast-charge current lmits (as in CHGCTRL1 register), 138 /* RT5033 charger termination enable mask */ 142 * RT5033 charger opa mode. RT50300 have two opa mode charger mode 149 /* RT5033 charger termination enable */ 152 /* RT5033 charger CFO enable */ 155 /* RT5033 charger constant charge voltage (as in CHGCTRL2 register), uV */ 160 /* RT5033 charger pre-charge current limits (as in CHGCTRL4 register), uA */ [all …]
|
D | abx500.h | 124 * @maxi_chg_curr: Maximum charger current allowed 125 * @maxi_wait_cycles: cycles to wait before setting charger current 126 * @charger_curr_step delta between two charger current settings (mA) 147 * @normal_cur_lvl: charger current in normal state in mA 148 * @normal_vol_lvl: charger voltage in normal state in mV 149 * @maint_a_cur_lvl: charger current in maintenance A state in mA 150 * @maint_a_vol_lvl: charger voltage in maintenance A state in mV 152 * @maint_b_cur_lvl: charger current in maintenance B state in mA 153 * @maint_b_vol_lvl: charger voltage in maintenance B state in mV 155 * @low_high_cur_lvl: charger current in temp low/high state in mA [all …]
|
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/power/supply/ |
D | lt3651-charger.txt | 1 Analog Devices LT3651 Charger Power Supply bindings: lt3651-charger 5 * "lltc,ltc3651-charger", (DEPRECATED: Use "lltc,lt3651-charger") 6 * "lltc,lt3651-charger" 24 charger: battery-charger { 25 compatible = "lltc,lt3651-charger";
|
D | gpio-charger.yaml | 4 $id: http://devicetree.org/schemas/power/supply/gpio-charger.yaml# 19 const: gpio-charger 21 charger-type: 30 - usb-aca # USB accessory charger adapter 32 Type of the charger, e.g. "mains" for a wall charger. 36 description: GPIO indicating the charger presence 82 charger { 83 compatible = "gpio-charger"; 84 charger-type = "usb-sdp";
|
D | charger-manager.txt | 1 charger-manager bindings 5 - compatible : "charger-manager" 10 - cm-regulator-name : name of charger regulator 12 - cm-cable-name : name of charger cable - one of USB, USB-HOST, 13 SDP, DCP, CDP, ACA, FAST-CHARGER, SLOW-CHARGER, WPT, 20 - cm-name : charger manager's name (default : "battery") 27 via charger 45 charger-manager@0 { 46 compatible = "charger-manager";
|
/kernel/linux/linux-5.10/drivers/usb/phy/ |
D | phy.c | 17 /* Default current range by charger type. */ 90 * usb_phy_notify_charger_work - notify the USB charger state 91 * @work: the charger work to notify the USB charger state 93 * This work can be issued when USB charger state has been changed or 94 * USB charger current has been changed, then we can notify the current 95 * what can be drawn to power user and the charger state to userspace. 97 * If we get the charger type from extcon subsystem, we can notify the 98 * charger state to power user automatically by usb_phy_get_charger_type() 101 * If we get the charger type from ->charger_detect() instead of extcon 103 * to set charger state when the charger state has been changed. [all …]
|