There is no use of the GPIOF_EXPORT in the kernel. Kill it for good.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
* GPIOF_OPEN_DRAIN - gpio pin is open drain type.
* GPIOF_OPEN_SOURCE - gpio pin is open source type.
- * GPIOF_EXPORT_DIR_FIXED - export gpio to sysfs, keep direction
- * GPIOF_EXPORT_DIR_CHANGEABLE - also export, allow changing direction
-
since GPIOF_INIT_* are only valid when configured as output, so group valid
combinations as:
* GPIOF_OPEN_DRAIN - gpio引脚为开漏信号
* GPIOF_OPEN_SOURCE - gpio引脚为源极开路信号
- * GPIOF_EXPORT_DIR_FIXED - 将 gpio 导出到 sysfs,并保持方向
- * GPIOF_EXPORT_DIR_CHANGEABLE - 同样是导出, 但允许改变方向
-
因为 GPIOF_INIT_* 仅有在配置为输出的时候才存在,所以有效的组合为:
* GPIOF_IN - 配置为输入
* GPIOF_OPEN_DRAIN - gpio引腳爲開漏信號
* GPIOF_OPEN_SOURCE - gpio引腳爲源極開路信號
- * GPIOF_EXPORT_DIR_FIXED - 將 gpio 導出到 sysfs,並保持方向
- * GPIOF_EXPORT_DIR_CHANGEABLE - 同樣是導出, 但允許改變方向
-
因爲 GPIOF_INIT_* 僅有在配置爲輸出的時候才存在,所以有效的組合爲:
* GPIOF_IN - 配置爲輸入
if (err)
goto free_gpio;
- if (flags & GPIOF_EXPORT) {
- err = gpiod_export(desc, flags & GPIOF_EXPORT_CHANGEABLE);
- if (err)
- goto free_gpio;
- }
-
return 0;
free_gpio:
/* Gpio pin is open source */
#define GPIOF_OPEN_SOURCE (1 << 4)
-#define GPIOF_EXPORT (1 << 5)
-#define GPIOF_EXPORT_CHANGEABLE (1 << 6)
-#define GPIOF_EXPORT_DIR_FIXED (GPIOF_EXPORT)
-#define GPIOF_EXPORT_DIR_CHANGEABLE (GPIOF_EXPORT | GPIOF_EXPORT_CHANGEABLE)
-
/**
* struct gpio - a structure describing a GPIO with configuration
* @gpio: the GPIO number