[media] V4L2: add v4l2-clock helpers to register and unregister a fixed-rate clock
Many bridges and video host controllers supply fixed rate always on clocks to their I2C devices. This patch adds two simple helpers to register and unregister such a clock. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
This commit is contained in:

committed by
Mauro Carvalho Chehab

parent
d3f884a709
commit
cf326dfebe
@@ -15,6 +15,7 @@
|
||||
#define MEDIA_V4L2_CLK_H
|
||||
|
||||
#include <linux/atomic.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
@@ -51,4 +52,17 @@ void v4l2_clk_disable(struct v4l2_clk *clk);
|
||||
unsigned long v4l2_clk_get_rate(struct v4l2_clk *clk);
|
||||
int v4l2_clk_set_rate(struct v4l2_clk *clk, unsigned long rate);
|
||||
|
||||
struct module;
|
||||
|
||||
struct v4l2_clk *__v4l2_clk_register_fixed(const char *dev_id,
|
||||
const char *id, unsigned long rate, struct module *owner);
|
||||
void v4l2_clk_unregister_fixed(struct v4l2_clk *clk);
|
||||
|
||||
static inline struct v4l2_clk *v4l2_clk_register_fixed(const char *dev_id,
|
||||
const char *id,
|
||||
unsigned long rate)
|
||||
{
|
||||
return __v4l2_clk_register_fixed(dev_id, id, rate, THIS_MODULE);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user