return;
info.power_source = val;
+ val = (char *)udev_device_get_property_value(dev, "POWER_SUPPLY_VOLTAGE_NOW");
+ if (!val)
+ return;
+ info.voltage_now = atoi(val); /* uV */
+
+ val = (char *)udev_device_get_property_value(dev, "POWER_SUPPLY_VOLTAGE_AVG");
+ if (!val)
+ return;
+ info.voltage_average = atoi(val); /* uV */
+
+ val = (char *)udev_device_get_property_value(dev, "POWER_SUPPLY_TEMP");
+ if (!val)
+ return;
+ info.temperature = atoi(val);
+
udata.updated_cb(&info, udata.data);
}
}
info.current_average = val;
+ path = BATTERY_ROOT_PATH"/battery/voltage_now";
+ ret = sys_get_int(path, &val);
+ if (ret < 0) {
+ _E("Failed to get value of (%s, %d)", path, ret);
+ return ret;
+ }
+ info.voltage_now = val;
+
+ path = BATTERY_ROOT_PATH"/battery/voltage_avg";
+ ret = sys_get_int(path, &val);
+ if (ret < 0) {
+ _E("Failed to get value of (%s, %d)", path, ret);
+ return ret;
+ }
+ info.voltage_average = val;
+
+ path = BATTERY_ROOT_PATH"/battery/temp";
+ ret = sys_get_int(path, &val);
+ if (ret < 0) {
+ _E("Failed to get value of (%s, %d)", path, ret);
+ return ret;
+ }
+ info.temperature = val;
+
updated_cb(&info, data);
return 0;