Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Linux Device Drivers Development

You're reading from   Linux Device Drivers Development Develop customized drivers for embedded Linux

Arrow left icon
Product type Paperback
Published in Oct 2017
Publisher Packt
ISBN-13 9781785280009
Length 586 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
John Madieu John Madieu
Author Profile Icon John Madieu
John Madieu
Arrow right icon
View More author details
Toc

Table of Contents (23) Chapters Close

Preface 1. Introduction to Kernel Development FREE CHAPTER 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

What this book covers

Chapter 1, Introduction to Kernel Development, introduces the Linux kernel development process. The chapter will discuss the downloading, configuring, and compiling steps of a kernel, as well for x86 as for ARM-based systems

Chapter 2, Device Driver Basis, deals with Linux modularity by means of kernel modules, and describes their loading/unloading. It also describe a driver architecture and some basic concepts and some kernel best practices.

Chapter 3, Kernel Facilities and Helper Functions, walks through frequently used kernel functions and mechanisms, such as work queue, wait queue, mutexes, spinlock, and any other facilities that are useful for improved driver reliability.

Chapter 4, Character Device Drivers, focuses exporting a devices functionalities to the user space by means of character devices as well as supporting custom commands using the IOCTL interface.

Chapter 5, Platform Device Drivers, explains what a platform device is and introduces the concept of pseudo-platform bus, as well as the device and bus matching mechanism. This chapter describes platform driver architecture in a general manner, and how to handle platform data.

Chapter 6, The Concept of Device Tree, discusses the mechanism to feed device descriptions to the kernel. This chapter explains device addressing, resource handling, every data type supported in DT and their kernel APIs.

Chapter 7, I2C Client Drivers, dives into I2C device drivers architecture, the data structures and device addressing and accessing methods on the bus.

Chapter 8, SPI Device Drivers, describe SPI-based device driver architecture, as well as the data structures involved. The chapter discuss each device's access method and specificities, as well as traps one should avoid. SPI DT binding is discussed too.

Chapter 9, Regmap API – A Register Map Abstraction, provides an overview of the regmap API, and how it abstracts the underlying SPI and I2C transaction. This chapter describes the generic API, as well as the dedicated API.

Chapter 10, IIO framework, introduce the kernel data acquisition and measurement framework, to handle Digital to Analog Converters (DACs) and Analog to Digital Converters (ADCs). This walk through the IIO API, deals with triggered buffers and continuous data capture, and looks at single channel acquisition through the sysfs interface.

Chapter 11, Kernel Memory Management, first introduces the concept of virtual memory, in order to describe the whole kernel memory layout. This chapter walks through the kernel memory management subsystem, discussing memory allocation and mapping, their APIs and all devices involved in such mechanisms, as well as kernel caching mechanism.

Chapter 12, DMA – Direct Memory Access, introduce DMA and its new kernel API: the DMA Engine API. This chapter will talk about different DMA mappings and describes how to address cache coherency issues. In addition, the chapter summarize the whole concepts in use cases, based on i.MX6 SoC, from NXP.

Chapter 13, Linux Device Model, provides an overview of the heart of Linux, describing how objects are represented in the kernel, and how Linux is designed under the hood in a general manner, starting from kobject to devices, through buses, classes, and device drivers. This chapter also highlight sometime unknown side in user space, the kernel object hierarchy in sysfs.

Chapter 14, Pin Control and GPIO Subsystem, describes the kernel pincontrol API and GPIOLIB, which is the kernel API to handle GPIO. This chapter also discusses the old and deprecated integer-based GPIO interface, as well as the descriptor-based interface, which is the new one, and finally, the way they can be configured from within the DT.

Chapter 15, GPIO Controller Drivers – gpio_chip, necessary elements to write such device drivers. That says, its main data structure is struct gpio_chip. This structure is explained in detail in this chapter, along with a full and working driver provided in the source of the book.

Chapter 16, Advanced IRQ Management, demystifies the Linux IRQ core. This chapter walks through Linux IRQ management, starting from interrupt propagation over the system and moving to interrupt controller drivers, thus explaining the concept of IRQ multiplexing, using the Linux IRQ domain API

Chapter 17, Input Devices Drivers, provides a global view of input subsystems, dealing with both IRQ-based and polled input devices, and introducing both APIs. This chapter explains and shows how user space code deals with such devices.

Chapter 18, RTC Drivers, walks through and demystifies the RTC subsystem and its API. This chapter goes far enough and explains how to deal with alarms from within RTC drivers

Chapter 19, PWM Drivers, provides a full description of the PWM framework, talking about the controller side API as well the consumer side API. PWM management from the user space is discussed in the last section in this chapter.

Chapter 20, Regulator Framework, highlights how important power management is. The first part of the chapter deals with Power Management IC (PMIC) and explains its driver design and API. The second part focuses on the consumer side, talking about requesting and using regulators.

Chapter 21, Framebuffer Drivers, explains framebuffer concept and how it works. It also shows how to design framebuffer drivers, walks through its API, and discusses accelerated as well as non-accelerated methods. This chapter shows how drivers can expose framebuffer memory so that user space can write into, without worrying about underlying tasks.

Chapter 22, Network Interface Card Drivers, walk through the NIC driver’s architecture and their data structures, thus showing you how to handle device configuration, data transfer, and socket buffers.

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 $19.99/month. Cancel anytime