Message ID | 20201110142724.14760-1-linus.walleij@linaro.org |
---|---|
State | Accepted |
Commit | 3b4feb21158f873269ff3fbe2fe8d23a88d64b24 |
Headers | show |
Series | gpio: sysfs: Enforce character device | expand |
On Tue, Nov 10, 2020 at 4:27 PM Linus Walleij <linus.walleij@linaro.org> wrote:
> + select GPIO_CDEV # We need to encourage the new ABI
While I am all for new ABI, I don't think this is a good idea.
If they are brave enough to move to old ABI it should be a reason
(supporting old scripts all around the product while updating the
kernel, comes to my mind).
But at the same time they may want to keep a low memory footprint.
--
With Best Regards,
Andy Shevchenko
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 5d4de5cd6759..4dd566f7ea39 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -59,8 +59,9 @@ config DEBUG_GPIO that are most common when setting up new platforms or boards. config GPIO_SYSFS - bool "/sys/class/gpio/... (sysfs interface)" + bool "/sys/class/gpio/... (sysfs interface)" if EXPERT depends on SYSFS + select GPIO_CDEV # We need to encourage the new ABI help Say Y here to add the legacy sysfs interface for GPIOs.
If users select sysfs support they get the character device as well so that end-users cannot complain that they "only have sysfs on my system". They should have the character device at all times. If someone is in so dire need of stripping out the character device while still enabling the sysfs ABI they can very well patch the kernel. Also only show this obsolete option to expert users. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- drivers/gpio/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.26.2