battery:add goldfish battery driver

support the goldfish emulator battery driver

Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
This commit is contained in:
dulibo1
2023-06-09 20:45:03 +08:00
committed by Xiang Xiao
parent dd080773cc
commit 3f9a76e131
4 changed files with 360 additions and 0 deletions
+19
View File
@@ -251,6 +251,25 @@ FAR struct battery_gauge_dev_s *max1704x_initialize(
uint32_t frequency);
#endif
#if defined(CONFIG_GOLDFISH_BATTERY)
/****************************************************************************
* Name: goldfish_battery_register
*
* Description:
* Register a emulate battery to tyhe upper-half battery driver.
*
* Input Parameters:
* regs - the base address for the goldfish battery.
* irq - An irq num for the goldfish battery.
*
* Returned Value:
* Zero on success or a negated errno value on failure.
*
****************************************************************************/
int goldfish_battery_register(FAR void *regs, int irq);
#endif
#undef EXTERN
#ifdef __cplusplus
}