You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apply a consistent two space indentation for all \item entries under
list environments, while keeping \begin{itemize}/\end{itemize}
left-aligned. This is a formatting-only update with no content changes,
improving consistency across the document.
Co-authored-by: EricccTaiwan <[email protected]>
Signed-off-by: Chia-Hao Chiu <[email protected]>
\item\href{https://lwn.net/Articles/569635/}{Kernel address space layout randomization}
1570
1570
\end{itemize}
1571
1571
1572
1572
The source code here is an example of such a kernel module.
@@ -1782,10 +1782,10 @@ \subsection{Spinlocks}
1782
1782
Unlike \cpp|spin_lock_irq()| and \cpp|spin_lock_irqsave()|, which disable both hardware and software interrupts, \cpp|spin_lock_bh()| is useful when hardware interrupts need to remain active.
1783
1783
1784
1784
For more information about spinlock usage and lock types, see the following resources:
The driver needs to export a \cpp|vinput_device()| that contains the virtual device name and \cpp|vinput_ops| structure that describes:
2171
2171
2172
2172
\begin{itemize}
2173
-
\item the init function: \cpp|init()|
2174
-
\item the input event injection function: \cpp|send()|
2175
-
\item the readback function: \cpp|read()|
2173
+
\item the init function: \cpp|init()|
2174
+
\item the input event injection function: \cpp|send()|
2175
+
\item the readback function: \cpp|read()|
2176
2176
\end{itemize}
2177
2177
2178
2178
Then using \cpp|vinput_register_device()| and \cpp|vinput_unregister_device()| will add a new device to the list of support virtual input devices.
@@ -2285,10 +2285,10 @@ \subsection{Device Tree and Kernel Modules}
2285
2285
2286
2286
The key concepts for Device Tree interaction in kernel modules include:
2287
2287
\begin{itemize}
2288
-
\item\textbf{Compatible strings}: Unique identifiers that match Device Tree nodes to their drivers
2289
-
\item\textbf{Property reading}: Functions to extract configuration data from Device Tree nodes
2290
-
\item\textbf{Platform driver framework}: Infrastructure for binding drivers to devices described in Device Tree
2291
-
\item\textbf{Device-specific data}: Custom properties that can be defined for specific hardware
2288
+
\item\textbf{Compatible strings}: Unique identifiers that match Device Tree nodes to their drivers
2289
+
\item\textbf{Property reading}: Functions to extract configuration data from Device Tree nodes
2290
+
\item\textbf{Platform driver framework}: Infrastructure for binding drivers to devices described in Device Tree
2291
+
\item\textbf{Device-specific data}: Custom properties that can be defined for specific hardware
2292
2292
\end{itemize}
2293
2293
2294
2294
\subsection{Example: Device Tree Module}
@@ -2321,11 +2321,11 @@ \subsection{Testing Device Tree Modules}
2321
2321
Testing Device Tree modules can be done in several ways:
2322
2322
2323
2323
\begin{enumerate}
2324
-
\item\textbf{Using Device Tree overlays}: On systems that support it (like Raspberry Pi), you can load Device Tree overlays at runtime to add new devices without rebooting.
2324
+
\item\textbf{Using Device Tree overlays}: On systems that support it (like Raspberry Pi), you can load Device Tree overlays at runtime to add new devices without rebooting.
2325
2325
2326
-
\item\textbf{Modifying the main Device Tree}: Add your device nodes to the system's main Device Tree source file and recompile it.
2326
+
\item\textbf{Modifying the main Device Tree}: Add your device nodes to the system's main Device Tree source file and recompile it.
2327
2327
2328
-
\item\textbf{Using QEMU}: For development and testing, QEMU can emulate systems with custom Device Trees, allowing you to test your modules without physical hardware.
2328
+
\item\textbf{Using QEMU}: For development and testing, QEMU can emulate systems with custom Device Trees, allowing you to test your modules without physical hardware.
2329
2329
\end{enumerate}
2330
2330
2331
2331
To check if your device was properly detected, you can examine the sysfs filesystem:
@@ -2343,13 +2343,13 @@ \subsection{Common Device Tree Functions}
2343
2343
Here are some commonly used Device Tree functions in kernel modules:
2344
2344
2345
2345
\begin{itemize}
2346
-
\item\cpp|of_property_read_string()| - Read a string property
2347
-
\item\cpp|of_property_read_u32()| - Read a 32-bit integer property
2348
-
\item\cpp|of_property_read_bool()| - Check if a boolean property exists
2349
-
\item\cpp|of_find_property()| - Find a property by name
2350
-
\item\cpp|of_get_property()| - Get a property's raw value
2351
-
\item\cpp|of_match_device()| - Match a device against a match table
2352
-
\item\cpp|of_parse_phandle()| - Parse a phandle reference to another node
2346
+
\item\cpp|of_property_read_string()| - Read a string property
2347
+
\item\cpp|of_property_read_u32()| - Read a 32-bit integer property
2348
+
\item\cpp|of_property_read_bool()| - Check if a boolean property exists
2349
+
\item\cpp|of_find_property()| - Find a property by name
2350
+
\item\cpp|of_get_property()| - Get a property's raw value
2351
+
\item\cpp|of_match_device()| - Match a device against a match table
2352
+
\item\cpp|of_parse_phandle()| - Parse a phandle reference to another node
2353
2353
\end{itemize}
2354
2354
2355
2355
These functions provide a robust interface for extracting configuration data from Device Tree nodes,
0 commit comments