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:
Martin Jäger
2020-05-06 12:53:26 +02:00
parent 90c1e7fcf5
commit ce7f63b888
29 changed files with 142 additions and 160 deletions
+1 -1
View File
@@ -101,7 +101,7 @@ void control_on_to_off_overcurrent()
LoadOutput load_out(&bus, &load_drv_set, &load_drv_init);
load_init(&load_out, true);
load_out.current = LOAD_CURRENT_MAX * 1.9; // with factor 2 it is switched off immediately
load_out.current = DT_OUTPUTS_LOAD_CURRENT_MAX * 1.9; // with factor 2 it is switched off immediately
load_out.control();
TEST_ASSERT_EQUAL(LOAD_STATE_ON, load_out.state);