zephyr/drivers/charger/sbs_charger.h
Ricardo Rivera-Matos aee815f19d charger: Sample sbs charger driver with tests
Adds a sample sbs charger driver and basics tests.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2023-09-07 13:03:13 -04:00

21 lines
601 B
C

/*
* Copyright 2023 Cirrus Logic, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
#define SBS_CHARGER_REG_SPEC_INFO 0x11
#define SBS_CHARGER_REG_CHARGER_MODE 0x12
#define SBS_CHARGER_REG_STATUS 0x13
#define SBS_CHARGER_REG_ALARM_WARNING 0x16
#define SBS_CHARGER_MODE_INHIBIT_CHARGE BIT(0)
#define SBS_CHARGER_STATUS_CHARGE_INHIBITED BIT(0)
#define SBS_CHARGER_STATUS_RES_COLD BIT(9)
#define SBS_CHARGER_STATUS_RES_HOT BIT(10)
#define SBS_CHARGER_STATUS_BATTERY_PRESENT BIT(14)
#define SBS_CHARGER_STATUS_AC_PRESENT BIT(15)
#define SBS_CHARGER_POLL_TIME 500