Skip to content

Commit 220e5f9

Browse files
committed
common/include/board/battery.h: get AC adapter voltage from cflags
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
1 parent 9f73179 commit 220e5f9

File tree

1 file changed

+6
-2
lines changed
  • src/board/system76/common/include/board

1 file changed

+6
-2
lines changed

src/board/system76/common/include/board/battery.h

+6-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@
1818

1919
#define BATTERY_INITIALIZED BIT(7)
2020

21-
#define BATTERY_CHARGER_VOLTAGE_AC 19
22-
#define BATTERY_CHARGER_VOLTAGE_PD 20 // XXX: Only valid for HPB models
21+
#ifndef AC_ADAPTER_VOLTAGE
22+
#define AC_ADAPTER_VOLTAGE 19
23+
#endif
24+
25+
#define BATTERY_CHARGER_VOLTAGE_AC AC_ADAPTER_VOLTAGE
26+
#define BATTERY_CHARGER_VOLTAGE_PD 20
2327

2428
struct battery_info {
2529
uint16_t temp;

0 commit comments

Comments
 (0)