Use CONFIG_HOOK_POWERCONTROL_LCD to control turning the LCD on/off
(the _LCDLIGHT hook is apparently meant to control the LCD backlight).
This commit is contained in:
parent
e9612620ef
commit
9d8bb20eb3
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: hd64461video.c,v 1.24 2004/03/15 03:38:39 uwe Exp $ */
|
/* $NetBSD: hd64461video.c,v 1.25 2004/03/15 23:38:16 uwe Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
|
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: hd64461video.c,v 1.24 2004/03/15 03:38:39 uwe Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: hd64461video.c,v 1.25 2004/03/15 23:38:16 uwe Exp $");
|
||||||
|
|
||||||
#include "debug_hpcsh.h"
|
#include "debug_hpcsh.h"
|
||||||
// #define HD64461VIDEO_HWACCEL
|
// #define HD64461VIDEO_HWACCEL
|
||||||
|
@ -1135,7 +1135,7 @@ hd64461video_off(struct hd64461video_chip *vc)
|
||||||
|
|
||||||
/* turn off the LCD */
|
/* turn off the LCD */
|
||||||
config_hook_call(CONFIG_HOOK_POWERCONTROL,
|
config_hook_call(CONFIG_HOOK_POWERCONTROL,
|
||||||
CONFIG_HOOK_POWERCONTROL_LCDLIGHT,
|
CONFIG_HOOK_POWERCONTROL_LCD,
|
||||||
(void *)0);
|
(void *)0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1146,7 +1146,7 @@ hd64461video_on(struct hd64461video_chip *vc)
|
||||||
|
|
||||||
/* turn on the LCD */
|
/* turn on the LCD */
|
||||||
err = config_hook_call(CONFIG_HOOK_POWERCONTROL,
|
err = config_hook_call(CONFIG_HOOK_POWERCONTROL,
|
||||||
CONFIG_HOOK_POWERCONTROL_LCDLIGHT,
|
CONFIG_HOOK_POWERCONTROL_LCD,
|
||||||
(void *)1);
|
(void *)1);
|
||||||
|
|
||||||
if (err == 0)
|
if (err == 0)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: j6x0lcd.c,v 1.1 2004/03/15 03:45:50 uwe Exp $ */
|
/* $NetBSD: j6x0lcd.c,v 1.2 2004/03/15 23:38:16 uwe Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2004 Valeriy E. Ushakov
|
* Copyright (c) 2004 Valeriy E. Ushakov
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: j6x0lcd.c,v 1.1 2004/03/15 03:45:50 uwe Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: j6x0lcd.c,v 1.2 2004/03/15 23:38:16 uwe Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/kernel.h>
|
#include <sys/kernel.h>
|
||||||
|
@ -241,7 +241,7 @@ j6x0lcd_attach(struct device *parent, struct device *self, void *aux)
|
||||||
|
|
||||||
/* LCD on/off hook */
|
/* LCD on/off hook */
|
||||||
config_hook(CONFIG_HOOK_POWERCONTROL,
|
config_hook(CONFIG_HOOK_POWERCONTROL,
|
||||||
CONFIG_HOOK_POWERCONTROL_LCDLIGHT,
|
CONFIG_HOOK_POWERCONTROL_LCD,
|
||||||
CONFIG_HOOK_SHARE,
|
CONFIG_HOOK_SHARE,
|
||||||
j6x0lcd_power, sc);
|
j6x0lcd_power, sc);
|
||||||
}
|
}
|
||||||
|
@ -324,7 +324,7 @@ j6x0lcd_power(ctx, type, id, msg)
|
||||||
uint16_t r;
|
uint16_t r;
|
||||||
|
|
||||||
if (type != CONFIG_HOOK_POWERCONTROL
|
if (type != CONFIG_HOOK_POWERCONTROL
|
||||||
|| id != CONFIG_HOOK_POWERCONTROL_LCDLIGHT)
|
|| id != CONFIG_HOOK_POWERCONTROL_LCD)
|
||||||
return (EINVAL);
|
return (EINVAL);
|
||||||
|
|
||||||
on = (int)msg;
|
on = (int)msg;
|
||||||
|
|
Loading…
Reference in New Issue