2 GPIO hog (CONFIG_GPIO_HOG)
5 All the GPIO hog are initialized in gpio_hog_probe_all() function called in
6 board_r.c just before board_late_init() but you can also acces directly to
7 the gpio with gpio_hog_lookup_name().
10 Example, for the device tree:
13 compatible = "ti,tca6416";
21 gpios = <6 GPIO_ACTIVE_LOW>;
26 line-name = "foo-bar-gpio";
27 gpios = <7 GPIO_ACTIVE_LOW>;
31 You can than access the gpio in your board code with:
33 struct gpio_desc *desc;
36 ret = gpio_hog_lookup_name("boot_rescue", &desc);
39 if (dm_gpio_get_value(desc) == 1)
40 printf("\nBooting into Rescue System\n");
41 else if (dm_gpio_get_value(desc) == 0)
42 printf("\nBoot normal\n");