Searched refs:psy (Results 1 - 25 of 65) sorted by relevance

123

/drivers/power/
H A Dpower_supply_leds.c22 static void power_supply_update_bat_leds(struct power_supply *psy) argument
28 if (psy->get_property(psy, POWER_SUPPLY_PROP_STATUS, &status))
31 dev_dbg(psy->dev, "%s %d\n", __func__, status.intval);
35 led_trigger_event(psy->charging_full_trig, LED_FULL);
36 led_trigger_event(psy->charging_trig, LED_OFF);
37 led_trigger_event(psy->full_trig, LED_FULL);
38 led_trigger_event(psy->charging_blink_full_solid_trig,
42 led_trigger_event(psy->charging_full_trig, LED_FULL);
43 led_trigger_event(psy
58 power_supply_create_bat_triggers(struct power_supply *psy) argument
100 power_supply_remove_bat_triggers(struct power_supply *psy) argument
114 power_supply_update_gen_leds(struct power_supply *psy) argument
129 power_supply_create_gen_triggers(struct power_supply *psy) argument
140 power_supply_remove_gen_triggers(struct power_supply *psy) argument
148 power_supply_update_leds(struct power_supply *psy) argument
156 power_supply_create_triggers(struct power_supply *psy) argument
163 power_supply_remove_triggers(struct power_supply *psy) argument
[all...]
H A Dpower_supply_core.c61 struct power_supply *psy = data; local
64 if (__power_supply_is_supplied_by(psy, pst)) {
75 struct power_supply *psy = container_of(work, struct power_supply, local
78 dev_dbg(psy->dev, "%s\n", __func__);
80 spin_lock_irqsave(&psy->changed_lock, flags);
88 if (likely(psy->changed)) {
89 psy->changed = false;
90 spin_unlock_irqrestore(&psy->changed_lock, flags);
91 class_for_each_device(power_supply_class, NULL, psy,
93 power_supply_update_leds(psy);
110 power_supply_changed(struct power_supply *psy) argument
130 struct power_supply *psy = data; local
154 power_supply_populate_supplied_from(struct power_supply *psy) argument
199 power_supply_check_supplies(struct power_supply *psy) argument
250 power_supply_check_supplies(struct power_supply *psy) argument
259 struct power_supply *psy = data; local
269 power_supply_am_i_supplied(struct power_supply *psy) argument
285 struct power_supply *psy = dev_get_drvdata(dev); local
315 power_supply_set_battery_charged(struct power_supply *psy) argument
329 struct power_supply *psy = dev_get_drvdata(dev); local
369 power_supply_powers(struct power_supply *psy, struct device *dev) argument
397 struct power_supply *psy; local
416 psy_register_thermal(struct power_supply *psy) argument
434 psy_unregister_thermal(struct power_supply *psy) argument
445 struct power_supply *psy; local
461 struct power_supply *psy; local
477 struct power_supply *psy; local
495 psy_register_cooler(struct power_supply *psy) argument
512 psy_unregister_cooler(struct power_supply *psy) argument
519 psy_register_thermal(struct power_supply *psy) argument
524 psy_unregister_thermal(struct power_supply *psy) argument
528 psy_register_cooler(struct power_supply *psy) argument
533 psy_unregister_cooler(struct power_supply *psy) argument
538 __power_supply_register(struct device *parent, struct power_supply *psy, bool ws) argument
608 power_supply_register(struct device *parent, struct power_supply *psy) argument
614 power_supply_register_no_ws(struct device *parent, struct power_supply *psy) argument
620 power_supply_unregister(struct power_supply *psy) argument
[all...]
H A Dpower_supply.h31 extern void power_supply_update_leds(struct power_supply *psy);
32 extern int power_supply_create_triggers(struct power_supply *psy);
33 extern void power_supply_remove_triggers(struct power_supply *psy);
37 static inline void power_supply_update_leds(struct power_supply *psy) {} argument
38 static inline int power_supply_create_triggers(struct power_supply *psy) argument
40 static inline void power_supply_remove_triggers(struct power_supply *psy) {} argument
H A Dgeneric-adc-battery.c47 struct power_supply psy; member in struct:gab
56 static struct gab *to_generic_bat(struct power_supply *psy) argument
58 return container_of(psy, struct gab, psy);
61 static void gab_ext_power_changed(struct power_supply *psy) argument
63 struct gab *adc_bat = to_generic_bat(psy);
143 static int gab_get_property(struct power_supply *psy, argument
152 adc_bat = to_generic_bat(psy);
154 dev_err(psy->dev, "no battery infos ?!\n");
213 is_plugged = power_supply_am_i_supplied(&adc_bat->psy);
242 struct power_supply *psy; local
[all...]
H A Dlp8727_charger.c92 struct lp8727_psy *psy; member in struct:lp8727_chg
245 power_supply_changed(&pchg->psy->ac);
246 power_supply_changed(&pchg->psy->usb);
247 power_supply_changed(&pchg->psy->batt);
310 static int lp8727_charger_get_property(struct power_supply *psy, argument
314 struct lp8727_chg *pchg = dev_get_drvdata(psy->dev->parent);
319 val->intval = lp8727_is_charger_attached(psy->name, pchg->devid);
336 static int lp8727_battery_get_property(struct power_supply *psy, argument
340 struct lp8727_chg *pchg = dev_get_drvdata(psy->dev->parent);
347 if (!lp8727_is_charger_attached(psy
401 lp8727_charger_changed(struct power_supply *psy) argument
423 struct lp8727_psy *psy; local
475 struct lp8727_psy *psy = pchg->psy; local
[all...]
H A Dmax8903_charger.c34 struct power_supply psy; member in struct:max8903_data
46 static int max8903_get_property(struct power_supply *psy, argument
50 struct max8903_data *data = container_of(psy,
51 struct max8903_data, psy);
107 old_type = data->psy.type;
110 data->psy.type = POWER_SUPPLY_TYPE_MAINS;
112 data->psy.type = POWER_SUPPLY_TYPE_USB;
114 data->psy.type = POWER_SUPPLY_TYPE_BATTERY;
116 if (old_type != data->psy.type)
117 power_supply_changed(&data->psy);
[all...]
H A Dtosa_battery.c29 struct power_supply psy; member in struct:tosa_bat
64 value = wm97xx_read_aux_adc(dev_get_drvdata(bat->psy.dev->parent),
84 value = wm97xx_read_aux_adc(dev_get_drvdata(bat->psy.dev->parent),
94 static int tosa_bat_get_property(struct power_supply *psy, argument
99 struct tosa_bat *bat = container_of(psy, struct tosa_bat, psy);
146 static void tosa_bat_external_power_changed(struct power_supply *psy) argument
161 struct power_supply *psy = &bat->psy; local
168 printk(KERN_NOTICE "%s not present\n", psy
[all...]
H A Dtwl4030_madc_battery.c24 struct power_supply psy; member in struct:twl4030_madc_battery
112 static int twl4030_madc_bat_get_property(struct power_supply *psy, argument
116 struct twl4030_madc_battery *bat = container_of(psy,
117 struct twl4030_madc_battery, psy);
177 static void twl4030_madc_bat_ext_changed(struct power_supply *psy) argument
179 struct twl4030_madc_battery *bat = container_of(psy,
180 struct twl4030_madc_battery, psy);
182 power_supply_changed(&bat->psy);
200 twl4030_madc_bat->psy.name = "twl4030_battery";
201 twl4030_madc_bat->psy
[all...]
H A Dpower_supply_sysfs.c72 struct power_supply *psy = dev_get_drvdata(dev); local
77 value.intval = psy->type;
79 ret = psy->get_property(psy, off, &value);
119 struct power_supply *psy = dev_get_drvdata(dev); local
131 ret = psy->set_property(psy, off, &value);
223 struct power_supply *psy = dev_get_drvdata(dev); local
230 for (i = 0; i < psy->num_properties; i++) {
231 int property = psy
284 struct power_supply *psy = dev_get_drvdata(dev); local
[all...]
H A Dcollie_battery.c32 struct power_supply psy; member in struct:collie_bat
95 static int collie_bat_get_property(struct power_supply *psy, argument
100 struct collie_bat *bat = container_of(psy, struct collie_bat, psy);
142 static void collie_bat_external_power_changed(struct power_supply *psy) argument
157 struct power_supply *psy = &bat->psy; local
164 printk(KERN_NOTICE "%s not present\n", psy->name);
167 } else if (power_supply_am_i_supplied(psy)) {
190 power_supply_changed(psy);
[all...]
H A Ds3c_adc_battery.c31 struct power_supply psy; member in struct:s3c_adc_bat
44 static void s3c_adc_bat_ext_power_changed(struct power_supply *psy) argument
72 static int s3c_adc_backup_bat_get_property(struct power_supply *psy, argument
76 struct s3c_adc_bat *bat = container_of(psy, struct s3c_adc_bat, psy);
79 dev_err(psy->dev, "%s: no battery infos ?!\n", __func__);
109 .psy = {
140 static int s3c_adc_bat_get_property(struct power_supply *psy, argument
144 struct s3c_adc_bat *bat = container_of(psy, struct s3c_adc_bat, psy);
[all...]
H A Dds2780_battery.c53 to_ds2780_device_info(struct power_supply *psy) argument
55 return container_of(psy, struct ds2780_device_info, bat);
383 static int ds2780_battery_get_property(struct power_supply *psy, argument
388 struct ds2780_device_info *dev_info = to_ds2780_device_info(psy);
457 struct power_supply *psy = to_power_supply(dev); local
458 struct ds2780_device_info *dev_info = to_ds2780_device_info(psy);
476 struct power_supply *psy = to_power_supply(dev); local
477 struct ds2780_device_info *dev_info = to_ds2780_device_info(psy);
511 struct power_supply *psy = to_power_supply(dev); local
512 struct ds2780_device_info *dev_info = to_ds2780_device_info(psy);
529 struct power_supply *psy = to_power_supply(dev); local
549 struct power_supply *psy = to_power_supply(dev); local
566 struct power_supply *psy = to_power_supply(dev); local
592 struct power_supply *psy = to_power_supply(dev); local
610 struct power_supply *psy = to_power_supply(dev); local
636 struct power_supply *psy = to_power_supply(dev); local
653 struct power_supply *psy = to_power_supply(dev); local
689 struct power_supply *psy = to_power_supply(dev); local
706 struct power_supply *psy = to_power_supply(dev); local
[all...]
H A Dds2781_battery.c51 to_ds2781_device_info(struct power_supply *psy) argument
53 return container_of(psy, struct ds2781_device_info, bat);
385 static int ds2781_battery_get_property(struct power_supply *psy, argument
390 struct ds2781_device_info *dev_info = to_ds2781_device_info(psy);
459 struct power_supply *psy = to_power_supply(dev); local
460 struct ds2781_device_info *dev_info = to_ds2781_device_info(psy);
478 struct power_supply *psy = to_power_supply(dev); local
479 struct ds2781_device_info *dev_info = to_ds2781_device_info(psy);
513 struct power_supply *psy = to_power_supply(dev); local
514 struct ds2781_device_info *dev_info = to_ds2781_device_info(psy);
531 struct power_supply *psy = to_power_supply(dev); local
551 struct power_supply *psy = to_power_supply(dev); local
568 struct power_supply *psy = to_power_supply(dev); local
594 struct power_supply *psy = to_power_supply(dev); local
612 struct power_supply *psy = to_power_supply(dev); local
638 struct power_supply *psy = to_power_supply(dev); local
653 struct power_supply *psy = to_power_supply(dev); local
687 struct power_supply *psy = to_power_supply(dev); local
703 struct power_supply *psy = to_power_supply(dev); local
[all...]
H A Disp1704_charger.c61 struct power_supply psy; member in struct:isp1704_charger
262 isp->psy.type = POWER_SUPPLY_TYPE_USB_DCP;
265 isp->psy.type = POWER_SUPPLY_TYPE_USB;
274 if (isp->psy.type != POWER_SUPPLY_TYPE_USB_DCP) {
283 isp->psy.type = POWER_SUPPLY_TYPE_USB_CDP;
290 isp->psy.type = POWER_SUPPLY_TYPE_USB;
309 power_supply_changed(&isp->psy);
325 static int isp1704_charger_get_property(struct power_supply *psy, argument
330 container_of(psy, struct isp1704_charger, psy);
[all...]
H A D88pm860x_charger.c288 struct power_supply *psy; local
296 psy = power_supply_get_by_name(pm860x_supplied_to[0]);
297 if (!psy)
299 ret = psy->get_property(psy, POWER_SUPPLY_PROP_VOLTAGE_NOW, &data);
304 ret = psy->get_property(psy, POWER_SUPPLY_PROP_PRESENT, &data);
424 struct power_supply *psy; local
430 psy = power_supply_get_by_name(pm860x_supplied_to[0]);
431 if (!psy)
468 struct power_supply *psy; local
583 pm860x_usb_get_prop(struct power_supply *psy, enum power_supply_property psp, union power_supply_propval *val) argument
[all...]
H A Djz4740-battery.c55 static inline struct jz_battery *psy_to_jz_battery(struct power_supply *psy) argument
57 return container_of(psy, struct jz_battery, battery);
104 static int jz_battery_get_capacity(struct power_supply *psy) argument
106 struct jz_battery *jz_battery = psy_to_jz_battery(psy);
128 static int jz_battery_get_property(struct power_supply *psy, argument
131 struct jz_battery *jz_battery = psy_to_jz_battery(psy);
150 val->intval = jz_battery_get_capacity(psy);
172 static void jz_battery_external_power_changed(struct power_supply *psy) argument
174 struct jz_battery *jz_battery = psy_to_jz_battery(psy);
H A Dgpio-charger.c45 static inline struct gpio_charger *psy_to_gpio_charger(struct power_supply *psy) argument
47 return container_of(psy, struct gpio_charger, charger);
50 static int gpio_charger_get_property(struct power_supply *psy, argument
53 struct gpio_charger *gpio_charger = psy_to_gpio_charger(psy);
H A Dab8500_charger.c406 * @psy: pointer to power_supply_that have changed.
410 struct power_supply *psy)
425 power_supply_changed(psy);
438 sysfs_notify(&di->usb_chg.psy.dev->kobj, NULL, "present");
1519 ab8500_power_supply_changed(di, &di->ac_chg.psy);
1675 ab8500_power_supply_changed(di, &di->usb_chg.psy);
1814 if (charger->psy.type == POWER_SUPPLY_TYPE_MAINS)
1816 else if (charger->psy.type == POWER_SUPPLY_TYPE_USB)
1842 if (charger->psy.type == POWER_SUPPLY_TYPE_MAINS)
1844 else if (charger->psy
409 ab8500_power_supply_changed(struct ab8500_charger *di, struct power_supply *psy) argument
1931 struct power_supply *psy; local
2952 ab8500_charger_ac_get_property(struct power_supply *psy, enum power_supply_property psp, union power_supply_propval *val) argument
3019 ab8500_charger_usb_get_property(struct power_supply *psy, enum power_supply_property psp, union power_supply_propval *val) argument
[all...]
H A Dda9030_battery.c92 struct power_supply psy; member in struct:da9030_charger
248 power_supply_changed(&charger->psy);
340 static int da9030_battery_get_property(struct power_supply *psy, argument
345 charger = container_of(psy, struct da9030_charger, psy);
450 struct power_supply *psy = &charger->psy; local
453 psy->name = info->name;
454 psy->use_for_apm = info->use_for_apm;
455 psy
[all...]
H A Dpm2301_charger.c219 power_supply_changed(&pm2->ac_chg.psy);
232 power_supply_changed(&pm2->ac_chg.psy);
576 if (charger->psy.type == POWER_SUPPLY_TYPE_MAINS)
604 static int pm2xxx_charger_ac_get_property(struct power_supply *psy, argument
610 pm2 = to_pm2xxx_charger_ac_device_info(psy_to_ux500_charger(psy));
819 power_supply_changed(&pm2->ac_chg.psy);
830 if (charger->psy.type == POWER_SUPPLY_TYPE_MAINS)
848 power_supply_changed(&pm2->ac_chg.psy);
849 sysfs_notify(&pm2->ac_chg.psy.dev->kobj, NULL, "present");
865 power_supply_changed(&pm2->ac_chg.psy);
[all...]
H A Dbq2415x_charger.c805 struct power_supply *psy = v; local
814 if (psy != bq->notify_psy)
819 ret = psy->get_property(psy, POWER_SUPPLY_PROP_CURRENT_MAX, &prop);
997 static int bq2415x_power_supply_get_property(struct power_supply *psy, argument
1001 struct bq2415x_device *bq = container_of(psy, struct bq2415x_device,
1087 struct power_supply *psy = dev_get_drvdata(dev); local
1088 struct bq2415x_device *bq = container_of(psy, struct bq2415x_device,
1121 struct power_supply *psy = dev_get_drvdata(dev); local
1122 struct bq2415x_device *bq = container_of(psy, struc
1143 struct power_supply *psy = dev_get_drvdata(dev); local
1168 struct power_supply *psy = dev_get_drvdata(dev); local
1221 struct power_supply *psy = dev_get_drvdata(dev); local
1259 struct power_supply *psy = dev_get_drvdata(dev); local
1288 struct power_supply *psy = dev_get_drvdata(dev); local
1324 struct power_supply *psy = dev_get_drvdata(dev); local
1343 struct power_supply *psy = dev_get_drvdata(dev); local
1375 struct power_supply *psy = dev_get_drvdata(dev); local
1404 struct power_supply *psy = dev_get_drvdata(dev); local
1440 struct power_supply *psy = dev_get_drvdata(dev); local
[all...]
H A Dda9052-battery.c172 struct power_supply psy; member in struct:da9052_battery
455 power_supply_changed(&bat->psy);
496 static int da9052_bat_get_property(struct power_supply *psy, argument
502 struct da9052_battery *bat = container_of(psy, struct da9052_battery,
503 psy);
603 bat->psy = template_battery;
611 bat->psy.use_for_apm = pdata->use_for_apm;
613 bat->psy.use_for_apm = 1;
628 ret = power_supply_register(&pdev->dev, &bat->psy);
649 power_supply_unregister(&bat->psy);
[all...]
H A Dbq24735-charger.c52 static inline struct bq24735 *to_bq24735(struct power_supply *psy) argument
54 return container_of(psy, struct bq24735, charger);
178 struct power_supply *psy = devid; local
179 struct bq24735 *charger = to_bq24735(psy);
186 power_supply_changed(psy);
191 static int bq24735_charger_get_property(struct power_supply *psy, argument
197 charger = container_of(psy, struct bq24735, charger);
/drivers/mfd/
H A Dab8500-sysctrl.c34 struct power_supply *psy; local
48 psy = power_supply_get_by_name(pss[i]);
49 if (!psy)
52 ret = psy->get_property(psy, POWER_SUPPLY_PROP_ONLINE, &val);
64 psy = power_supply_get_by_name("ab8500_btemp");
65 if (psy) {
66 ret = psy->get_property(psy, POWER_SUPPLY_PROP_TECHNOLOGY,
/drivers/staging/nvec/
H A Dnvec_power.c224 static int nvec_power_get_property(struct power_supply *psy, argument
228 struct nvec_power *power = dev_get_drvdata(psy->dev->parent);
240 static int nvec_battery_get_property(struct power_supply *psy, argument
244 struct nvec_power *power = dev_get_drvdata(psy->dev->parent);
376 struct power_supply *psy; local
389 psy = &nvec_psy;
397 psy = &nvec_bat_psy;
410 return power_supply_register(&pdev->dev, psy);

Completed in 246 milliseconds

123