Introduce generic "outputs" DTS binding
Replaces previous "switch" and "pwm-out" bindings and allows to reference either gpio or pwm handle and specify maximum current. Also replacing CONFIG_HAS_LOAD and CONFIG_HAS_USB_PWR with DT_ variants.
This commit is contained in:
+3
-3
@@ -68,7 +68,7 @@ void main(void)
|
||||
load.set_voltage_limits(bat_conf.voltage_load_disconnect, bat_conf.voltage_load_reconnect,
|
||||
bat_conf.voltage_absolute_max);
|
||||
|
||||
#if CONFIG_HAS_USB_PWR_OUTPUT
|
||||
#if DT_OUTPUTS_USB_PWR_PRESENT
|
||||
usb_pwr.set_voltage_limits(bat_conf.voltage_load_disconnect - 0.1, // keep on longer than load
|
||||
bat_conf.voltage_load_reconnect, bat_conf.voltage_absolute_max);
|
||||
#endif
|
||||
@@ -117,11 +117,11 @@ void control_thread()
|
||||
leds_set_charging(half_bridge_enabled());
|
||||
#endif
|
||||
|
||||
#if CONFIG_HAS_LOAD_OUTPUT
|
||||
#if DT_OUTPUTS_LOAD_PRESENT
|
||||
load.control();
|
||||
#endif
|
||||
|
||||
#if CONFIG_HAS_USB_PWR_OUTPUT
|
||||
#if DT_OUTPUTS_USB_PWR_PRESENT
|
||||
usb_pwr.control();
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user