/drivers/power/ |
D | da9030_battery.c | 142 struct da9030_charger *charger = s->private; in bat_debug_show() local 144 seq_printf(s, "charger is %s\n", charger->is_on ? "on" : "off"); in bat_debug_show() 145 if (charger->chdet) { in bat_debug_show() 147 charger->mA, charger->mV); in bat_debug_show() 151 charger->adc.vbat_res, in bat_debug_show() 152 da9030_reg_to_mV(charger->adc.vbat_res)); in bat_debug_show() 154 charger->adc.vbatmin_res, in bat_debug_show() 155 da9030_reg_to_mV(charger->adc.vbatmin_res)); in bat_debug_show() 157 charger->adc.vbatmintxon, in bat_debug_show() 158 da9030_reg_to_mV(charger->adc.vbatmintxon)); in bat_debug_show() [all …]
|
D | da9150-charger.c | 48 static inline int da9150_charger_supply_online(struct da9150_charger *charger, in da9150_charger_supply_online() argument 52 val->intval = (psy == charger->supply_online) ? 1 : 0; in da9150_charger_supply_online() 58 static int da9150_charger_vbus_voltage_now(struct da9150_charger *charger, in da9150_charger_vbus_voltage_now() argument 64 ret = iio_read_channel_processed(charger->vbus_chan, &v_val); in da9150_charger_vbus_voltage_now() 74 static int da9150_charger_ibus_current_avg(struct da9150_charger *charger, in da9150_charger_ibus_current_avg() argument 80 ret = iio_read_channel_processed(charger->ibus_chan, &i_val); in da9150_charger_ibus_current_avg() 90 static int da9150_charger_tjunc_temp(struct da9150_charger *charger, in da9150_charger_tjunc_temp() argument 96 ret = iio_read_channel_processed(charger->tjunc_chan, &t_val); in da9150_charger_tjunc_temp() 117 struct da9150_charger *charger = dev_get_drvdata(psy->dev.parent); in da9150_charger_get_prop() local 122 ret = da9150_charger_supply_online(charger, psy, val); in da9150_charger_get_prop() [all …]
|
D | z2_battery.c | 33 static unsigned long z2_read_bat(struct z2_charger *charger) in z2_read_bat() argument 36 data = i2c_smbus_read_byte_data(charger->client, in z2_read_bat() 37 charger->info->batt_I2C_reg); in z2_read_bat() 41 return data * charger->info->batt_mult / charger->info->batt_div; in z2_read_bat() 48 struct z2_charger *charger = power_supply_get_drvdata(batt_ps); in z2_batt_get_property() local 49 struct z2_battery_info *info = charger->info; in z2_batt_get_property() 53 val->intval = charger->bat_status; in z2_batt_get_property() 60 val->intval = z2_read_bat(charger); in z2_batt_get_property() 88 struct z2_charger *charger = power_supply_get_drvdata(batt_ps); in z2_batt_ext_power_changed() local 90 schedule_work(&charger->bat_work); in z2_batt_ext_power_changed() [all …]
|
D | tps65217_charger.c | 55 static int tps65217_config_charger(struct tps65217_charger *charger) in tps65217_config_charger() argument 59 dev_dbg(charger->dev, "%s\n", __func__); in tps65217_config_charger() 79 ret = tps65217_clear_bits(charger->tps, TPS65217_REG_CHGCONFIG1, in tps65217_config_charger() 83 dev_err(charger->dev, in tps65217_config_charger() 91 static int tps65217_enable_charging(struct tps65217_charger *charger) in tps65217_enable_charging() argument 96 if (charger->ac_online) in tps65217_enable_charging() 99 dev_dbg(charger->dev, "%s: enable charging\n", __func__); in tps65217_enable_charging() 100 ret = tps65217_set_bits(charger->tps, TPS65217_REG_CHGCONFIG1, in tps65217_enable_charging() 105 dev_err(charger->dev, in tps65217_enable_charging() 111 charger->ac_online = 1; in tps65217_enable_charging() [all …]
|
D | bq24735-charger.c | 47 struct power_supply *charger; member 91 static inline int bq24735_enable_charging(struct bq24735 *charger) in bq24735_enable_charging() argument 93 return bq24735_update_word(charger->client, BQ24735_CHG_OPT, in bq24735_enable_charging() 98 static inline int bq24735_disable_charging(struct bq24735 *charger) in bq24735_disable_charging() argument 100 return bq24735_update_word(charger->client, BQ24735_CHG_OPT, in bq24735_disable_charging() 105 static int bq24735_config_charger(struct bq24735 *charger) in bq24735_config_charger() argument 107 struct bq24735_platform *pdata = charger->pdata; in bq24735_config_charger() 114 ret = bq24735_write_word(charger->client, in bq24735_config_charger() 117 dev_err(&charger->client->dev, in bq24735_config_charger() 127 ret = bq24735_write_word(charger->client, in bq24735_config_charger() [all …]
|
D | tps65090-charger.c | 54 static int tps65090_low_chrg_current(struct tps65090_charger *charger) in tps65090_low_chrg_current() argument 58 if (charger->passive_mode) in tps65090_low_chrg_current() 61 ret = tps65090_write(charger->dev->parent, TPS65090_REG_CG_CTRL5, in tps65090_low_chrg_current() 64 dev_err(charger->dev, "%s(): error reading in register 0x%x\n", in tps65090_low_chrg_current() 71 static int tps65090_enable_charging(struct tps65090_charger *charger) in tps65090_enable_charging() argument 76 if (charger->passive_mode) in tps65090_enable_charging() 79 ret = tps65090_read(charger->dev->parent, TPS65090_REG_CG_CTRL0, in tps65090_enable_charging() 82 dev_err(charger->dev, "%s(): error reading in register 0x%x\n", in tps65090_enable_charging() 87 ret = tps65090_write(charger->dev->parent, TPS65090_REG_CG_CTRL0, in tps65090_enable_charging() 90 dev_err(charger->dev, "%s(): error writing in register 0x%x\n", in tps65090_enable_charging() [all …]
|
D | max8997_charger.c | 47 struct charger_data *charger = power_supply_get_drvdata(psy); in max8997_battery_get_property() local 48 struct i2c_client *i2c = charger->iodev->i2c; in max8997_battery_get_property() 99 struct charger_data *charger; in max8997_battery_probe() local 149 charger = devm_kzalloc(&pdev->dev, sizeof(struct charger_data), in max8997_battery_probe() 151 if (charger == NULL) { in max8997_battery_probe() 156 platform_set_drvdata(pdev, charger); in max8997_battery_probe() 159 charger->dev = &pdev->dev; in max8997_battery_probe() 160 charger->iodev = iodev; in max8997_battery_probe() 162 psy_cfg.drv_data = charger; in max8997_battery_probe() 164 charger->battery = power_supply_register(&pdev->dev, in max8997_battery_probe() [all …]
|
D | charger-manager.c | 1137 ret = regulator_set_current_limit(cable->charger->consumer, in charger_extcon_work() 1141 cable->charger->regulator_name, cable->name); in charger_extcon_work() 1146 cable->charger->regulator_name, in charger_extcon_work() 1234 struct charger_regulator *charger; in charger_manager_register_extcon() local 1240 charger = &desc->charger_regulators[i]; in charger_manager_register_extcon() 1242 charger->consumer = regulator_get(cm->dev, in charger_manager_register_extcon() 1243 charger->regulator_name); in charger_manager_register_extcon() 1244 if (IS_ERR(charger->consumer)) { in charger_manager_register_extcon() 1246 charger->regulator_name); in charger_manager_register_extcon() 1247 return PTR_ERR(charger->consumer); in charger_manager_register_extcon() [all …]
|
D | Kconfig | 23 backup batteries, and optional builtin charger. 40 tristate "MAX8925 battery charger support" 43 Say Y here to enable support for the battery charger in the Maxim 47 tristate "WM831X backup battery charger support" 50 Say Y here to enable support for the backup battery charger 185 Say Y here to enable support for batteries charger integrated into 192 Say Y here to enable support for batteries charger integrated into 201 Say Y here to enable support for charger unit of the DA9150 205 called da9150-charger. 222 integrated charger. [all …]
|
D | gpio-charger.c | 35 struct power_supply *charger; member 41 struct power_supply *charger = devid; in gpio_charger_irq() local 43 power_supply_changed(charger); in gpio_charger_irq() 185 gpio_charger->charger = power_supply_register(&pdev->dev, in gpio_charger_probe() 187 if (IS_ERR(gpio_charger->charger)) { in gpio_charger_probe() 188 ret = PTR_ERR(gpio_charger->charger); in gpio_charger_probe() 198 dev_name(&pdev->dev), gpio_charger->charger); in gpio_charger_probe() 222 free_irq(gpio_charger->irq, gpio_charger->charger); in gpio_charger_remove() 224 power_supply_unregister(gpio_charger->charger); in gpio_charger_remove() 250 power_supply_changed(gpio_charger->charger); in gpio_charger_resume()
|
D | Makefile | 36 obj-$(CONFIG_CHARGER_DA9150) += da9150-charger.o 46 obj-$(CONFIG_CHARGER_PCF50633) += pcf50633-charger.o 55 obj-$(CONFIG_CHARGER_LP8788) += lp8788-charger.o 56 obj-$(CONFIG_CHARGER_GPIO) += gpio-charger.o 57 obj-$(CONFIG_CHARGER_MANAGER) += charger-manager.o 66 obj-$(CONFIG_CHARGER_BQ24735) += bq24735-charger.o 69 obj-$(CONFIG_CHARGER_SMB347) += smb347-charger.o 70 obj-$(CONFIG_CHARGER_TPS65090) += tps65090-charger.o
|
D | bq2415x_charger.c | 170 struct power_supply *charger; member 734 int charger = 0; in bq2415x_set_mode() local 740 charger = 1; in bq2415x_set_mode() 742 if (!charger) in bq2415x_set_mode() 777 if (charger) in bq2415x_set_mode() 789 sysfs_notify(&bq->charger->dev.kobj, NULL, "mode"); in bq2415x_set_mode() 885 sysfs_notify(&bq->charger->dev.kobj, NULL, "timer"); in bq2415x_timer_error() 903 sysfs_notify(&bq->charger->dev.kobj, NULL, "reported_mode"); in bq2415x_timer_work() 1070 bq->charger = power_supply_register(bq->dev, &bq->charger_desc, in bq2415x_power_supply_init() 1072 if (IS_ERR(bq->charger)) { in bq2415x_power_supply_init() [all …]
|
D | max14577_charger.c | 27 struct power_supply *charger; member 599 chg->charger = power_supply_register(&pdev->dev, &max14577_charger_desc, in max14577_charger_probe() 601 if (IS_ERR(chg->charger)) { in max14577_charger_probe() 603 ret = PTR_ERR(chg->charger); in max14577_charger_probe() 624 power_supply_unregister(chg->charger); in max14577_charger_remove()
|
D | ab8500_charger.c | 1373 static int ab8500_charger_ac_en(struct ux500_charger *charger, in ab8500_charger_ac_en() argument 1382 struct ab8500_charger *di = to_ab8500_charger_ac_device_info(charger); in ab8500_charger_ac_en() 1550 static int ab8500_charger_usb_en(struct ux500_charger *charger, in ab8500_charger_usb_en() argument 1558 struct ab8500_charger *di = to_ab8500_charger_usb_device_info(charger); in ab8500_charger_usb_en() 1728 static int ab8500_charger_usb_check_enable(struct ux500_charger *charger, in ab8500_charger_usb_check_enable() argument 1734 struct ab8500_charger *di = to_ab8500_charger_usb_device_info(charger); in ab8500_charger_usb_check_enable() 1777 static int ab8500_charger_ac_check_enable(struct ux500_charger *charger, in ab8500_charger_ac_check_enable() argument 1783 struct ab8500_charger *di = to_ab8500_charger_ac_device_info(charger); in ab8500_charger_ac_check_enable() 1825 static int ab8500_charger_watchdog_kick(struct ux500_charger *charger) in ab8500_charger_watchdog_kick() argument 1830 if (charger->psy->desc->type == POWER_SUPPLY_TYPE_MAINS) in ab8500_charger_watchdog_kick() [all …]
|
D | lp8788-charger.c | 108 struct power_supply *charger; member 424 pchg->charger = power_supply_register(&pdev->dev, in lp8788_psy_register() 427 if (IS_ERR(pchg->charger)) in lp8788_psy_register() 433 power_supply_unregister(pchg->charger); in lp8788_psy_register() 443 power_supply_unregister(pchg->charger); in lp8788_psy_unregister() 487 power_supply_changed(pchg->charger); in lp8788_charger_irq_thread()
|
D | max77693_charger.c | 33 struct power_supply *charger; member 721 chg->charger = power_supply_register(&pdev->dev, in max77693_charger_probe() 724 if (IS_ERR(chg->charger)) { in max77693_charger_probe() 726 ret = PTR_ERR(chg->charger); in max77693_charger_probe() 748 power_supply_unregister(chg->charger); in max77693_charger_remove()
|
D | bq24190_charger.c | 152 struct power_supply *charger; member 463 return sysfs_create_group(&bdi->charger->dev.kobj, in bq24190_sysfs_create_group() 469 sysfs_remove_group(&bdi->charger->dev.kobj, &bq24190_sysfs_attr_group); in bq24190_sysfs_remove_group() 1228 power_supply_changed(bdi->charger); in bq24190_irq_handler_thread() 1371 bdi->charger = power_supply_register(dev, &bq24190_charger_desc, in bq24190_probe() 1373 if (IS_ERR(bdi->charger)) { in bq24190_probe() 1375 ret = PTR_ERR(bdi->charger); in bq24190_probe() 1410 power_supply_unregister(bdi->charger); in bq24190_probe() 1429 power_supply_unregister(bdi->charger); in bq24190_remove() 1466 power_supply_changed(bdi->charger); in bq24190_pm_resume()
|
D | bq25890_charger.c | 92 struct power_supply *charger; member 559 power_supply_changed(bq->charger); in bq25890_irq_handler_thread() 674 bq->charger = power_supply_register(bq->dev, &bq25890_power_supply_desc, in bq25890_power_supply_init() 677 return PTR_ERR_OR_ZERO(bq->charger); in bq25890_power_supply_init() 700 power_supply_changed(bq->charger); in bq25890_usb_work() 906 power_supply_unregister(bq->charger); in bq25890_remove() 951 power_supply_changed(bq->charger); in bq25890_resume()
|
D | pm2301_charger.c | 568 static int pm2xxx_charger_update_charger_current(struct ux500_charger *charger, in pm2xxx_charger_update_charger_current() argument 576 if (charger->psy->desc->type == POWER_SUPPLY_TYPE_MAINS) in pm2xxx_charger_update_charger_current() 577 pm2 = to_pm2xxx_charger_ac_device_info(charger); in pm2xxx_charger_update_charger_current() 707 static int pm2xxx_charger_ac_en(struct ux500_charger *charger, in pm2xxx_charger_ac_en() argument 715 struct pm2xxx_charger *pm2 = to_pm2xxx_charger_ac_device_info(charger); in pm2xxx_charger_ac_en() 825 static int pm2xxx_charger_watchdog_kick(struct ux500_charger *charger) in pm2xxx_charger_watchdog_kick() argument 830 if (charger->psy->desc->type == POWER_SUPPLY_TYPE_MAINS) in pm2xxx_charger_watchdog_kick() 831 pm2 = to_pm2xxx_charger_ac_device_info(charger); in pm2xxx_charger_watchdog_kick()
|
D | bq24257_charger.c | 94 struct power_supply *charger; member 680 power_supply_changed(bq->charger); in bq24257_irq_handler_thread() 867 bq->charger = devm_power_supply_register(bq->dev, in bq24257_power_supply_init() 871 return PTR_ERR_OR_ZERO(bq->charger); in bq24257_power_supply_init() 1087 ret = sysfs_create_group(&bq->charger->dev.kobj, &bq24257_attr_group); in bq24257_probe() 1103 sysfs_remove_group(&bq->charger->dev.kobj, &bq24257_attr_group); in bq24257_remove() 1147 power_supply_changed(bq->charger); in bq24257_resume()
|
D | rt9455_charger.c | 246 struct power_supply *charger; member 1185 if (info->charger) in rt9455_irq_handler_thread() 1186 power_supply_changed(info->charger); in rt9455_irq_handler_thread() 1487 power_supply_changed(info->charger); in rt9455_pwr_rdy_work_callback() 1547 power_supply_changed(info->charger); in rt9455_batt_presence_work_callback() 1690 info->charger = devm_power_supply_register(dev, &rt9455_charger_desc, in rt9455_probe() 1692 if (IS_ERR(info->charger)) { in rt9455_probe() 1694 ret = PTR_ERR(info->charger); in rt9455_probe()
|
D | intel_mid_battery.c | 209 static int pmic_scu_ipc_set_charger(int charger) in pmic_scu_ipc_set_charger() argument 211 return intel_scu_ipc_simple_command(IPCMSG_BATTERY, charger); in pmic_scu_ipc_set_charger()
|
/drivers/acpi/ |
D | ac.c | 94 struct power_supply *charger; member 275 kobject_uevent(&ac->charger->dev.kobj, KOBJ_CHANGE); in acpi_ac_notify() 354 ac->charger = power_supply_register(&ac->device->dev, in acpi_ac_add() 356 if (IS_ERR(ac->charger)) { in acpi_ac_add() 357 result = PTR_ERR(ac->charger); in acpi_ac_add() 396 kobject_uevent(&ac->charger->dev.kobj, KOBJ_CHANGE); in acpi_ac_resume() 413 power_supply_unregister(ac->charger); in acpi_ac_remove()
|
D | sbs.c | 104 struct power_supply *charger; member 592 sbs->charger = power_supply_register(&sbs->device->dev, in acpi_charger_add() 594 if (IS_ERR(sbs->charger)) { in acpi_charger_add() 595 result = PTR_ERR(sbs->charger); in acpi_charger_add() 596 sbs->charger = NULL; in acpi_charger_add() 607 if (sbs->charger) in acpi_charger_remove() 608 power_supply_unregister(sbs->charger); in acpi_charger_remove() 622 kobject_uevent(&sbs->charger->dev.kobj, KOBJ_CHANGE); in acpi_sbs_callback()
|
/drivers/staging/nvec/ |
D | Kconfig | 34 tristate "NVEC charger and battery" 37 Say Y to enable support for battery and charger interface for
|