返回值:返回gpio_desc,此时可通过该结构体,使用该gpio了,如set direction,set value等操作。 1 gpiod_get() /* * 1. 函数适用于只有一个gpio,index为0,即list = <&phandle1 1 2>; * 2. 如果想使用phandle2,list = <&phandle1 1 2 &phandle2 3 3>; * 则为 gpiod_get_index(dev, con_id, ...
The gpiod_get() function expands to gpiod_get_index() with index 0 so it's better to use it since is easier to read and more concise. Signed-off-by: Javier Martinez Canillas <jav...@osg.samsung.com> --- drivers/mmc/core/pwrseq_emmc.c | 2 +- 1 file changed, 1 insertion(+),...
4、 desc_to_gpio devm_get_gpiod_from_chi devm_gpiod_getdevm_gpiod_get_array devm_gpiod_get_array_op devm_gpiod_get_index devm_gpiod_get_index_opdevm_gpiod_get_optionaldevm_gpiod_putdevm_gpiod_put_arrayfwnode_get_named_gpiodgpio_to_descgpiod_cansleepgpiod_countgpiod_direction_inpu...
> The gpiod_get() function expands to gpiod_get_index() with index 0 > so it's better to use it since is easier to read and more concise. > > Signed-off-by: Javier Martinez Canillas <jav...@osg.samsung.com> Thanks, applied for next! Kind regards Uffe > > --- > > drivers/...
gpiod_get_array gpiod_get_array_optiona gpiod_get_direction gpiod_get_index gpiod_get_index_optiona gpiod_get_optional gpiod_get_raw_value gpiod_get_raw_value_can gpiod_get_value gpiod_get_value_canslee gpiod_is_active_low gpiod_put gpiod_put_array gpiod_set_array_value gpiod_...
//参数:dev设备节点,index索引(节点中interrupts属性可能包含多条中断信息,通过index确认)//返回值:中断号 //如果是GPIO的话,可以不从设备树中获取 int gpio_to_irq(unsigned int gpio);//参数:gpio的编号 //返回值:gpio对应的中断号 申请中断 申请中断的函数 int request_irq(unsigned int irq,irq_...
@@ -200,11 +199,11 @@ EXPORT_SYMBOL(devm_gpiod_get_from_of_node); * On successful request the GPIO pin is configured in accordance with * provided @flags. */ -struct gpio_desc *devm_fwnode_get_index_gpiod_from_child(struct device *dev, ...