RE: SC16IS762 SPI interface Driver

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

 



>
> On Tue, 28 Apr 2015 16:45:46 +0530, ram kiran wrote:
>>>> SC16IS762, has two interfaces i2c/spi, and I see that the current
>>>> driver preset in main line kernel 4.0, supports only i2c.
>>>> Is it available over SPI interface ?
>>>
>>> Current mainline driver is not available on SPI, but it uses generic
>>> regmap interface to access the registers so it shouldn't be hard to
>>> make it work with SPI (you would just have to write the .probe()
>>> routines).
>>>
>> yes, i did do have a KCONFIG in the same file, to split either for existing i2c and SPI.
>
> Do you mean ifdef on the entire driver?
>
Nope, just for the device specific code. (at the init)

>>>> I have a tested SPI interface based SC16IS762 chip driver.
>>>> Would like to know if I can contribute the code to main line kernel.
>>>
>>> I think you mean the sc16is7x2.c driver by Manuel Stahl and others.
>>> I'm pretty sure we don't want to have two drivers for the same device
>>> in mainline, especially that the current one uses that generic register
>>> API.
>>>
>>> However, both of those drivers have issues with locking (uart uses
>>> spinlocks but I2C/SPI transfers are asynchronous) it would be nice
>>> to somehow merge them together to get the best of both.
>>
>> would you mean we can have the I2c and SPI co-exist,  to resolve on this ?
>
> If you take a look at the mainline driver there is only about 50 lines
> of i2c-specific code at the end of the file - namely the .probe() and
> .remove() routines [1]. I should suffice to provide similar routines
> for SPI.
>

Exactly, the same. We may not even need separate functions, have defined by config
for SPI. (Default spi configured,)
> [1]
> http://lxr.free-electrons.com/source/drivers/tty/serial/sc16is7xx.c#L1185
>
> --
> 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
 		 	   		  --
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