Commit 4d8569df authored by Nam Cao's avatar Nam Cao Committed by Anup Patel
Browse files

platform: starfive: get I2C offset address from clocks property



The current code gets the I2C offset address using the device tree node
name: it get the I2C device index from the 4th character in the node
name (for example, "i2c5" -> i2c device 5). However, the device tree
node's name in U-Boot is actually just "i2c" without the number, so the
current code cannot be used with the device tree from U-Boot.

Get the I2C offset address from the "clocks" property instead.

Signed-off-by: default avatarNam Cao <namcao@linutronix.de>
Reviewed-by: default avatarMinda Chen <minda.chen@starfivetech.com>
Tested-by: default avatarMinda Chen <minda.chen@starfivetech.com>
Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
parent 034af1f8
Supports Markdown
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