Kernel modules: atomic GPIO access on PREEMPT_RT

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

 



Hello,

I am working on kernel modules on an i.MX537 ARM platform where we use GPIO pins to control various
external chips, LEDs etc.

For accessing these ports I use ioremap_nocache(). But I only want to use single bits of these big 32 ports, and some other kernel modules should reuse the other free pins of that port.

Therefore I am afraid about the shared simultaneously registers access between:
- 2 kernel modules (user contex)
- interrupt context (IRQF_NODELAY) and simultaneously from the user context (ioctl() etc.) in the kernel module


What is the right way to access these registers for e.g setting a single bit of such a register to avoid read/modify/write problems ?
Do I have to use some locking / atomic operations ?


Can someone recommend a kernel driver for studying where such shared registers access is used / handled?


Best regards,

Matthias

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




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux