Re: GPIO IN LINUX KERENL 4.8

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 8, 2016 at 7:18 PM, Rahul Mahajan
<rahulcmahajan.84@xxxxxxxxx> wrote:

> 1) why we remove gpio system not uses /sys/class/gpio. ?

Class devices are generally deprecated in favor of bus devices.
(Source: Greg Kroah-Hartman.)

The new devices appear in /sys/bus/gpio/*

> 2) if i want to use old kernel gpio driver with linux 4.8 driver. So how to
> port because any impact with other system or api change.

You should submit your drivers to the upstream Linux kernel
so you do not face the situation of maintaining out-of-tree code.
The changes made to the kernel for drivers recently are detailed
in that talk. Further consult this document:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/Documentation/stable_api_nonsense.txt

> 3) Old Approach is very easy just we give export through /sys  and how to
> exoort from user space?

The new ABI does not use exporting. It uses anonymous file handles,
and GPIOs are marked for userspace use on-demand.

It could be argued that the sysfs ABI is "easy" but is it really?
If your script or program using a few exported GPIOs crashes,
the exported GPIOs are never unexported and you have a leak
that you need to work around with more scripts. And that is not
"easy".

> Hello Linus,
>
> Can you please reply on my question?

Take it easy, I have lots of stuff to do.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux