提交 774cc4c2 编写于 作者: G Guennadi Liakhovetski 提交者: Mauro Carvalho Chehab

[media] V4L2: add a v4l2-clk helper macro to produce an I2C device ID

To obtain a clock reference consumers supply their device object to the
V4L2 clock framework. The latter then uses the consumer device name to
find a matching clock. For that to work V4L2 clock providers have to
provide the same device name, when registering clocks. This patch adds
a helper macro to generate a suitable device name for I2C devices.
Signed-off-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
上级 cf326dfe
......@@ -65,4 +65,7 @@ static inline struct v4l2_clk *v4l2_clk_register_fixed(const char *dev_id,
return __v4l2_clk_register_fixed(dev_id, id, rate, THIS_MODULE);
}
#define v4l2_clk_name_i2c(name, size, adap, client) snprintf(name, size, \
"%d-%04x", adap, client)
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册