On Fri, 15 May 2015 13:27:52 +0530, ram.i hcltech wrote: > diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig > index f8120c1..7c958e4 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 > + depends on SERIAL_SC16IS7XX_I2C || SERIAL_SC16IS7XX_SPI > + > config SERIAL_SC16IS7XX > tristate "SC16IS7xx serial support" > - depends on I2C > select SERIAL_CORE > + depends on I2C || SPI_MASTER This dependency should stay here but bus-specific options need proper dependencies too, see last comment. > select REGMAP_I2C if I2C > + select REGMAP_SPI if SPI_MASTER Those selects of REGMAP could go to bus-specific options. > 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 > + select SERIAL_SC16IS7XX_CORE > + default y > + help > + Enable SC16IS7xx driver on I2C bus, > + If required say y, and say n to i2c if not required, Help message seems copied for both buses and i2c is not replaced by SPI here rendering the message contradictory. > + Enabled by default to support oldconfig. > + Only upon selecting one bus interface the > + SC16IS7XX_CORE is enabled. The last sentence is a bit misleading as we can have both buses enabled. I would put the help message simply as: Enable SC16IS7xx driver on bus XXX. You must select at least one bus for the driver to be built. > +config SERIAL_SC16IS7XX_SPI > + bool "SC16IS7xx for spi interface" > + depends on SERIAL_SC16IS7XX > + select SERIAL_SC16IS7XX_CORE > + help > + Enable SC16IS7xx driver on SPI bus, > + If required say y, and say n to i2c if not required, > + This is additional support to exsisting driver. > + Only upon selecting one bus interface the > + SC16IS7XX_CORE is enabled. Bus specific options must depend on appropriate bus. If we leave the code like this nothing stops us from selecting both buses when only one of them is built into the kernel. -- 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