diff mbox

DM1105: could not attach frontend 195d:1105

Message ID 201001311545.09620.liplianin@me.by (mailing list archive)
State RFC
Headers show

Commit Message

Igor M. Liplianin Jan. 31, 2010, 1:45 p.m. UTC
None
diff mbox

Patch

diff -r d6520e486ee6 linux/drivers/media/dvb/dm1105/dm1105.c
--- a/linux/drivers/media/dvb/dm1105/dm1105.c	Sat Jan 30 01:27:34 2010 -0200
+++ b/linux/drivers/media/dvb/dm1105/dm1105.c	Sun Jan 31 15:35:30 2010 +0200
@@ -52,6 +52,7 @@ 
 #define DM1105_BOARD_DVBWORLD_2002	1
 #define DM1105_BOARD_DVBWORLD_2004	2
 #define DM1105_BOARD_AXESS_DM05		3
+#define DM1105_BOARD_UNBRANDED_GPIO15	4
 
 /* ----------------------------------------------- */
 /*
@@ -207,6 +208,9 @@ 
 	[DM1105_BOARD_AXESS_DM05] = {
 		.name		= "Axess/EasyTv DM05",
 	},
+	[DM1105_BOARD_UNBRANDED_GPIO15] = {
+		.name		= "Unbranded Board GPIO15",
+	},
 };
 
 static const struct dm1105_subid dm1105_subids[] = {
@@ -327,6 +331,8 @@ 
 #define dm_setl(reg, bit)	dm_andorl((reg), (bit), (bit))
 #define dm_clearl(reg, bit)	dm_andorl((reg), (bit), 0)
 
+#define DM1105_GPIO(x)		(1 << x)
+
 static int dm1105_i2c_xfer(struct i2c_adapter *i2c_adap,
 			    struct i2c_msg *msgs, int num)
 {
@@ -441,6 +447,12 @@ 
 	u32 lnb_mask, lnb_13v, lnb_18v, lnb_off;
 
 	switch (dev->boardnr) {
+	case DM1105_BOARD_UNBRANDED_GPIO15:
+		lnb_mask = DM05_LNB_MASK;
+		lnb_off = DM05_LNB_OFF | DM1105_GPIO(15);/* keep GPIO15 high */
+		lnb_13v = DM05_LNB_13V | DM1105_GPIO(15);
+		lnb_18v = DM05_LNB_18V | DM1105_GPIO(15);
+		break;
 	case DM1105_BOARD_AXESS_DM05:
 		lnb_mask = DM05_LNB_MASK;
 		lnb_off = DM05_LNB_OFF;
@@ -758,6 +770,14 @@ 
 			dev->fe->ops.set_voltage = dm1105_set_voltage;
 
 		break;
+	case DM1105_BOARD_UNBRANDED_GPIO15:
+		/* reset frontend */
+		dm_clearl(DM1105_GPIOCTR, DM1105_GPIO(15));
+		dm_clearl(DM1105_GPIOVAL, DM1105_GPIO(15));
+		msleep(10);
+		dm_setl(DM1105_GPIOVAL, DM1105_GPIO(15));
+		msleep(100);
+	/* break omitted intentionally */
 	case DM1105_BOARD_DVBWORLD_2002:
 	case DM1105_BOARD_AXESS_DM05:
 	default: