Home
last modified time | relevance | path

Searched refs:psy (Results 1 – 25 of 52) sorted by relevance

123

/drivers/power/
Dpower_supply_leds.c22 static void power_supply_update_bat_leds(struct power_supply *psy) in power_supply_update_bat_leds() argument
28 if (psy->get_property(psy, POWER_SUPPLY_PROP_STATUS, &status)) in power_supply_update_bat_leds()
31 dev_dbg(psy->dev, "%s %d\n", __func__, status.intval); in power_supply_update_bat_leds()
35 led_trigger_event(psy->charging_full_trig, LED_FULL); in power_supply_update_bat_leds()
36 led_trigger_event(psy->charging_trig, LED_OFF); in power_supply_update_bat_leds()
37 led_trigger_event(psy->full_trig, LED_FULL); in power_supply_update_bat_leds()
38 led_trigger_event(psy->charging_blink_full_solid_trig, in power_supply_update_bat_leds()
42 led_trigger_event(psy->charging_full_trig, LED_FULL); in power_supply_update_bat_leds()
43 led_trigger_event(psy->charging_trig, LED_FULL); in power_supply_update_bat_leds()
44 led_trigger_event(psy->full_trig, LED_OFF); in power_supply_update_bat_leds()
[all …]
Dpower_supply_core.c30 struct power_supply *psy = (struct power_supply *)data; in __power_supply_changed_work() local
34 for (i = 0; i < psy->num_supplicants; i++) in __power_supply_changed_work()
35 if (!strcmp(psy->supplied_to[i], pst->name)) { in __power_supply_changed_work()
45 struct power_supply *psy = container_of(work, struct power_supply, in power_supply_changed_work() local
48 dev_dbg(psy->dev, "%s\n", __func__); in power_supply_changed_work()
50 spin_lock_irqsave(&psy->changed_lock, flags); in power_supply_changed_work()
51 if (psy->changed) { in power_supply_changed_work()
52 psy->changed = false; in power_supply_changed_work()
53 spin_unlock_irqrestore(&psy->changed_lock, flags); in power_supply_changed_work()
55 class_for_each_device(power_supply_class, NULL, psy, in power_supply_changed_work()
[all …]
Dlp8727_charger.c90 struct lp8727_psy *psy; member
230 power_supply_changed(&pchg->psy->ac); in lp8727_delayed_func()
231 power_supply_changed(&pchg->psy->usb); in lp8727_delayed_func()
232 power_supply_changed(&pchg->psy->batt); in lp8727_delayed_func()
280 static int lp8727_charger_get_property(struct power_supply *psy, in lp8727_charger_get_property() argument
284 struct lp8727_chg *pchg = dev_get_drvdata(psy->dev->parent); in lp8727_charger_get_property()
287 val->intval = lp8727_is_charger_attached(psy->name, in lp8727_charger_get_property()
293 static int lp8727_battery_get_property(struct power_supply *psy, in lp8727_battery_get_property() argument
297 struct lp8727_chg *pchg = dev_get_drvdata(psy->dev->parent); in lp8727_battery_get_property()
302 if (lp8727_is_charger_attached(psy->name, pchg->devid)) { in lp8727_battery_get_property()
[all …]
Dmax8903_charger.c34 struct power_supply psy; member
46 static int max8903_get_property(struct power_supply *psy, in max8903_get_property() argument
50 struct max8903_data *data = container_of(psy, in max8903_get_property()
51 struct max8903_data, psy); in max8903_get_property()
107 old_type = data->psy.type; in max8903_dcin()
110 data->psy.type = POWER_SUPPLY_TYPE_MAINS; in max8903_dcin()
112 data->psy.type = POWER_SUPPLY_TYPE_USB; in max8903_dcin()
114 data->psy.type = POWER_SUPPLY_TYPE_BATTERY; in max8903_dcin()
116 if (old_type != data->psy.type) in max8903_dcin()
117 power_supply_changed(&data->psy); in max8903_dcin()
[all …]
Dtosa_battery.c29 struct power_supply psy; member
64 value = wm97xx_read_aux_adc(dev_get_drvdata(bat->psy.dev->parent), in tosa_read_bat()
84 value = wm97xx_read_aux_adc(dev_get_drvdata(bat->psy.dev->parent), in tosa_read_temp()
94 static int tosa_bat_get_property(struct power_supply *psy, in tosa_bat_get_property() argument
99 struct tosa_bat *bat = container_of(psy, struct tosa_bat, psy); in tosa_bat_get_property()
146 static void tosa_bat_external_power_changed(struct power_supply *psy) in tosa_bat_external_power_changed() argument
161 struct power_supply *psy = &bat->psy; in tosa_bat_update() local
168 printk(KERN_NOTICE "%s not present\n", psy->name); in tosa_bat_update()
171 } else if (power_supply_am_i_supplied(psy)) { in tosa_bat_update()
194 power_supply_changed(psy); in tosa_bat_update()
[all …]
Dpower_supply_sysfs.c71 struct power_supply *psy = dev_get_drvdata(dev); in power_supply_show_property() local
76 value.intval = psy->type; in power_supply_show_property()
78 ret = psy->get_property(psy, off, &value); in power_supply_show_property()
114 struct power_supply *psy = dev_get_drvdata(dev); in power_supply_store_property() local
126 ret = psy->set_property(psy, off, &value); in power_supply_store_property()
195 struct power_supply *psy = dev_get_drvdata(dev); in power_supply_attr_is_visible() local
202 for (i = 0; i < psy->num_properties; i++) { in power_supply_attr_is_visible()
203 int property = psy->properties[i]; in power_supply_attr_is_visible()
206 if (psy->property_is_writeable && in power_supply_attr_is_visible()
207 psy->property_is_writeable(psy, property) > 0) in power_supply_attr_is_visible()
[all …]
Dcollie_battery.c32 struct power_supply psy; member
95 static int collie_bat_get_property(struct power_supply *psy, in collie_bat_get_property() argument
100 struct collie_bat *bat = container_of(psy, struct collie_bat, psy); in collie_bat_get_property()
142 static void collie_bat_external_power_changed(struct power_supply *psy) in collie_bat_external_power_changed() argument
157 struct power_supply *psy = &bat->psy; in collie_bat_update() local
164 printk(KERN_NOTICE "%s not present\n", psy->name); in collie_bat_update()
167 } else if (power_supply_am_i_supplied(psy)) { in collie_bat_update()
190 power_supply_changed(psy); in collie_bat_update()
225 .psy = {
255 .psy = {
[all …]
Ds3c_adc_battery.c31 struct power_supply psy; member
44 static void s3c_adc_bat_ext_power_changed(struct power_supply *psy) in s3c_adc_bat_ext_power_changed() argument
72 static int s3c_adc_backup_bat_get_property(struct power_supply *psy, in s3c_adc_backup_bat_get_property() argument
76 struct s3c_adc_bat *bat = container_of(psy, struct s3c_adc_bat, psy); in s3c_adc_backup_bat_get_property()
79 dev_err(psy->dev, "%s: no battery infos ?!\n", __func__); in s3c_adc_backup_bat_get_property()
109 .psy = {
140 static int s3c_adc_bat_get_property(struct power_supply *psy, in s3c_adc_bat_get_property() argument
144 struct s3c_adc_bat *bat = container_of(psy, struct s3c_adc_bat, psy); in s3c_adc_bat_get_property()
152 dev_err(psy->dev, "no battery infos ?!\n"); in s3c_adc_bat_get_property()
233 .psy = {
[all …]
Dds2781_battery.c52 to_ds2781_device_info(struct power_supply *psy) in to_ds2781_device_info() argument
54 return container_of(psy, struct ds2781_device_info, bat); in to_ds2781_device_info()
390 static int ds2781_battery_get_property(struct power_supply *psy, in ds2781_battery_get_property() argument
395 struct ds2781_device_info *dev_info = to_ds2781_device_info(psy); in ds2781_battery_get_property()
464 struct power_supply *psy = to_power_supply(dev); in ds2781_get_pmod_enabled() local
465 struct ds2781_device_info *dev_info = to_ds2781_device_info(psy); in ds2781_get_pmod_enabled()
483 struct power_supply *psy = to_power_supply(dev); in ds2781_set_pmod_enabled() local
484 struct ds2781_device_info *dev_info = to_ds2781_device_info(psy); in ds2781_set_pmod_enabled()
518 struct power_supply *psy = to_power_supply(dev); in ds2781_get_sense_resistor_value() local
519 struct ds2781_device_info *dev_info = to_ds2781_device_info(psy); in ds2781_get_sense_resistor_value()
[all …]
Dds2780_battery.c54 to_ds2780_device_info(struct power_supply *psy) in to_ds2780_device_info() argument
56 return container_of(psy, struct ds2780_device_info, bat); in to_ds2780_device_info()
387 static int ds2780_battery_get_property(struct power_supply *psy, in ds2780_battery_get_property() argument
392 struct ds2780_device_info *dev_info = to_ds2780_device_info(psy); in ds2780_battery_get_property()
461 struct power_supply *psy = to_power_supply(dev); in ds2780_get_pmod_enabled() local
462 struct ds2780_device_info *dev_info = to_ds2780_device_info(psy); in ds2780_get_pmod_enabled()
480 struct power_supply *psy = to_power_supply(dev); in ds2780_set_pmod_enabled() local
481 struct ds2780_device_info *dev_info = to_ds2780_device_info(psy); in ds2780_set_pmod_enabled()
515 struct power_supply *psy = to_power_supply(dev); in ds2780_get_sense_resistor_value() local
516 struct ds2780_device_info *dev_info = to_ds2780_device_info(psy); in ds2780_get_sense_resistor_value()
[all …]
Disp1704_charger.c58 struct power_supply psy; member
260 isp->psy.type = isp1704_charger_type(isp); in isp1704_charger_work()
263 switch (isp->psy.type) { in isp1704_charger_work()
286 isp->psy.type = POWER_SUPPLY_TYPE_USB; in isp1704_charger_work()
311 power_supply_changed(&isp->psy); in isp1704_charger_work()
332 static int isp1704_charger_get_property(struct power_supply *psy, in isp1704_charger_get_property() argument
337 container_of(psy, struct isp1704_charger, psy); in isp1704_charger_get_property()
431 isp->psy.name = "isp1704"; in isp1704_charger_probe()
432 isp->psy.type = POWER_SUPPLY_TYPE_USB; in isp1704_charger_probe()
433 isp->psy.properties = power_props; in isp1704_charger_probe()
[all …]
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) {} in power_supply_update_leds() argument
38 static inline int power_supply_create_triggers(struct power_supply *psy) in power_supply_create_triggers() argument
40 static inline void power_supply_remove_triggers(struct power_supply *psy) {} in power_supply_remove_triggers() argument
Dab8500_charger.c323 struct power_supply *psy) in ab8500_power_supply_changed() argument
338 power_supply_changed(psy); in ab8500_power_supply_changed()
347 sysfs_notify(&di->usb_chg.psy.dev->kobj, NULL, "present"); in ab8500_charger_set_usb_connected()
1193 ab8500_power_supply_changed(di, &di->ac_chg.psy); in ab8500_charger_ac_en()
1324 ab8500_power_supply_changed(di, &di->usb_chg.psy); in ab8500_charger_usb_en()
1341 if (charger->psy.type == POWER_SUPPLY_TYPE_MAINS) in ab8500_charger_watchdog_kick()
1343 else if (charger->psy.type == POWER_SUPPLY_TYPE_USB) in ab8500_charger_watchdog_kick()
1370 if (charger->psy.type == POWER_SUPPLY_TYPE_MAINS) in ab8500_charger_update_charger_current()
1372 else if (charger->psy.type == POWER_SUPPLY_TYPE_USB) in ab8500_charger_update_charger_current()
1406 struct power_supply *psy; in ab8500_charger_get_ext_psy_data() local
[all …]
Dda9030_battery.c91 struct power_supply psy; member
247 power_supply_changed(&charger->psy); in da9030_set_charge()
339 static int da9030_battery_get_property(struct power_supply *psy, in da9030_battery_get_property() argument
344 charger = container_of(psy, struct da9030_charger, psy); in da9030_battery_get_property()
449 struct power_supply *psy = &charger->psy; in da9030_battery_setup_psy() local
452 psy->name = info->name; in da9030_battery_setup_psy()
453 psy->use_for_apm = info->use_for_apm; in da9030_battery_setup_psy()
454 psy->type = POWER_SUPPLY_TYPE_BATTERY; in da9030_battery_setup_psy()
455 psy->get_property = da9030_battery_get_property; in da9030_battery_setup_psy()
457 psy->properties = da9030_battery_props; in da9030_battery_setup_psy()
[all …]
Dda9052-battery.c172 struct power_supply psy; member
446 power_supply_changed(&bat->psy); in da9052_bat_irq()
487 static int da9052_bat_get_property(struct power_supply *psy, in da9052_bat_get_property() argument
493 struct da9052_battery *bat = container_of(psy, struct da9052_battery, in da9052_bat_get_property()
494 psy); in da9052_bat_get_property()
585 bat->psy = template_battery; in da9052_bat_probe()
593 bat->psy.use_for_apm = pdata->use_for_apm; in da9052_bat_probe()
595 bat->psy.use_for_apm = 1; in da9052_bat_probe()
611 ret = power_supply_register(&pdev->dev, &bat->psy); in da9052_bat_probe()
636 power_supply_unregister(&bat->psy); in da9052_bat_remove()
Djz4740-battery.c55 static inline struct jz_battery *psy_to_jz_battery(struct power_supply *psy) in psy_to_jz_battery() argument
57 return container_of(psy, struct jz_battery, battery); in psy_to_jz_battery()
104 static int jz_battery_get_capacity(struct power_supply *psy) in jz_battery_get_capacity() argument
106 struct jz_battery *jz_battery = psy_to_jz_battery(psy); in jz_battery_get_capacity()
128 static int jz_battery_get_property(struct power_supply *psy, in jz_battery_get_property() argument
131 struct jz_battery *jz_battery = psy_to_jz_battery(psy); in jz_battery_get_property()
150 val->intval = jz_battery_get_capacity(psy); in jz_battery_get_property()
172 static void jz_battery_external_power_changed(struct power_supply *psy) in jz_battery_external_power_changed() argument
174 struct jz_battery *jz_battery = psy_to_jz_battery(psy); in jz_battery_external_power_changed()
Dds2760_battery.c352 static void ds2760_battery_external_power_changed(struct power_supply *psy) in ds2760_battery_external_power_changed() argument
354 struct ds2760_device_info *di = to_ds2760_device_info(psy); in ds2760_battery_external_power_changed()
398 static void ds2760_battery_set_charged(struct power_supply *psy) in ds2760_battery_set_charged() argument
400 struct ds2760_device_info *di = to_ds2760_device_info(psy); in ds2760_battery_set_charged()
408 static int ds2760_battery_get_property(struct power_supply *psy, in ds2760_battery_get_property() argument
412 struct ds2760_device_info *di = to_ds2760_device_info(psy); in ds2760_battery_get_property()
459 static int ds2760_battery_set_property(struct power_supply *psy, in ds2760_battery_set_property() argument
463 struct ds2760_device_info *di = to_ds2760_device_info(psy); in ds2760_battery_set_property()
483 static int ds2760_battery_property_is_writeable(struct power_supply *psy, in ds2760_battery_property_is_writeable() argument
Dsmb347-charger.c993 static int smb347_mains_get_property(struct power_supply *psy, in smb347_mains_get_property() argument
998 container_of(psy, struct smb347_charger, mains); in smb347_mains_get_property()
1015 static int smb347_mains_set_property(struct power_supply *psy, in smb347_mains_set_property() argument
1020 container_of(psy, struct smb347_charger, mains); in smb347_mains_set_property()
1047 power_supply_changed(psy); in smb347_mains_set_property()
1061 static int smb347_mains_property_is_writeable(struct power_supply *psy, in smb347_mains_property_is_writeable() argument
1079 static int smb347_usb_get_property(struct power_supply *psy, in smb347_usb_get_property() argument
1084 container_of(psy, struct smb347_charger, usb); in smb347_usb_get_property()
1105 static int smb347_usb_set_property(struct power_supply *psy, in smb347_usb_set_property() argument
1111 container_of(psy, struct smb347_charger, usb); in smb347_usb_set_property()
[all …]
Dgpio-charger.c44 static inline struct gpio_charger *psy_to_gpio_charger(struct power_supply *psy) in psy_to_gpio_charger() argument
46 return container_of(psy, struct gpio_charger, charger); in psy_to_gpio_charger()
49 static int gpio_charger_get_property(struct power_supply *psy, in gpio_charger_get_property() argument
52 struct gpio_charger *gpio_charger = psy_to_gpio_charger(psy); in gpio_charger_get_property()
Dgoldfish_battery.c67 static int goldfish_ac_get_property(struct power_supply *psy, in goldfish_ac_get_property() argument
71 struct goldfish_battery_data *data = container_of(psy, in goldfish_ac_get_property()
86 static int goldfish_battery_get_property(struct power_supply *psy, in goldfish_battery_get_property() argument
90 struct goldfish_battery_data *data = container_of(psy, in goldfish_battery_get_property()
Dmax8925_power.c194 static int max8925_ac_get_prop(struct power_supply *psy, in max8925_ac_get_prop() argument
198 struct max8925_power_info *info = dev_get_drvdata(psy->dev->parent); in max8925_ac_get_prop()
228 static int max8925_usb_get_prop(struct power_supply *psy, in max8925_usb_get_prop() argument
232 struct max8925_power_info *info = dev_get_drvdata(psy->dev->parent); in max8925_usb_get_prop()
262 static int max8925_bat_get_prop(struct power_supply *psy, in max8925_bat_get_prop() argument
266 struct max8925_power_info *info = dev_get_drvdata(psy->dev->parent); in max8925_bat_get_prop()
Dpcf50633-charger.c289 static int adapter_get_property(struct power_supply *psy, in adapter_get_property() argument
293 struct pcf50633_mbc *mbc = container_of(psy, in adapter_get_property()
308 static int usb_get_property(struct power_supply *psy, in usb_get_property() argument
312 struct pcf50633_mbc *mbc = container_of(psy, struct pcf50633_mbc, usb); in usb_get_property()
329 static int ac_get_property(struct power_supply *psy, in ac_get_property() argument
333 struct pcf50633_mbc *mbc = container_of(psy, struct pcf50633_mbc, ac); in ac_get_property()
Dwm8350_power.c249 static int wm8350_ac_get_prop(struct power_supply *psy, in wm8350_ac_get_prop() argument
253 struct wm8350 *wm8350 = dev_get_drvdata(psy->dev->parent); in wm8350_ac_get_prop()
279 static int wm8350_usb_get_prop(struct power_supply *psy, in wm8350_usb_get_prop() argument
283 struct wm8350 *wm8350 = dev_get_drvdata(psy->dev->parent); in wm8350_usb_get_prop()
345 static int wm8350_bat_get_property(struct power_supply *psy, in wm8350_bat_get_property() argument
349 struct wm8350 *wm8350 = dev_get_drvdata(psy->dev->parent); in wm8350_bat_get_property()
/drivers/staging/nvec/
Dnvec_power.c222 static int nvec_power_get_property(struct power_supply *psy, in nvec_power_get_property() argument
226 struct nvec_power *power = dev_get_drvdata(psy->dev->parent); in nvec_power_get_property()
237 static int nvec_battery_get_property(struct power_supply *psy, in nvec_battery_get_property() argument
241 struct nvec_power *power = dev_get_drvdata(psy->dev->parent); in nvec_battery_get_property()
373 struct power_supply *psy; in nvec_power_probe() local
383 psy = &nvec_psy; in nvec_power_probe()
391 psy = &nvec_bat_psy; in nvec_power_probe()
405 return power_supply_register(&pdev->dev, psy); in nvec_power_probe()
/drivers/platform/x86/
Dcompal-laptop.c181 struct power_supply psy; member
572 static int bat_get_property(struct power_supply *psy, in bat_get_property() argument
577 data = container_of(psy, struct compal_data, psy); in bat_get_property()
889 data->psy.name = DRIVER_NAME; in initialize_power_supply_data()
890 data->psy.type = POWER_SUPPLY_TYPE_BATTERY; in initialize_power_supply_data()
891 data->psy.properties = compal_bat_properties; in initialize_power_supply_data()
892 data->psy.num_properties = ARRAY_SIZE(compal_bat_properties); in initialize_power_supply_data()
893 data->psy.get_property = bat_get_property; in initialize_power_supply_data()
1050 power_supply_register(&compal_device->dev, &data->psy); in compal_probe()
1082 power_supply_unregister(&data->psy); in compal_remove()

123