Lines Matching +full:battery +full:- +full:current

5  * SPDX-License-Identifier: Apache-2.0
32 /** Runtime Dynamic Battery Parameters */
34 * Provide a 1 minute average of the current on the battery.
41 /** Used to cutoff the battery from the system - useful for storage/shipping of devices */
43 /** Battery current (uA); negative=discharging */
45 /** Whether the battery underlying the fuel-gauge is cut off from charge */
49 /** Connect state of battery */
55 /** Is the battery physically present */
59 /** Remaining battery life time in minutes */
61 /** Remaining time in minutes until battery reaches full charge */
65 /** Absolute state of charge (percent, 0-100) - expressed as % of design capacity */
67 /** Relative state of charge (percent, 0-100) - expressed as % of full charge capacity */
71 /** Battery voltage (uV) */
73 /** Battery Mode (flags) */
75 /** Battery desired Max Charging Current (uA) */
77 /** Battery desired Max Charging Voltage (uV) */
107 * Reserved to demark downstream custom properties - use this value as the actual value may
124 /* Dynamic Battery Info */
130 int current; member
231 * @brief Callback API for doing a battery cutoff.
241 * Note: Historically this API allowed drivers to implement a custom multi-get/set property
253 * @brief Fetch a battery fuel-gauge property
255 * @param dev Pointer to the battery fuel-gauge device
267 const struct fuel_gauge_driver_api *api = (const struct fuel_gauge_driver_api *)dev->api; in z_impl_fuel_gauge_get_prop()
269 if (api->get_property == NULL) { in z_impl_fuel_gauge_get_prop()
270 return -ENOSYS; in z_impl_fuel_gauge_get_prop()
273 return api->get_property(dev, prop, val); in z_impl_fuel_gauge_get_prop()
277 * @brief Fetch multiple battery fuel-gauge properties. The default implementation is the same as
281 * @param dev Pointer to the battery fuel-gauge device
297 const struct fuel_gauge_driver_api *api = (const struct fuel_gauge_driver_api *)dev->api; in z_impl_fuel_gauge_get_props()
300 int ret = api->get_property(dev, props[i], vals + i); in z_impl_fuel_gauge_get_props()
311 * @brief Set a battery fuel-gauge property
313 * @param dev Pointer to the battery fuel-gauge device
325 const struct fuel_gauge_driver_api *api = (const struct fuel_gauge_driver_api *)dev->api; in z_impl_fuel_gauge_set_prop()
327 if (api->set_property == NULL) { in z_impl_fuel_gauge_set_prop()
328 return -ENOSYS; in z_impl_fuel_gauge_set_prop()
331 return api->set_property(dev, prop, val); in z_impl_fuel_gauge_set_prop()
334 * @brief Set a battery fuel-gauge property
336 * @param dev Pointer to the battery fuel-gauge device
364 * @brief Fetch a battery fuel-gauge buffer property
366 * @param dev Pointer to the battery fuel-gauge device
381 const struct fuel_gauge_driver_api *api = (const struct fuel_gauge_driver_api *)dev->api; in z_impl_fuel_gauge_get_buffer_prop()
383 if (api->get_buffer_property == NULL) { in z_impl_fuel_gauge_get_buffer_prop()
384 return -ENOSYS; in z_impl_fuel_gauge_get_buffer_prop()
387 return api->get_buffer_property(dev, prop_type, dst, dst_len); in z_impl_fuel_gauge_get_buffer_prop()
391 * @brief Have fuel gauge cutoff its associated battery.
393 * @param dev Pointer to the battery fuel-gauge device
395 * @return return=0 if successful and battery cutoff is now in process, return < 0 if failed to do
396 * battery cutoff.
402 const struct fuel_gauge_driver_api *api = (const struct fuel_gauge_driver_api *)dev->api; in z_impl_fuel_gauge_battery_cutoff()
404 if (api->battery_cutoff == NULL) { in z_impl_fuel_gauge_battery_cutoff()
405 return -ENOSYS; in z_impl_fuel_gauge_battery_cutoff()
408 return api->battery_cutoff(dev); in z_impl_fuel_gauge_battery_cutoff()