[media] v4l2-clk: add new macro for v4l2_clk_name_of()
This macro is used to generate an OF string for a v4l2 clock. Signed-off-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
parent
af4d834727
commit
ac2841f3b8
|
@ -1678,7 +1678,7 @@ static int soc_of_bind(struct soc_camera_host *ici,
|
||||||
v4l2_clk_name_i2c(clk_name, sizeof(clk_name),
|
v4l2_clk_name_i2c(clk_name, sizeof(clk_name),
|
||||||
client->adapter->nr, client->addr);
|
client->adapter->nr, client->addr);
|
||||||
else
|
else
|
||||||
snprintf(clk_name, sizeof(clk_name), "of-%s",
|
v4l2_clk_name_of(clk_name, sizeof(clk_name),
|
||||||
of_node_full_name(remote));
|
of_node_full_name(remote));
|
||||||
|
|
||||||
icd->clk = v4l2_clk_register(&soc_camera_clk_ops, clk_name, icd);
|
icd->clk = v4l2_clk_register(&soc_camera_clk_ops, clk_name, icd);
|
||||||
|
|
|
@ -68,4 +68,7 @@ static inline struct v4l2_clk *v4l2_clk_register_fixed(const char *dev_id,
|
||||||
#define v4l2_clk_name_i2c(name, size, adap, client) snprintf(name, size, \
|
#define v4l2_clk_name_i2c(name, size, adap, client) snprintf(name, size, \
|
||||||
"%d-%04x", adap, client)
|
"%d-%04x", adap, client)
|
||||||
|
|
||||||
|
#define v4l2_clk_name_of(name, size, of_full_name) snprintf(name, size, \
|
||||||
|
"of-%s", of_full_name)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue