History

serial: add PORT_GENERIC definition

Current pattern in the linux kernel is that every new serial driver adds one or more new PORT_ definitions because uart_ops::config_port() callback documentation prescribes setting port->type according to the type of port found, or to PORT_UNKNOWN if no port was detected. When the specific type of the port is not important to the userspace there's no need for a unique PORT_ value, but so far there's no suitable identifier for that case. Provide generic port type identifier other than PORT_UNKNOWN for ports which type is not important to userspace.

Max Filippov committed 3 years ago

Commit c7c5be51 parent 3047b5b1 file · +3 −0Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/linux/serial_core.h+3−0
@@ -231,4 +231,7 @@ · 230 unmodified lines
231231 /* Sunplus UART */
232232 #define PORT_SUNPLUS 123
233233
234+/* Generic type identifier for ports which type is not important to userspace. */
235+#define PORT_GENERIC (-1)
236+
234237 #endif /* _UAPILINUX_SERIAL_CORE_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t