From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932578AbcLLXQX (ORCPT ); Mon, 12 Dec 2016 18:16:23 -0500 Received: from mail.kernel.org ([198.145.29.136]:36896 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932506AbcLLXQU (ORCPT ); Mon, 12 Dec 2016 18:16:20 -0500 MIME-Version: 1.0 In-Reply-To: References: <5173a9456c423025d8f15baafa2499440cbe1b51.1481131072.git.lolivei@synopsys.com> <20161212170214.4cydp256jsp7srar@rob-hp-laptop> From: Rob Herring Date: Mon, 12 Dec 2016 17:15:56 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 3/5] i2c: designware: Add slave definitions To: Luis de Oliveira Cc: "wsa@the-dreams.de" , "mark.rutland@arm.com" , "jarkko.nikula@linux.intel.com" , "andriy.shevchenko@linux.intel.com" , "mika.westerberg@linux.intel.com" , "linux-i2c@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Ramiro.Oliveira@synopsys.com" , "Joao.Pinto@synopsys.com" , "CARLOS.PALMINHA@synopsys.com" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 12, 2016 at 12:35 PM, Luis de Oliveira wrote: > Hi all, Please don't top post. > > The slave address could be set by the I2C slave backend so I can't use it to setup the controller. > A boolean property was my initial approach then Andy and Wolfram Sang suggested the use of compatible strings and later It was suggested to use a property to select mode but I can do it again if it's the best way. > Can you please tell me where should it be documented? bindings/i2c/i2c.txt. Actually, looking at this some more, we already have a way to describe the controller being a slave device with the I2C_OWN_SLAVE_ADDRESS flag in the reg property. We should just need a helper to read reg property of each child and check for the bit set. Rob