Re: [PATCH v3 3/5] i2c: designware: Add slave definitions
From: Andy Shevchenko
Date: Fri Nov 18 2016 - 07:37:32 EST
On Fri, 2016-11-18 at 11:19 +0000, Luis Oliveira wrote:
> Â- Add slave defintitions to i2c-designware-core
> Â- Changes in Kconfig to auto-enable I2C_SLAVE when compiling the
> modules
> Â- Add compatible string to designware-core.txt explaining the
> devicetree bindings
>
> --- a/Documentation/devicetree/bindings/i2c/i2c-designware.txt
> +++ b/Documentation/devicetree/bindings/i2c/i2c-designware.txt
> @@ -2,7 +2,9 @@
> Â
> ÂRequired properties :
> Â
> - - compatible : should be "snps,designware-i2c"
> + - compatible : should be:
> +ÂÂÂ- "snps,designware-i2c" to setup the hardware block as I2C master.
> +ÂÂÂ- "snps,designware-i2c-slave" to setup the hardware block as I2C
> slave.
Not sure about this one.
Compatible string is more generic than list of modes. Basically you have
to add a property which selects mode.
DT people's ACK is a must for this change.
--- a/drivers/i2c/busses/Kconfig
> +++ b/drivers/i2c/busses/Kconfig
> @@ -470,6 +470,7 @@ config I2C_DESIGNWARE_CORE
> Âconfig I2C_DESIGNWARE_PLATFORM
> Â tristate "Synopsys DesignWare Platform"
> Â select I2C_DESIGNWARE_CORE
> + select I2C_SLAVE
>
Common rule, generic dependencies usually go first
select I2C_SLAVE
 select I2C_DESIGNWARE_CORE
--
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy