在看显示模块的代码时看到一个函数devm_gpiod_get_optional(), 之前没接触过,它的调用如下: devm_gpiod_get_optional ->devm_gpiod_get_index_optional->//index为0devm_gpiod_get_index ->gpiod_get_index 可以看到devm_gpiod_get_optional只是对gpiod_get_index的包装而已,并且index为0。index参数后面会...
在看显示模块的代码时看到一个函数devm_gpiod_get_optional(), 之前没接触过,它的调用如下: devm_gpiod_get_optional ->devm_gpiod_get_index_optional->//index为0devm_gpiod_get_index ->gpiod_get_index 可以看到devm_gpiod_get_optional只是对gpiod_get_index的包装而已,并且index为0。index参数后面会...
devm_gpiod_get_optional devm_gpiod_put devm_gpiod_put_array fwnode_get_named_gpiod gpio_to_desc gpiod_cansleep gpiod_count gpiod_direction_input gpiod_direction_output gpiod_direction_output_ gpiod_export gpiod_export_link gpiod_get gpiod_get_array gpiod_get_array_optiona gpiod_get_...
[gpio]devm_gpiod_get_optional用法 2018-08-16 09:54 −... aaronGao 0 12599 optional 2019-12-23 00:08 −optional - 在实际开发中,我们经常会遇到无效值的情况,例如函数并不是总能返回有效值,很多函数正确执行了,但结果却不是合理的值,如果用数学语言开解释的话,就是返回值位于函数解空间之外。
priv->ulpi_reset = devm_gpiod_get_optional(dev->parent, "reset", GPIOD_ACTIVE_LOW); /* property is optional, don't return error! */ if (priv->ulpi_reset) { /* Toggle ulpi to reset the phy. */ rc = dm_gpio_set_value(priv->ulpi_reset, 1); ...
devm_gpiod_get_index devm_gpiod_get_index_op devm_gpiod_get_optional devm_gpiod_put devm_gpiod_put_array fwnode_get_named_gpiod gpio_to_desc gpiod_cansleep gpiod_count gpiod_direction_input gpiod_direction_output gpiod_direction_output_ ...
gpiod_get 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_...
struct gpio_desc *gpiod_get_optional(struct device *dev,const char *con_id,enum gpiod_flags flags)struct gpio_desc *gpiod_get_index_optional(struct device *dev,const char *con_id,unsigned int index,enum gpiod_flags flags) 使用如下函数同时获取多个设备: ...
devm_gpiod_get_optional devm_gpiod_put devm_gpiod_put_array fwnode_get_named_gpiod gpio_to_desc gpiod_cansleep gpiod_count gpiod_direction_input gpiod_direction_output gpiod_direction_output_ gpiod_export gpiod_export_link gpiod_get gpiod_get_array gpiod_get_array_optiona gpiod_get_...
qcadev->bt_en=devm_gpiod_get_optional(&serdev->dev,"enable", GPIOD_OUT_LOW); if(IS_ERR_OR_NULL(qcadev->bt_en)&& if(IS_ERR(qcadev->bt_en)&& (data->soc_type==QCA_WCN6750|| data->soc_type==QCA_WCN6855)) { dev_err(&serdev->dev,"failed to acquire BT_EN gpio\n"); ...