Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Linux Device Drivers Development

You're reading from  Linux Device Drivers Development

Product type Book
Published in Oct 2017
Publisher Packt
ISBN-13 9781785280009
Pages 586 pages
Edition 1st Edition
Languages
Author (1):
John Madieu John Madieu
Profile icon John Madieu

Table of Contents (23) Chapters

Preface 1. Introduction to Kernel Development 2. Device Driver Basis 3. Kernel Facilities and Helper Functions 4. Character Device Drivers 5. Platform Device Drivers 6. The Concept of Device Tree 7. I2C Client Drivers 8. SPI Device Drivers 9. Regmap API – A Register Map Abstraction 10. IIO Framework 11. Kernel Memory Management 12. DMA – Direct Memory Access 13. The Linux Device Model 14. Pin Control and GPIO Subsystem 15. GPIO Controller Drivers – gpio_chip 16. Advanced IRQ Management 17. Input Devices Drivers 18. RTC Drivers 19. PWM Drivers 20. Regulator Framework 21. Framebuffer Drivers 22. Network Interface Card Drivers

The GPIO subsystem

From a hardware point of view, a GPIO is a functionality, a mode in which a pin can operate. From a software point of view, a GPIO is nothing but a digital line, which can operate as an input or output, and can have only two values: (1 for high or 0 for low). Kernel GPIO subsystems provide every function you can imagine to set up and handle GPIO line from within your driver:

  • Prior to using a GPIO from within the driver, you should claim it to the kernel. This is a way to take the ownership of the GPIO, preventing other drivers from accessing the same GPIO. After taking the ownership of the GPIO, you can:
    • Set the direction.
    • Toggle its output state (driving line high or low) if used as output.
    • Set the debounce-interval and read the state, if used as input. For GPIO lines mapped to IRQ, you can define at what edge/level the interrupt should be triggered...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}