File tree Expand file tree Collapse file tree 2 files changed +2
-25
lines changed
Expand file tree Collapse file tree 2 files changed +2
-25
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ source "subsys/logging/Kconfig.template.log_config"
1717config GPIO_SHELL
1818 bool "GPIO Shell"
1919 depends on SHELL
20- imply DEVICE_DT_METADATA
2120 help
2221 Enable GPIO Shell for testing.
2322
Original file line number Diff line number Diff line change @@ -134,9 +134,10 @@ DT_FOREACH_STATUS_OKAY_NODE(IS_GPIO_CTRL_PIN_GET)
134134
135135static const struct gpio_ctrl gpio_list [] = {DT_FOREACH_STATUS_OKAY_NODE (IS_GPIO_CTRL_LIST )};
136136
137- static const struct gpio_ctrl * get_gpio_ctrl_helper (const struct device * dev )
137+ static const struct gpio_ctrl * get_gpio_ctrl (const char * name )
138138{
139139 size_t i ;
140+ const struct device * dev = shell_device_get_binding (name );
140141
141142 if (dev == NULL ) {
142143 return NULL ;
@@ -151,29 +152,6 @@ static const struct gpio_ctrl *get_gpio_ctrl_helper(const struct device *dev)
151152 return NULL ;
152153}
153154
154- /* Look up a device by some human-readable string identifier. We
155- * always search among device names. If the feature is available, we
156- * search by node label as well.
157- */
158- static const struct gpio_ctrl * get_gpio_ctrl (char * id )
159- {
160- const struct gpio_ctrl * ctrl ;
161-
162- ctrl = get_gpio_ctrl_helper (device_get_binding (id ));
163- if (ctrl != NULL ) {
164- return ctrl ;
165- }
166-
167- #ifdef CONFIG_DEVICE_DT_METADATA
168- ctrl = get_gpio_ctrl_helper (device_get_by_dt_nodelabel (id ));
169- if (ctrl != NULL ) {
170- return ctrl ;
171- }
172- #endif /* CONFIG_DEVICE_DT_METADATA */
173-
174- return NULL ;
175- }
176-
177155int line_cmp (const char * input , const char * line_name )
178156{
179157 int i = 0 ;
You can’t perform that action at this time.
0 commit comments