Home
last modified time | relevance | path

Searched refs:charger (Results 1 – 25 of 227) sorted by relevance

12345678910

/linux-6.6.21/drivers/power/supply/
Dda9030_battery.c139 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()
154 charger->adc.vbatmintxon, in bat_debug_show()
155 da9030_reg_to_mV(charger->adc.vbatmintxon)); in bat_debug_show()
[all …]
Drk817_charger.c170 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()
188 charger->voltage_b = 4025 - (charger->voltage_k * vcalib1) / 1000; in rk817_bat_calib_vol()
191 static void rk817_bat_calib_cur(struct rk817_charger *charger) in rk817_bat_calib_cur() argument
196 regmap_bulk_read(charger->rk808->regmap, RK817_GAS_GAUGE_IOFFSET_H, in rk817_bat_calib_cur()
198 regmap_bulk_write(charger->rk808->regmap, RK817_GAS_GAUGE_CAL_OFFSET_H, in rk817_bat_calib_cur()
206 static int rk817_record_battery_nvram_values(struct rk817_charger *charger) in rk817_record_battery_nvram_values() argument
215 put_unaligned_le24(charger->soc, bulk_reg); in rk817_record_battery_nvram_values()
[all …]
Dda9150-charger.c42 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()
52 static int da9150_charger_vbus_voltage_now(struct da9150_charger *charger, in da9150_charger_vbus_voltage_now() argument
58 ret = iio_read_channel_processed(charger->vbus_chan, &v_val); 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
74 ret = iio_read_channel_processed(charger->ibus_chan, &i_val); in da9150_charger_ibus_current_avg()
84 static int da9150_charger_tjunc_temp(struct da9150_charger *charger, in da9150_charger_tjunc_temp() argument
90 ret = iio_read_channel_processed(charger->tjunc_chan, &t_val); in da9150_charger_tjunc_temp()
111 struct da9150_charger *charger = dev_get_drvdata(psy->dev.parent); in da9150_charger_get_prop() local
116 ret = da9150_charger_supply_online(charger, psy, val); in da9150_charger_get_prop()
[all …]
Dbq24735-charger.c50 struct power_supply *charger; member
111 static int bq24735_config_charger(struct bq24735 *charger) in bq24735_config_charger() argument
113 struct bq24735_platform *pdata = charger->pdata; in bq24735_config_charger()
123 ret = bq24735_write_word(charger->client, in bq24735_config_charger()
126 dev_err(&charger->client->dev, in bq24735_config_charger()
136 ret = bq24735_write_word(charger->client, in bq24735_config_charger()
139 dev_err(&charger->client->dev, in bq24735_config_charger()
149 ret = bq24735_write_word(charger->client, in bq24735_config_charger()
152 dev_err(&charger->client->dev, in bq24735_config_charger()
162 static inline int bq24735_enable_charging(struct bq24735 *charger) in bq24735_enable_charging() argument
[all …]
Dtps65217_charger.c44 static int tps65217_config_charger(struct tps65217_charger *charger) in tps65217_config_charger() argument
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
83 if (charger->online) in tps65217_enable_charging()
86 dev_dbg(charger->dev, "%s: enable charging\n", __func__); in tps65217_enable_charging()
87 ret = tps65217_set_bits(charger->tps, TPS65217_REG_CHGCONFIG1, in tps65217_enable_charging()
92 dev_err(charger->dev, in tps65217_enable_charging()
98 charger->online = 1; in tps65217_enable_charging()
107 struct tps65217_charger *charger = power_supply_get_drvdata(psy); in tps65217_charger_get_property() local
[all …]
Drt5033_charger.c31 static int rt5033_get_charger_state(struct rt5033_charger *charger) in rt5033_get_charger_state() argument
33 struct regmap *regmap = charger->regmap; in rt5033_get_charger_state()
62 static int rt5033_get_charger_type(struct rt5033_charger *charger) in rt5033_get_charger_type() argument
64 struct regmap *regmap = charger->regmap; in rt5033_get_charger_type()
84 static int rt5033_get_charger_current_limit(struct rt5033_charger *charger) in rt5033_get_charger_current_limit() argument
86 struct regmap *regmap = charger->regmap; in rt5033_get_charger_current_limit()
100 static int rt5033_get_charger_const_voltage(struct rt5033_charger *charger) in rt5033_get_charger_const_voltage() argument
102 struct regmap *regmap = charger->regmap; in rt5033_get_charger_const_voltage()
116 static inline int rt5033_init_const_charge(struct rt5033_charger *charger) in rt5033_init_const_charge() argument
118 struct rt5033_charger_data *chg = charger->chg; in rt5033_init_const_charge()
[all …]
Dmp2629_charger.c155 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()
224 struct mp2629_charger *charger = dev_get_drvdata(psy->dev.parent); in mp2629_charger_battery_get_prop() local
[all …]
Dmax8997_charger.c54 struct charger_data *charger = power_supply_get_drvdata(psy); in max8997_battery_get_property() local
55 struct i2c_client *i2c = charger->iodev->i2c; in max8997_battery_get_property()
100 struct charger_data *charger = in max8997_battery_extcon_evt_worker() local
102 struct extcon_dev *edev = charger->edev; in max8997_battery_extcon_evt_worker()
106 dev_dbg(charger->dev, "USB SDP charger is connected\n"); in max8997_battery_extcon_evt_worker()
109 dev_dbg(charger->dev, "USB DCP charger is connected\n"); in max8997_battery_extcon_evt_worker()
112 dev_dbg(charger->dev, "USB FAST charger is connected\n"); in max8997_battery_extcon_evt_worker()
115 dev_dbg(charger->dev, "USB SLOW charger is connected\n"); in max8997_battery_extcon_evt_worker()
118 dev_dbg(charger->dev, "USB CDP charger is connected\n"); in max8997_battery_extcon_evt_worker()
121 dev_dbg(charger->dev, "USB charger is disconnected\n"); in max8997_battery_extcon_evt_worker()
[all …]
Dcros_usbpd-charger.c41 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
146 ret = cros_usbpd_charger_ec_command(charger, 0, EC_CMD_USB_PD_PORTS, in cros_usbpd_charger_get_usbpd_num_ports()
156 struct charger_data *charger = port->charger; in cros_usbpd_charger_get_discovery_info() local
[all …]
Dact8945a_charger.c209 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
386 struct regmap *regmap = charger->regmap; in act8945a_enable_interrupt()
[all …]
Dtps65090-charger.c44 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()
80 dev_err(charger->dev, "%s(): error writing in register 0x%x\n", in tps65090_enable_charging()
[all …]
Dcros_peripheral_charger.c34 struct charger_data *charger; member
54 static int cros_pchg_ec_command(const struct charger_data *charger, in cros_pchg_ec_command() argument
62 struct cros_ec_dev *ec_dev = charger->ec_dev; in cros_pchg_ec_command()
78 ret = cros_ec_cmd_xfer_status(charger->ec_device, msg); in cros_pchg_ec_command()
88 static bool cros_pchg_cmd_ver_check(const struct charger_data *charger) in cros_pchg_cmd_ver_check() argument
95 ret = cros_pchg_ec_command(charger, 1, EC_CMD_GET_CMD_VERSIONS, in cros_pchg_cmd_ver_check()
98 dev_warn(charger->dev, in cros_pchg_cmd_ver_check()
107 static int cros_pchg_port_count(const struct charger_data *charger) in cros_pchg_port_count() argument
112 ret = cros_pchg_ec_command(charger, 0, EC_CMD_PCHG_COUNT, in cros_pchg_port_count()
115 dev_warn(charger->dev, in cros_pchg_port_count()
[all …]
DMakefile44 obj-$(CONFIG_CHARGER_SBS) += sbs-charger.o
51 obj-$(CONFIG_CHARGER_DA9150) += da9150-charger.o
59 obj-$(CONFIG_CHARGER_RT9467) += rt9467-charger.o
63 obj-$(CONFIG_CHARGER_PCF50633) += pcf50633-charger.o
66 obj-$(CONFIG_CHARGER_CPCAP) += cpcap-charger.o
71 obj-$(CONFIG_CHARGER_LP8788) += lp8788-charger.o
72 obj-$(CONFIG_CHARGER_GPIO) += gpio-charger.o
73 obj-$(CONFIG_CHARGER_MANAGER) += charger-manager.o
74 obj-$(CONFIG_CHARGER_LT3651) += lt3651-charger.o
75 obj-$(CONFIG_CHARGER_LTC4162L) += ltc4162-l-charger.o
[all …]
Dcharger-manager.c920 ret = regulator_set_current_limit(cable->charger->consumer, in charger_extcon_work()
924 cable->charger->regulator_name, cable->name); in charger_extcon_work()
929 cable->charger->regulator_name, in charger_extcon_work()
1031 struct charger_regulator *charger; in charger_manager_register_extcon() local
1038 charger = &desc->charger_regulators[i]; in charger_manager_register_extcon()
1040 charger->consumer = regulator_get(cm->dev, in charger_manager_register_extcon()
1041 charger->regulator_name); in charger_manager_register_extcon()
1042 if (IS_ERR(charger->consumer)) { in charger_manager_register_extcon()
1044 charger->regulator_name); in charger_manager_register_extcon()
1045 return PTR_ERR(charger->consumer); in charger_manager_register_extcon()
[all …]
DKconfig51 which include a battery charger and a boost converter.
54 tristate "MAX8925 battery charger support"
57 Say Y here to enable support for the battery charger in the Maxim
61 tristate "WM831X backup battery charger support"
64 Say Y here to enable support for the backup battery charger
93 tristate "ADP5061 battery charger driver"
98 charger.
104 tristate "Active-semi ACT8945A charger driver"
108 Active-semi ActivePath ACT8945A charger.
237 tristate "SBS Compliant charger"
[all …]
Dlt3651-charger.c19 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()
/linux-6.6.21/drivers/platform/x86/intel/
Dcrystal_cove_charger.c35 struct crystal_cove_charger_data *charger = data; in crystal_cove_charger_irq() local
38 handle_nested_irq(charger->charger_irq); in crystal_cove_charger_irq()
41 regmap_write(charger->regmap, CHGRIRQ_REG, BIT(0)); in crystal_cove_charger_irq()
48 struct crystal_cove_charger_data *charger = irq_data_get_irq_chip_data(data); in crystal_cove_charger_irq_bus_lock() local
50 mutex_lock(&charger->buslock); in crystal_cove_charger_irq_bus_lock()
55 struct crystal_cove_charger_data *charger = irq_data_get_irq_chip_data(data); in crystal_cove_charger_irq_bus_sync_unlock() local
57 if (charger->mask != charger->new_mask) { in crystal_cove_charger_irq_bus_sync_unlock()
58 regmap_write(charger->regmap, MCHGRIRQ_REG, charger->new_mask); in crystal_cove_charger_irq_bus_sync_unlock()
59 charger->mask = charger->new_mask; in crystal_cove_charger_irq_bus_sync_unlock()
62 mutex_unlock(&charger->buslock); in crystal_cove_charger_irq_bus_sync_unlock()
[all …]
/linux-6.6.21/Documentation/devicetree/bindings/mfd/
Dmaxim,max14577.yaml17 includes voltage safeout regulators, charger and MicroUSB management IC.
20 includes voltage safeout and LDO regulators, charger, fuel-gauge and MicroUSB
37 charger:
59 - charger
69 charger:
72 const: maxim,max14577-charger
83 charger:
86 const: maxim,max77836-charger
131 charger {
132 compatible = "maxim,max14577-charger";
[all …]
/linux-6.6.21/Documentation/devicetree/bindings/power/supply/
Dcpcap-charger.yaml5 $id: http://devicetree.org/schemas/power/supply/cpcap-charger.yaml#
8 title: Motorola CPCAP PMIC charger
16 the Droid 4. This binding describes its battery charger
24 const: motorola,mapphone-cpcap-charger
28 - description: charger detection interrupt
30 - description: SE1 charger detection interrupt
31 - description: SE0 charger detection interrupt
68 Optionally CPCAP charger can have a companion wireless
87 charger {
88 compatible = "motorola,mapphone-cpcap-charger";
Dgpio-charger.yaml4 $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";
Dlltc,lt3651-charger.yaml4 $id: http://devicetree.org/schemas/power/supply/lltc,lt3651-charger.yaml#
18 - lltc,lt3651-charger
19 - lltc,ltc3651-charger # deprecated, use lltc,lt3651-charger
39 charger {
40 compatible = "lltc,lt3651-charger";
Dsbs,sbs-charger.yaml4 $id: http://devicetree.org/schemas/power/supply/sbs,sbs-charger.yaml#
7 title: SBS compliant charger
25 - sbs,sbs-charger
27 - const: sbs,sbs-charger
49 charger@9 {
50 compatible = "lltc,ltc4100", "sbs,sbs-charger";
Dactive-semi,act8945a-charger.yaml4 $id: http://devicetree.org/schemas/power/supply/active-semi,act8945a-charger.yaml#
17 const: active-semi,act8945a-charger
32 Specifies the charger's input over-voltage threshold value.
40 Specifies the charger's PRECONDITION safety timer setting value in minutes.
48 Specifies the charger's total safety timer setting value in hours;
66 charger {
67 compatible = "active-semi,act8945a-charger";
Dsc2731-charger.yaml4 $id: http://devicetree.org/schemas/power/supply/sc2731-charger.yaml#
7 title: Spreadtrum SC2731 PMICs battery charger
17 const: sprd,sc2731-charger
28 The charger uses the following battery properties
47 compatible = "sprd,sc2731-charger";
/linux-6.6.21/Documentation/devicetree/bindings/w1/
Dw1.txt11 charger: charger {
12 compatible = "gpio-charger";
13 charger-type = "mains";
23 power-supplies = <&charger>;

12345678910