Skip to content
Commit ee5c2744 authored by Doug Anderson's avatar Doug Anderson Committed by Wolfram Sang
Browse files

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: default avatarDoug Anderson <dianders@chromium.org>
[wsa: removed one check from static function. We know our callers]
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 8bb96604
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment