Re: How to add uart driver for /dev/ttyS1

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

 



vichy wrote:
 tr@fuckup:~/work$ ls -al /dev/ttyS*
 crw-rw---- 1 root dialout 4, 64 2009-07-12 14:46 /dev/ttyS0
 crw-rw---- 1 root dialout 4, 65 2009-07-12 14:46 /dev/ttyS1
 crw-rw---- 1 root dialout 4, 66 2009-07-12 14:46 /dev/ttyS2
 crw-rw---- 1 root dialout 4, 67 2009-07-12 14:46 /dev/ttyS3

as you can see the minor number of /dev/ttyS1 is 65.
if I remember correctly, each driver has to register its device node
with major, minor number.
In 8250.c, the 8250_init will assign each 8250 device  with 8250
driver which minor number is 64.
if I have 2 8250 serial devices, it seems impossible I can driver my
second 8250 serial device through /dev/ttyS1, since driver is
registered for minor 64 but ttyS1 is minor 65.

It doesn't, I think you need to re-read the driver again. Each device, when registered via serial8250_register_port() will be attached to a different minor number. The minor number in serial8250_reg is the starting point for a block reservation of minor numbers to use for the 8250 serial devices and is reserved when the driver, not the individual ports, is registered. The number of minor numbers reserved is controlled by the ".nr" element, in this "UART_NR", which I believe defaults to 4.

Martyn

appreciate your help,
vichy

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



--
Martyn Welch MEng MPhil MIET (Principal Software Engineer)   T:+44(0)127322748
GE Fanuc Intelligent Platforms Ltd,        |Registered in England and Wales
Tove Valley Business Park, Towcester,      |(3828642) at 100 Barbirolli Square,
Northants, NN12 6PF, UK T:+44(0)1327359444 |Manchester,M2 3AB  VAT:GB 927559189

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux