lkml.org 
[lkml]   [2023]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH tty-next 2/2] serial: 8250: add driver for NI UARTs
From
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)

\
 
 \ /
  Last update: 2023-03-31 20:00    [W:0.082 / U:2.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site