@@ -135,14 +135,14 @@ int desc_to_gpio(const struct gpio_desc *desc);
135135struct fwnode_handle ;
136136
137137struct gpio_desc * fwnode_get_named_gpiod (struct fwnode_handle * fwnode ,
138- const char * propname ,
138+ const char * propname , int index ,
139139 enum gpiod_flags dflags ,
140140 const char * label );
141- struct gpio_desc * devm_get_gpiod_from_child (struct device * dev ,
142- const char * con_id ,
143- struct fwnode_handle * child ,
144- enum gpiod_flags flags ,
145- const char * label );
141+ struct gpio_desc * devm_fwnode_get_index_gpiod_from_child (struct device * dev ,
142+ const char * con_id , int index ,
143+ struct fwnode_handle * child ,
144+ enum gpiod_flags flags ,
145+ const char * label );
146146#else /* CONFIG_GPIOLIB */
147147
148148static inline int gpiod_count (struct device * dev , const char * con_id )
@@ -417,25 +417,36 @@ struct fwnode_handle;
417417
418418static inline
419419struct gpio_desc * fwnode_get_named_gpiod (struct fwnode_handle * fwnode ,
420- const char * propname ,
420+ const char * propname , int index ,
421421 enum gpiod_flags dflags ,
422422 const char * label )
423423{
424424 return ERR_PTR (- ENOSYS );
425425}
426426
427427static inline
428- struct gpio_desc * devm_get_gpiod_from_child (struct device * dev ,
429- const char * con_id ,
430- struct fwnode_handle * child ,
431- enum gpiod_flags flags ,
432- const char * label )
428+ struct gpio_desc * devm_fwnode_get_index_gpiod_from_child (struct device * dev ,
429+ const char * con_id , int index ,
430+ struct fwnode_handle * child ,
431+ enum gpiod_flags flags ,
432+ const char * label )
433433{
434434 return ERR_PTR (- ENOSYS );
435435}
436436
437437#endif /* CONFIG_GPIOLIB */
438438
439+ static inline
440+ struct gpio_desc * devm_fwnode_get_gpiod_from_child (struct device * dev ,
441+ const char * con_id ,
442+ struct fwnode_handle * child ,
443+ enum gpiod_flags flags ,
444+ const char * label )
445+ {
446+ return devm_fwnode_get_index_gpiod_from_child (dev , con_id , 0 , child ,
447+ flags , label );
448+ }
449+
439450#if IS_ENABLED (CONFIG_GPIOLIB ) && IS_ENABLED (CONFIG_GPIO_SYSFS )
440451
441452int gpiod_export (struct gpio_desc * desc , bool direction_may_change );
0 commit comments