7#ifndef ZEPHYR_INCLUDE_DRIVERS_CHARGER_H_
8#define ZEPHYR_INCLUDE_DRIVERS_CHARGER_H_
182#include <syscalls/charger.h>
int charger_set_prop(const struct device *dev, const charger_prop_t prop, const union charger_propval *val)
Set a battery charger property.
int charger_get_prop(const struct device *dev, const charger_prop_t prop, union charger_propval *val)
Fetch a battery charger property.
int(* charger_get_property_t)(const struct device *dev, const charger_prop_t prop, union charger_propval *val)
Callback API for getting a charger property.
Definition: charger.h:110
int(* charger_set_property_t)(const struct device *dev, const charger_prop_t prop, const union charger_propval *val)
Callback API for setting a charger property.
Definition: charger.h:119
charger_status
Charging states.
Definition: charger.h:74
charger_property
Runtime Dynamic Battery Parameters.
Definition: charger.h:30
uint16_t charger_prop_t
A charger property's identifier.
Definition: charger.h:57
charger_online
External supply states.
Definition: charger.h:62
@ CHARGER_STATUS_FULL
The battery is full and the charging device will not attempt charging.
Definition: charger.h:84
@ CHARGER_STATUS_NOT_CHARGING
Charging device is not charging a battery.
Definition: charger.h:82
@ CHARGER_STATUS_DISCHARGING
Charging device is not able to charge a battery.
Definition: charger.h:80
@ CHARGER_STATUS_UNKNOWN
Charging device state is unknown.
Definition: charger.h:76
@ CHARGER_STATUS_CHARGING
Charging device is charging a battery.
Definition: charger.h:78
@ CHARGER_PROP_PRESENT
Reports whether or not a battery is present.
Definition: charger.h:36
@ CHARGER_PROP_ONLINE
Indicates if external supply is present for the charger.
Definition: charger.h:33
@ CHARGER_PROP_CUSTOM_BEGIN
Reserved to demark downstream custom properties - use this value as the actual value may change over ...
Definition: charger.h:46
@ CHARGER_PROP_COMMON_COUNT
Reserved to demark end of common charger properties.
Definition: charger.h:41
@ CHARGER_PROP_STATUS
Represents the charging status of the charger.
Definition: charger.h:39
@ CHARGER_PROP_MAX
Reserved to demark end of valid enum properties.
Definition: charger.h:48
@ CHARGER_ONLINE_FIXED
External supply is present and of fixed output.
Definition: charger.h:66
@ CHARGER_ONLINE_PROGRAMMABLE
External supply is present and of programmable output.
Definition: charger.h:68
@ CHARGER_ONLINE_OFFLINE
External supply not present.
Definition: charger.h:64
#define UINT16_MAX
Definition: stdint.h:28
__UINT16_TYPE__ uint16_t
Definition: stdint.h:89
Charging device API.
Definition: charger.h:127
charger_set_property_t set_property
Definition: charger.h:129
charger_get_property_t get_property
Definition: charger.h:128
Runtime device structure (in ROM) per driver instance.
Definition: device.h:381
const void * api
Address of the API structure exposed by the device instance.
Definition: device.h:387
container for a charger_property value
Definition: charger.h:91
enum charger_status status
CHARGER_PROP_STATUS.
Definition: charger.h:101
enum charger_online online
CHARGER_PROP_ONLINE.
Definition: charger.h:97
bool present
CHARGER_PROP_PRESENT.
Definition: charger.h:99