Re: Patch for SC16IS7XX

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

 



On Fri, 26 Jun 2015 15:57:56 +0200, Michael Allwright wrote:
> Hi,
> 
> Sorry about the top post! I tested your patch today and I think it is
> a step in the right direction, although I wasn't seeing the ttySC2,3
> appearing the in /dev, only the first two devices ttySC0,1 were
> working. I resolved this using a hack (see patch below) that tries to
> track which lines have already been registered in the driver, perhaps
> (I hope) there is a more elegant solution to this...
> 
> After this, all devices show up under /dev, however ports ttySC2,3
> appear to still not be working.

Can you show use how you instantiate those devices (most likely part
of your device tree)?

> At the moment, I see the following errors repeating:
> 
> [ 3002.450073] sc16is7xx_port_irq: 14687 callbacks suppressed
> [ 3002.455841] sc16is7xx 1-0049: Port 2: Unexpected interrupt: 0
> [ 3002.462249] sc16is7xx 1-0049: Port 2: Unexpected interrupt: 0
> [ 3002.468597] sc16is7xx 1-0049: Port 2: Unexpected interrupt: 0
> [ 3002.474975] sc16is7xx 1-0049: Port 2: Unexpected interrupt: 0
> [ 3002.481353] sc16is7xx 1-0049: Port 2: Unexpected interrupt: 0
> [ 3002.487670] sc16is7xx 1-0049: Port 2: Unexpected interrupt: 0
> [ 3002.494049] sc16is7xx 1-0049: Port 2: Unexpected interrupt: 0
> [ 3002.500488] sc16is7xx 1-0049: Port 2: Unexpected interrupt: 0
> [ 3002.506835] sc16is7xx 1-0049: Port 2: Unexpected interrupt: 0
> [ 3002.513244] sc16is7xx 1-0049: Port 2: Unexpected interrupt: 0

Are you sure you configured the i2c addresses on the devices?

> I think this might be an issue with the kworker threads and the
> interrupts. In particular, does the string for the kworker thread here
> need to be unique?

I don't think so.  We could print the address into the thread name but
it's not worth the hassle IMO.

> -module_i2c_driver(sc16is7xx_i2c_uart_driver);
> 
>  MODULE_ALIAS("i2c:sc16is7xx");
> +
> +static int __init sc16is7xx_init(void)
> +{
> +    int ret;
> +
> +    ret = uart_register_driver(&sc16is7xx_uart);
> +    if (ret) {
> +        pr_err("Registering UART driver failed\n");
> +        return ret;
> +    }
> +
> +    ret = i2c_add_driver(&sc16is7xx_i2c_uart_driver);
> +    if (ret < 0) {
> +        pr_err("failed to init sc16is7xx i2c --> %d\n", ret);
> +        return ret;
> +    }
> +    return ret;
> +}
> +module_init(sc16is7xx_init);
> +
> +static void __exit sc16is7xx_exit(void)
> +{
> +    i2c_del_driver(&sc16is7xx_i2c_uart_driver);
> +    uart_unregister_driver(&sc16is7xx_uart);
> +}
> +module_exit(sc16is7xx_exit);
> +
>  MODULE_LICENSE("GPL");
>  MODULE_AUTHOR("Jon Ringle <jringle@xxxxxxxxxxxxx>");
>  MODULE_DESCRIPTION("SC16IS7XX serial driver");

I see that you are not using the code from tty-next.  Any reason for
that?  It would be easier if we used the same version of the code ;)
--
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