Re: [PATCH v4 1/2] sc16is7xx: spi interface is added

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

 



On Thu, 21 May 2015 19:44:56 +0530, ram kiran wrote:
> > On Wed, 20 May 2015 17:54:43 +0530, Rama Kiran Kumar Indrakanti wrote:
> > > spi interface for sc16is7xx is added along with Kconfig flag
> > > to enable spi or i2c, thus in a instance we can have either
> > > spi or i2c or both, in sync to the hw.
> > > 
> > > Signed-off-by: Rama Kiran Kumar Indrakanti <indrakanti_ram@xxxxxxxxxxx>
> > > ---
> > > 
> > > Changes in v2:
> > >  -Added seprate flags for i2c and spi
> > >  -Added space in the comments lines
> > >  -Added MODULE_ALIAS for spi interface
> > > 
> > > Changes in v3:
> > >  -Added Kconfig to avoid build errors
> > >  -Modified Makefile to refelect Kconfig changes
> > > 
> > > Changes in v4:
> > >  -Change to Kconig to avoid build errors
> > > ---
> > >  drivers/tty/serial/Kconfig     | 34 ++++++++++++++++++--
> > >  drivers/tty/serial/Makefile    |  2 +-
> > >  drivers/tty/serial/sc16is7xx.c | 70 +++++++++++++++++++++++++++++++++++++++++-
> > >  3 files changed, 101 insertions(+), 5 deletions(-)
> > > 
> > > diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
> > > index f8120c1..67edd34 100644
> > > --- a/drivers/tty/serial/Kconfig
> > > +++ b/drivers/tty/serial/Kconfig
> > > @@ -1179,15 +1179,43 @@ config SERIAL_SCCNXP_CONSOLE
> > >  	help
> > >  	  Support for console on SCCNXP serial ports.
> > >  
> > > +config SERIAL_SC16IS7XX_CORE
> > > +	bool
> > 
> > bool is wrong, it won't be possible to build as module.  Use tristate.
> Yes, you are right. 
> But making a tristate would cause module build issues when both
> the buses are selected together.
> 
> As module_spi_device and module_i2c_device would ultimately
> #define to module_driver.
> 
> Which would cause duplication issue.

True, I don't know how could I miss this earlier.  Obviously the driver
cannot use module_spi_driver or module_i2c_driver any more.  You need
to write mod_init and mod_exit functions by hand.

> > > +
> > >  config SERIAL_SC16IS7XX
> > >  	tristate "SC16IS7xx serial support"
> > > -	depends on I2C
> > >  	select SERIAL_CORE
> > > -	select REGMAP_I2C if I2C
> > > +	depends on I2C || SPI_MASTER
> > >  	help
> > >  	  This selects support for SC16IS7xx serial ports.
> > >  	  Supported ICs are SC16IS740, SC16IS741, SC16IS750, SC16IS752,
> > > -	  SC16IS760 and SC16IS762.
> > > +	  SC16IS760 and SC16IS762. Select supported buses using options below.
> > > +
> > > +config SERIAL_SC16IS7XX_I2C
> > > +	bool "SC16IS7xx for I2C interface"
> > > +	depends on SERIAL_SC16IS7XX
> > > +	depends on I2C
> > > +	select SERIAL_SC16IS7XX_CORE
> > 
> > You need to say:
> > 
> > select SERIAL_SC16IS7XX_CORE if SERIAL_SC16IS7XX
> yes, this would help but a bit overkill, as we already said depends on
> SERIAL_SC16IS7XX, and once we have the depends clear to go
> we would be open to select SERIAL_SC16IS7XX_CORE

This forces _CORE to be selected in the same mode
(=m if SERIAL_SC16IS7XX=m and =y when SERIAL_SC16IS7XX=y).

--
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