|
|
@ -55,9 +55,7 @@ K_TIMER_DEFINE(battery_timer, zmk_battery_timer, NULL); |
|
|
|
static int zmk_battery_init(struct device *_arg) { |
|
|
|
static int zmk_battery_init(struct device *_arg) { |
|
|
|
battery = device_get_binding("BATTERY"); |
|
|
|
battery = device_get_binding("BATTERY"); |
|
|
|
|
|
|
|
|
|
|
|
if (battery) { |
|
|
|
if (battery == NULL) { |
|
|
|
LOG_DBG("Found battery reporting device."); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
LOG_DBG("No battery device labelled BATTERY found."); |
|
|
|
LOG_DBG("No battery device labelled BATTERY found."); |
|
|
|
return -ENODEV; |
|
|
|
return -ENODEV; |
|
|
|
} |
|
|
|
} |
|
|
|