lkml.org 
[lkml]   [2019]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 6/6] media: i2c: ov13858: Register controls from firmware
Date
Use the newly introduced helper to parse properties from firmware and
registerer the associated v4l2 control.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
drivers/media/i2c/ov13858.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/drivers/media/i2c/ov13858.c b/drivers/media/i2c/ov13858.c
index aac6f77afa0f..aa239cc5a921 100644
--- a/drivers/media/i2c/ov13858.c
+++ b/drivers/media/i2c/ov13858.c
@@ -7,6 +7,7 @@
#include <linux/pm_runtime.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
+#include <media/v4l2-fwnode.h>

#define OV13858_REG_VALUE_08BIT 1
#define OV13858_REG_VALUE_16BIT 2
@@ -1666,6 +1667,13 @@ static int ov13858_init_controls(struct ov13858 *ov13858)
goto error;
}

+ ret = v4l2_fwnode_register_controls(dev_fwnode(&client->dev),
+ ctrl_hdlr, &ov13858_ctrl_ops);
+ if (ret)
+ goto error;
+
+
+
ov13858->sd.ctrl_handler = ctrl_hdlr;

return 0;
--
2.22.0
\
 
 \ /
  Last update: 2019-08-16 16:20    [W:0.036 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site