Description
Linux is one of the fastest-growing operating systems around the world, and in the last few years, the Linux kernel has evolved significantly to support a wide variety of embedded devices with its improved subsystems and a range of new features. With this book, youll find out how you can enhance your skills to write custom device drivers for your Linux operating system.Mastering Linux Device Driver Development provides complete coverage of kernel topics, including video and audio frameworks, that usually go unaddressed. Youll work with some of the most complex and impactful Linux kernel frameworks, such as PCI, ALSA for SoC, and Video4Linux2, and discover expert tips and best practices along the way. In addition to this, youll understand how to make the most of frameworks such as NVMEM and Watchdog. Once youve got to grips with Linux kernel helpers, youll advance to working with special device types such as Multi-Function Devices (MFD) followed by video and audio device drivers.By the end of this book, youll be able to write feature-rich device drivers and integrate them with some of the most complex Linux kernel frameworks, including V4L2 and ALSA for SoC. Spis treści:Mastering Linux Device Driver DevelopmentWhy subscribe?ContributorsAbout the authorAbout the reviewersPackt is searching for authors like youPrefaceWho this book is forWhat this book coversTo get the most out of this bookDownload the color imagesConventions usedGet in touchReviewsSection 1:Kernel Core Frameworks for Embedded Device Driver DevelopmentChapter 1: Linux Kernel Concepts for Embedded DevelopersTechnical requirementsThe kernel locking API and shared objectsSpinlocksMutexesThe try-lock methodWaiting, sensing, and blocking in the Linux kernelWork deferring mechanismsSoftIRQsTaskletsWorkqueuesWorkqueues a new generationLinux kernel interrupt managementDesigning an interrupt handlerSummaryChapter 2: Leveraging the Regmap API and Simplifying the CodeTechnical requirementsIntroduction to regmap and its data structures I2C, SPI, and MMIOAccessing device registersQuick recap on Linux kernel IRQ managementRegmap IRQ API and data structuresSummaryChapter 3: Delving into the MFD Subsystem and Syscon APITechnical requirementsIntroducing the MFD subsystem and Syscon APIsDevice tree binding for MFD devicesUnderstanding Syscon and simple-mfdIntroducing simple-mfdSummaryChapter 4: Storming the Common Clock FrameworkTechnical requirementsCCF data structures and interfacesUnderstanding struct clk_hw and its dependenciesRegistering/unregistering the clock providerExposing clocks to others (in detail)Writing a clock provider driverProviding clock opsPutting it all together global overviewGrabbing and releasing clocksPreparing/unpreparing clocksRate functionsParent functionsPutting it all togetherSection 2: Multimedia and Power Saving in Embedded Linux SystemsChapter 5: ALSA SoC Framework Leveraging Codec and Platform Class DriversTechnical requirementsIntroduction to ASoCASoC Digital Audio InterfaceASoC sub-elementsWriting codec class driversCodec DAI and PCM (AKA DSP) configurationsThe concept of controlsThe concept of DAPMWriting the platform class driverThe CPU DAI driverThe platform DMA driver AKA PCM DMA driverSummaryChapter 6: ALSA SoC Framework Delving into the Machine Class DriversTechnical requirementsIntroduction to machine class driversThe DAI linkMachine routing considerationCodec pinsBoard connectorsMachine routingClocking and formatting considerationsSound card registrationLeveraging the simple-card machine driverCodec-less sound cardsSummaryChapter 7: Demystifying V4L2 and Video Capture Device DriversTechnical requirementsFramework architecture and the main data structuresInitializing and registering a V4L2 deviceIntroducing video device drivers the bridge driverInitializing and registering the video deviceVideo device file operationsV4L2 ioctl handlingThe videobuf2 interface and APIsThe concept of sub-devicesSub-device initializationSub-device operationsTraditional sub-device (un)registrationV4L2 controls infrastructureA word about control inheritanceSummaryChapter 8: Integrating with V4L2 Async and Media Controller FrameworksTechnical requirementsThe V4L2 async interface and the concept of graph bindingGraph bindingThe V4L2 async and graph-oriented APIV4L2 asyncThe Linux media controller frameworkThe media controller abstraction modelIntegrating media controller support in the driverMedia controller from user spaceSummaryChapter 9:Leveraging the V4L2 API from the User SpaceTechnical requirementsIntroduction to V4L2 from user spaceThe V4L2 user space APIVideo device opening and property managementQuerying the device capabilitiesBuffer managementImage (buffer) formatRequesting buffersEnqueueing the buffer and enabling streamingDequeuing buffersV4L2 user space toolsUsing v4l2-ctlDebugging V4L2 in user spaceSummaryChapter 10: Linux Kernel Power ManagementTechnical requirementsThe concept of power management on Linux-based systemsRuntime power managementSystem power management sleep statesAdding power management capabilities to device driversImplementing runtime PM capabilitySystem suspend and resume sequencesImplementing system sleep capabilityBeing a source of system wakeupWakeup source and sysfs (or debugfs)The IRQF_NO_SUSPEND flagSummarySection 3: Staying Up to Date with Other Linux Kernel SubsystemsChapter 11: Writing PCI Device DriversTechnical requirementsIntroduction to PCI buses and interfacesTerminologyPCI bus enumeration, device configuration, and addressingPCI address spacesInterrupt distributionThe Linux kernel PCI subsystem and data structuresPCI data structuresOverview of the PCI driver structurePCI and Direct Memory Access (DMA)PCI coherent (aka consistent) mappingStreaming DMA mappingSummaryChapter 12: Leveraging the NVMEM FrameworkTechnical requirementsIntroducing NVMEM data structures and APIsWriting the NVMEM provider driverNVMEM device (un)registrationImplementing NVMEM read/write callbacksDevice tree bindings for NVMEM providersNVMEM consumer driver APIsNVMEM in user spaceSummaryChapter 13: Watchdog Device DriversTechnical requirementsWatchdog data structures and APIsRegistering/unregistering a watchdog deviceHandling pretimeouts and governorsGPIO-based watchdogsThe watchdog user space interfaceStarting and stopping the watchdogGetting watchdog capabilities and identitySetting and getting the timeout and pretimeoutGetting the (boot/reboot) statusThe watchdog sysfs interfaceSummaryChapter 14: Linux Kernel Debugging Tips and Best PracticesTechnical requirementsUnderstanding the Linux kernel release processLinux kernel development tipsMessage printingLinux kernel tracing and performance analysisUsing Ftrace to instrument the codeLinux kernel debugging tipsOops and panic analysisUsing objdump to identify the faulty code line in the kernel moduleSummaryOther Books You May EnjoyLeave a review – let other readers know what you think
E-Beletrystyka
prosto do matury 2, geodeta zarobki, indianie z peru, prawo fizyki, bezpodstawne wzbogacenie przedawnienie, wypłata brutto a netto, 2800 netto ile to brutto
yyyyy