Subversion Repositories Kolibri OS

Rev

Rev 2330 | Rev 5060 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2330 Rev 3031
Line 232... Line 232...
232
    /* don't do much */
232
    /* don't do much */
233
    return;
233
    return;
234
}
234
}
Line 235... Line 235...
235
 
235
 
236
/* set the tfp410 power state */
236
/* set the tfp410 power state */
237
static void tfp410_dpms(struct intel_dvo_device *dvo, int mode)
237
static void tfp410_dpms(struct intel_dvo_device *dvo, bool enable)
238
{
238
{
Line 239... Line 239...
239
	uint8_t ctl1;
239
	uint8_t ctl1;
240
 
240
 
Line 241... Line 241...
241
	if (!tfp410_readb(dvo, TFP410_CTL_1, &ctl1))
241
	if (!tfp410_readb(dvo, TFP410_CTL_1, &ctl1))
242
		return;
242
		return;
243
 
243
 
244
	if (mode == DRM_MODE_DPMS_ON)
244
	if (enable)
Line 245... Line 245...
245
		ctl1 |= TFP410_CTL_1_PD;
245
		ctl1 |= TFP410_CTL_1_PD;
246
	else
246
	else
Line -... Line 247...
-
 
247
		ctl1 &= ~TFP410_CTL_1_PD;
-
 
248
 
-
 
249
	tfp410_writeb(dvo, TFP410_CTL_1, ctl1);
-
 
250
}
-
 
251
 
-
 
252
static bool tfp410_get_hw_state(struct intel_dvo_device *dvo)
-
 
253
{
-
 
254
	uint8_t ctl1;
-
 
255
 
-
 
256
	if (!tfp410_readb(dvo, TFP410_CTL_1, &ctl1))
-
 
257
		return false;
-
 
258
 
-
 
259
	if (ctl1 & TFP410_CTL_1_PD)
247
		ctl1 &= ~TFP410_CTL_1_PD;
260
		return true;
248
 
261
	else
249
	tfp410_writeb(dvo, TFP410_CTL_1, ctl1);
262
		return false;
Line 250... Line 263...
250
}
263
}
Line 297... Line 310...
297
	.init = tfp410_init,
310
	.init = tfp410_init,
298
	.detect = tfp410_detect,
311
	.detect = tfp410_detect,
299
	.mode_valid = tfp410_mode_valid,
312
	.mode_valid = tfp410_mode_valid,
300
	.mode_set = tfp410_mode_set,
313
	.mode_set = tfp410_mode_set,
301
	.dpms = tfp410_dpms,
314
	.dpms = tfp410_dpms,
-
 
315
	.get_hw_state = tfp410_get_hw_state,
302
	.dump_regs = tfp410_dump_regs,
316
	.dump_regs = tfp410_dump_regs,
303
	.destroy = tfp410_destroy,
317
	.destroy = tfp410_destroy,
304
};
318
};