From: Doug Anderson Date: Fri, 1 Mar 2013 16:57:31 +0000 (-0800) Subject: i2c: core: Pick i2c bus number from dt alias if present X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~62^2~37 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee5c27440cc24d62ec463cce4c000bb32c5692c7;p=pandora-kernel.git i2c: core: Pick i2c bus number from dt alias if present 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 [wsa: removed one check from static function. We know our callers] Signed-off-by: Wolfram Sang --- Reading git-diff-tree failed