1. 03 Mar, 2017 1 commit
    • Sergei Miroshnichenko's avatar
      RM#1313 fdt: stm32: switch: Add run-time gpio-based status switching of DT nodes. · 74ebeb68
      Sergei Miroshnichenko authored
      Add a new driver named "switch" for run-time selection of wanted devices in DT based on gpios:
      
          configuration_switch: configuration_switch {
              compatible = "emcraft,configuration-switch";
              pinctrl-names = "default";
              pinctrl-0 = <&pinctrl_switch>;
          };
      
      ...
          pinctrl_switch: switch {
              st,pins {
                  /* e5 = 4*16 + 5 = 69 */
                  status_pullup = <&gpioe 5 IN
                      PULL_UP PUSH_PULL LOW_SPEED>;
              };
          };
      
      ...
      
      &usb_fs {
          ...
          configuration-switch-gpios = <&gpioe 5 GPIO_ACTIVE_LOW>;
      };
      74ebeb68