Re: [PATCH 2/2] tty: serial: bcm63xx: Allow device nodes to be renamed to /dev/ttyBCM*

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

 




On Mon, Nov 10, 2014 at 1:50 PM, Kevin Cernekee <cernekee@xxxxxxxxx> wrote:
> On Mon, Nov 10, 2014 at 11:22 AM, Rob Herring <robh@xxxxxxxxxx> wrote:
>>>> This can be solved with a udev rule to create sym links.
>>>
>>> Is it safe to register two console drivers named "ttyS" with the same
>>> major/minor numbers?  Maybe there is a trick to making them coexist?
>>
>> No, but I think you can do dynamic minor numbers. I seem to recall
>> this coming up with the Samsung UARTs a while back.
>
> The other variations I've seen in the tree are:
>
> nwpserial: ttySQ, major 4 minor 68 (not 64)
>
> sunhv, sunsab, sunsu, sunzilog: set uart_driver->major to 4 but let
> uart_driver->minor default to 0
>
> SERIAL_ATMEL_TTYAT: compile-time selectable between ttySn (4/64) and
> ttyATn (204/154).  txx9 does something similar using
> SERIAL_TXX9_STDSERIAL.
>
> A whole bunch of other SoC serial drivers use major 204 and a custom
> name like "ttyAL".  Some of these show up in
> Documentation/devices.txt; others don't.  ~3 drivers use 204/64 from
> the middle of the Altix assigned range.
>
> What is the current best practice for new drivers?

I think it would be using dynamic numbering, but would be good to have
others weigh in here. It looks like a dynamic major would solve your
problem. See tty_register_driver. Also, there was a patch to make this
the fallback behavior instead of an error[1], but it was never merged
(and it's not clear why). This was the Samsung related change I was
remembering.

Rob

[1] http://lists.linaro.org/pipermail/linaro-kernel/2014-January/010383.html
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux