Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757261AbcCXOCw (ORCPT ); Thu, 24 Mar 2016 10:02:52 -0400 Received: from mail.kernel.org ([198.145.29.136]:41650 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753112AbcCXOCn (ORCPT ); Thu, 24 Mar 2016 10:02:43 -0400 MIME-Version: 1.0 In-Reply-To: References: <1454254380-9246-1-git-send-email-jean-michel.hautbois@veo-labs.com> <20160201144608.GA26606@rob-hp-laptop> From: Rob Herring Date: Thu, 24 Mar 2016 09:02:13 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] i2c: Add generic support passing secondary devices addresses To: Jean-Michel Hautbois , "wsa@the-dreams.de" Cc: Jean-Michel Hautbois , linux-kernel , "linux-i2c@vger.kernel.org" , "devicetree@vger.kernel.org" , Kumar Gala , Ian Campbell , Mark Rutland , Pawel Moll , Laurent Pinchart , Lars-Peter Clausen Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2165 Lines: 50 On Thu, Mar 24, 2016 at 5:11 AM, Jean-Michel Hautbois wrote: > Hi ! > > 2016-02-01 15:46 GMT+01:00 Rob Herring : >> On Sun, Jan 31, 2016 at 04:33:00PM +0100, Jean-Michel Hautbois wrote: >>> Some I2C devices have multiple addresses assigned, for example each address >>> corresponding to a different internal register map page of the device. >>> So far drivers which need support for this have handled this with a driver >>> specific and non-generic implementation, e.g. passing the additional address >>> via platform data. >>> >>> This patch provides a new helper function called i2c_new_secondary_device() >>> which is intended to provide a generic way to get the secondary address >>> as well as instantiate a struct i2c_client for the secondary address. >>> >>> The function expects a pointer to the primary i2c_client, a name >>> for the secondary address and an optional default address. The name is used >>> as a handle to specify which secondary address to get. >>> >>> The default address is used as a fallback in case no secondary address >>> was explicitly specified. In case no secondary address and no default >>> address were specified the function returns NULL. >>> >>> For now the function only supports look-up of the secondary address >>> from devicetree, but it can be extended in the future >>> to for example support board files and/or ACPI. >>> >>> Signed-off-by: Jean-Michel Hautbois >>> --- >>> v2: adding some DT bindings documentation (more than one year later...) >>> >>> Documentation/devicetree/bindings/i2c/i2c.txt | 7 +++++ >> >> Acked-by: Rob Herring >> >>> drivers/i2c/i2c-core.c | 42 +++++++++++++++++++++++++++ >>> include/linux/i2c.h | 5 ++++ >>> 3 files changed, 54 insertions(+) > > Thanks Rob for your ack. What is the future of this patch ? I'm expecting Wolfram to pick it up. > I know the merge window is opened, so it will not be integrated now, > but could be in the next version ? I would say it is not too late for 4.6 if it was missed by accident. Rob