Commit 252fad1c authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab

[media] fc2580: implement V4L2 subdevice for SDR control

Implement V4L2 subdevice for bandwidth and frequency controls of
SDR usage. That driver now implements both DVB frontend and V4L2
subdevice. Driver itself is I2C driver. Lets see how it works.
Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 8b302d43
This diff is collapsed.
......@@ -22,6 +22,8 @@
#define FC2580_H
#include "dvb_frontend.h"
#include <media/v4l2-subdev.h>
#include <linux/i2c.h>
/*
* I2C address
......@@ -32,10 +34,13 @@
* struct fc2580_platform_data - Platform data for the fc2580 driver
* @clk: Clock frequency (0 = internal clock).
* @dvb_frontend: DVB frontend.
* @get_v4l2_subdev: Get V4L2 subdev.
*/
struct fc2580_platform_data {
u32 clk;
struct dvb_frontend *dvb_frontend;
struct v4l2_subdev* (*get_v4l2_subdev)(struct i2c_client *);
};
#endif
......@@ -22,6 +22,8 @@
#define FC2580_PRIV_H
#include "fc2580.h"
#include <media/v4l2-ctrls.h>
#include <media/v4l2-subdev.h>
#include <linux/regmap.h>
#include <linux/math64.h>
......@@ -131,6 +133,15 @@ struct fc2580_dev {
u32 clk;
struct i2c_client *client;
struct regmap *regmap;
struct v4l2_subdev subdev;
bool active;
unsigned int f_frequency;
unsigned int f_bandwidth;
/* Controls */
struct v4l2_ctrl_handler hdl;
struct v4l2_ctrl *bandwidth_auto;
struct v4l2_ctrl *bandwidth;
};
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment