/** * Convert a GPIO descriptor to the integer namespace. * This should disappear in the future but is needed since we still * use GPIO numbers for error messages and sysfs nodes */ int desc_to_gpio(const struct gpio_desc *desc) { return desc->gdev->base + (desc - &desc->gdev->descs[0]); } EXPORT_SYMBOL_GPL(desc_to_gpio);
Linux 内核设备驱动之GPIO驱动之GPIO GPIO描述符到GPIO号
最新推荐文章于 2024-01-13 15:48:40 发布