From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753633AbcKRMh3 (ORCPT ); Fri, 18 Nov 2016 07:37:29 -0500 Received: from mga02.intel.com ([134.134.136.20]:51100 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751527AbcKRMh1 (ORCPT ); Fri, 18 Nov 2016 07:37:27 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,509,1473145200"; d="scan'208";a="787982800" Message-ID: <1479472552.22212.23.camel@linux.intel.com> Subject: Re: [PATCH v3 3/5] i2c: designware: Add slave definitions From: Andy Shevchenko To: Luis Oliveira , wsa@the-dreams.de, robh+dt@kernel.org, mark.rutland@arm.com, jarkko.nikula@linux.intel.com, mika.westerberg@linux.intel.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ramiro.Oliveira@synopsys.com, Joao.Pinto@synopsys.com, CARLOS.PALMINHA@synopsys.com Date: Fri, 18 Nov 2016 14:35:52 +0200 In-Reply-To: References: Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.2-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Intel Finland Oy