i2c: Match using traditional OF methods, then by vendor-less compatible strings
This function provides a single call for all I2C devices which need to match firstly using traditional OF means i.e by of_node, then if that fails we attempt to match using the supplied I2C client name with a list of supplied compatible strings with the '<vendor>,' string removed. The latter is required due to the unruly naming conventions used currently by I2C devices. Acked-by: NGrant Likely <grant.likely@linaro.org> Signed-off-by: NLee Jones <lee.jones@linaro.org> [Kieran: Fix static inline usage on !CONFIG_OF] Tested-by: NKieran Bingham <kieran@bingham.xyz> Reviewed-by: NJavier Martinez Canillas <javier@osg.samsung.com> Tested-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NKieran Bingham <kieran@bingham.xyz> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
Showing
想要评论请 注册 或 登录