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.
Showing the changes to include/uapi (1 of 1 file). Show all
Unified · Split
| @@ -231,4 +231,7 @@ · 230 unmodified lines | |||
| 231 | /* Sunplus UART */ | 231 | /* Sunplus UART */ |
| 232 | #define PORT_SUNPLUS 123 | 232 | #define PORT_SUNPLUS 123 |
| 233 | 233 | ||
| 234 | /* Generic type identifier for ports which type is not important to userspace. */ | ||
| 235 | #define PORT_GENERIC (-1) | ||
| 236 | |||
| 234 | #endif /* _UAPILINUX_SERIAL_CORE_H */ | 237 | #endif /* _UAPILINUX_SERIAL_CORE_H */ |