Re: [PATCH 2/2] serial: Airoha SoC UART and HSUART support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.

diff --git a/include/uapi/linux/serial_core.h b/include/uapi/linux/serial_core.h
index 9c007a106330..c71fb338accb 100644
--- a/include/uapi/linux/serial_core.h
+++ b/include/uapi/linux/serial_core.h
@@ -231,6 +231,12 @@
   /* Sunplus UART */
   #define PORT_SUNPLUS 123

+/* Airoha UART */
+#define PORT_AIROHA  124
+
+/* Airoha HSUART */
+#define PORT_AIROHA_HS       125

Do you REALLY need these port definitions in userspace?  If so, what is
going to use them there?


Testing another PORT define gives this result:

grep -ri PORT_MTK_BTIF *

drivers/tty/serial/8250/8250_of.c:            .data = (void *)PORT_MTK_BTIF, },
drivers/tty/serial/8250/8250_port.c:  [PORT_MTK_BTIF] = {
include/uapi/linux/serial_core.h:#define PORT_MTK_BTIF        117

Per my understanding this is how the current code is designed to work.

That's a very old pattern, I'm asking you if you need this new number in
userspace, which is what you are doing here.  I'd prefer not to add new
values here as they are a pain to manage and we can never change them if
added.


I dont need it in userspace. I need it in serial8250_config uart_config[] that uses this header.

I need to pass something from 8250_of.c so that 8250_port.c can pick up that an airoha uart is selected via dts. Any solution that is acceptable is fine by me. I just reused the current implemented method in 8250_of.c.

MvH
Benjamin Larsson




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux