Re: Moxa UPort 1150 and RS-422/485… what's the "proper" way to switch modes

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

 



On Thu, Jun 29, 2017 at 08:50:32PM +0100, Alan Cox wrote:
> So IMHO there are two cases
> 
> 1. The configuration is fixed in the hardware - in which case we should
> automatically set it in kernel, or from device tree.

Right.

> 2. The configuration is soft - in which case you need an ioctl you can
> use on the port to change it - irrespective of whether sysfs also handles
> it. For simple permissions reasons and also to avoid races you need that
> ioctl.

Ok, but if we are going to extend and use the RS485 ioctl for this, I
think we should just stick to that and not add a sysfs-interface as
well.

I'll take a closer look at this.

> We intentionally have lots of spare space left to extend the RS485 ioctl,
> and we have termiox which contains even more room and historically in
> other Unixen dealt with all sorts of weird and wonderful parameters used
> on stuff like synchronous ports.

Yes, your foresight when adding (generalising) that ioctl might come in
handy now. :)

Thanks,
Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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