Lines Matching refs:chgdev
14 static const struct device *chgdev = DEVICE_DT_GET(DT_NODELABEL(charger)); variable
21 if (chgdev == NULL) { in main()
26 if (!device_is_ready(chgdev)) { in main()
29 chgdev->name); in main()
33 printk("Found device \"%s\", getting charger data\n", chgdev->name); in main()
42 ret = charger_set_prop(chgdev, CHARGER_PROP_DISCHARGE_CURRENT_NOTIFICATION, &val); in main()
52 ret = charger_set_prop(chgdev, CHARGER_PROP_SYSTEM_VOLTAGE_NOTIFICATION_UV, &val); in main()
61 ret = charger_get_prop(chgdev, CHARGER_PROP_ONLINE, &val); in main()
71 ret = charger_charge_enable(chgdev, true); in main()
81 ret = charger_get_prop(chgdev, CHARGER_PROP_STATUS, &val); in main()
90 ret = charger_get_prop(chgdev, CHARGER_PROP_CHARGE_TYPE, &val); in main()
95 printk("Device \"%s\" charge type is %d\n", chgdev->name, val.charge_type); in main()
100 ret = charger_get_prop(chgdev, CHARGER_PROP_HEALTH, &val); in main()
105 printk("Device \"%s\" health is %d\n", chgdev->name, val.health); in main()
113 ret = charger_get_prop(chgdev, CHARGER_PROP_ONLINE, &val); in main()