Commit 528af195 authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab

[media] mn88472: convert driver to I2C client

It uses I2C bus so better to implement it as a standard I2C driver
model. It was using proprietary DVB binding.
Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 0186e434
This diff is collapsed.
......@@ -21,26 +21,18 @@
struct mn88472_config {
/*
* max bytes I2C client could write
* Value must be set.
* Max num of bytes given I2C adapter could write at once.
* Default: none
*/
int i2c_wr_max;
};
u16 i2c_wr_max;
#if IS_ENABLED(CONFIG_DVB_MN88472)
extern struct dvb_frontend *mn88472_attach(
const struct mn88472_config *cfg,
struct i2c_adapter *i2c
);
#else
static inline struct dvb_frontend *mn88472_attach(
const struct mn88472_config *cfg,
struct i2c_adapter *i2c
)
{
dev_warn(&i2c->dev, "%s: driver disabled by Kconfig\n", __func__);
return NULL;
}
#endif
/* Everything after that is returned by the driver. */
/*
* DVB frontend.
*/
struct dvb_frontend **fe;
};
#endif
......@@ -19,16 +19,14 @@
#include "dvb_frontend.h"
#include "mn88472.h"
#include "dvb_math.h"
#include <linux/firmware.h>
#include <linux/i2c-mux.h>
#define MN88472_FIRMWARE "dvb-demod-mn88472-02.fw"
struct mn88472_dev {
struct i2c_adapter *i2c;
const struct mn88472_config *cfg;
struct i2c_client *client[3];
struct dvb_frontend fe;
u16 i2c_wr_max;
fe_delivery_system_t delivery_system;
bool warm; /* FW running */
};
......
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