Re: GPIO Character device driver

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

 



On 04/23/2019 07:51 PM, Linus Walleij wrote:
Do I have to __DISABLE__ the sysfs support from kernel config?

No.


Ok, mainly because the kernel config has GPIOLIB enabled by default and I added a _NOT_MODULE_ sysfs driver i.e. it is monolithic inside the kernel...

Which module is working as the udev entry point for creating those
/dev/gpiochip[X] device drivers?

Do you mean that they do not appear? I always had them appear
for me using udev, older busybox (mdev) had a problem but I
went in and fixed it so this should be there now.


No, I mean which is the 'entry point' for creating those /dev/gpiochip[X] devices? I suppose some system call has to be issued to tell udev to create those char drivers...

/dev/gpiochipN even appears on my Intel laptop.


I suppose you are using non OF_ but ACPI_ stuff. ;-)

The documentation is lacking those information. It seems I can have
sysfs and gpiolib at the same time...

You can.

Ok. Now this reveals a question: if I configure some pin using sysfs, those pins can be used in gpiolib chardev stuff? I suppose I have to unregister the driver with 'unexport'.


P.S.: my boards are based with iMX6 and iMX28 SoC and they are running
kernel 4.9.76 and 4.12. They are running Debian Stretch. The device-tree
are modified from bootloader and passed to the kernel with some devices
enabled.

Weird, I don't know my ways around userspace much though, sorry!
The problem would be the same with any such chardev such
as IIO devices though.


Ok, I'll have to check.

Yours,
Linus Walleij

P.S.: by the way, it is an HONOR to me, having a mail with the 2nd Linus of the Kernel! ;-P

Best regards,
Gianluca Renzi
--
Eurek s.r.l.                          |
Electronic Engineering                | http://www.eurek.it
via Celletta 8/B, 40026 Imola, Italy  | Phone: +39-(0)542-609120
p.iva 00690621206 - c.f. 04020030377  | Fax:   +39-(0)542-609212



[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