From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olof Johansson Subject: Re: [PATCH v2 1/2] i2c-core: dt: Pick i2c bus number from i2c alias if present Date: Mon, 14 Jan 2013 22:34:25 -0800 Message-ID: <20130115063425.GE20105@quad.lixom.net> References: <1357927027-4857-2-git-send-email-dianders@chromium.org> <1358189602-24180-1-git-send-email-dianders@chromium.org> <1358189602-24180-2-git-send-email-dianders@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1358189602-24180-2-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Doug Anderson Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Mark Brown , Kukjin Kim , Thomas Abraham , Padmavathi Venna , Ben Dooks , Wolfram Sang , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Haojian Zhuang , Arnd Bergmann , Sylwester Nawrocki , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-i2c@vger.kernel.org On Mon, Jan 14, 2013 at 10:53:21AM -0800, Doug Anderson wrote: > This allows you to get the equivalent functionality of > i2c_add_numbered_adapter() with all data in the device tree and no > special case code in your driver. This is a common device tree > technique. > > For quick reference, the FDT syntax for using an alias to provide an > ID looks like: > aliases { > i2c0 = &i2c_0; > i2c1 = &i2c_1; > }; > > Signed-off-by: Doug Anderson > Acked-by: Haojian Zhuang The call path for i2c_add_numbered_adapter() with nr == -1 is a little awkward now, but I don't see much how it can be improved much. Acked-by: Olof Johansson -Olof From mboxrd@z Thu Jan 1 00:00:00 1970 From: olof@lixom.net (Olof Johansson) Date: Mon, 14 Jan 2013 22:34:25 -0800 Subject: [PATCH v2 1/2] i2c-core: dt: Pick i2c bus number from i2c alias if present In-Reply-To: <1358189602-24180-2-git-send-email-dianders@chromium.org> References: <1357927027-4857-2-git-send-email-dianders@chromium.org> <1358189602-24180-1-git-send-email-dianders@chromium.org> <1358189602-24180-2-git-send-email-dianders@chromium.org> Message-ID: <20130115063425.GE20105@quad.lixom.net> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, Jan 14, 2013 at 10:53:21AM -0800, Doug Anderson wrote: > This allows you to get the equivalent functionality of > i2c_add_numbered_adapter() with all data in the device tree and no > special case code in your driver. This is a common device tree > technique. > > For quick reference, the FDT syntax for using an alias to provide an > ID looks like: > aliases { > i2c0 = &i2c_0; > i2c1 = &i2c_1; > }; > > Signed-off-by: Doug Anderson > Acked-by: Haojian Zhuang The call path for i2c_add_numbered_adapter() with nr == -1 is a little awkward now, but I don't see much how it can be improved much. Acked-by: Olof Johansson -Olof From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756133Ab3AOGe1 (ORCPT ); Tue, 15 Jan 2013 01:34:27 -0500 Received: from mail-da0-f50.google.com ([209.85.210.50]:49869 "EHLO mail-da0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754549Ab3AOGeZ (ORCPT ); Tue, 15 Jan 2013 01:34:25 -0500 Date: Mon, 14 Jan 2013 22:34:25 -0800 From: Olof Johansson To: Doug Anderson Cc: linux-i2c@vger.kernel.org, Mark Brown , Kukjin Kim , Thomas Abraham , Padmavathi Venna , Ben Dooks , Wolfram Sang , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Haojian Zhuang , Arnd Bergmann , Sylwester Nawrocki , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] i2c-core: dt: Pick i2c bus number from i2c alias if present Message-ID: <20130115063425.GE20105@quad.lixom.net> References: <1357927027-4857-2-git-send-email-dianders@chromium.org> <1358189602-24180-1-git-send-email-dianders@chromium.org> <1358189602-24180-2-git-send-email-dianders@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1358189602-24180-2-git-send-email-dianders@chromium.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 14, 2013 at 10:53:21AM -0800, Doug Anderson wrote: > This allows you to get the equivalent functionality of > i2c_add_numbered_adapter() with all data in the device tree and no > special case code in your driver. This is a common device tree > technique. > > For quick reference, the FDT syntax for using an alias to provide an > ID looks like: > aliases { > i2c0 = &i2c_0; > i2c1 = &i2c_1; > }; > > Signed-off-by: Doug Anderson > Acked-by: Haojian Zhuang The call path for i2c_add_numbered_adapter() with nr == -1 is a little awkward now, but I don't see much how it can be improved much. Acked-by: Olof Johansson -Olof