Re: [PATCH tty-next 2/2] serial: 8250: add driver for NI UARTs

From: Brenda Streiff
Date: Fri Mar 31 2023 - 14:00:14 EST


On 3/31/23 06:46, Ilpo Järvinen wrote:
On Wed, 29 Mar 2023, Brenda Streiff wrote:

+static int ni16550_get_regs(struct platform_device *pdev,
+ struct uart_port *port)
+{
+ struct resource *regs;
+
+ regs = platform_get_resource(pdev, IORESOURCE_IO, 0);
+ if (regs) {
+ port->iotype = UPIO_PORT;
+ port->iobase = regs->start;
+
+ return 0;
+ }

Do you need the port io?

Yes; on our x86_64 hardware this UART IP is in logic connected to LPC,
and the registers lie in I/O port space.


+ int irq;
+ int rs232_property = 0;
+ unsigned int prescaler;
+ const char *transceiver;
+ int txfifosz, rxfifosz;

Try to follow reverse xmas-tree order.

Is reverse xmas tree also the rule in the tty subsystem? I was aware of
it for netdev but I thought that was a netdev-specific rule (since it
only shows up in maintainer-netdev.rst and not more broadly)