1*4c494f76Srjs /* $NetBSD: sed1356var.h,v 1.4 2009/05/29 14:15:45 rjs Exp $ */ 2e671a13dStoshii 3e671a13dStoshii /*- 4e671a13dStoshii * Copyright (c) 1999-2001 5e671a13dStoshii * Shin Takemura and PocketBSD Project. All rights reserved. 6e671a13dStoshii * 7e671a13dStoshii * Redistribution and use in source and binary forms, with or without 8e671a13dStoshii * modification, are permitted provided that the following conditions 9e671a13dStoshii * are met: 10e671a13dStoshii * 1. Redistributions of source code must retain the above copyright 11e671a13dStoshii * notice, this list of conditions and the following disclaimer. 12e671a13dStoshii * 2. Redistributions in binary form must reproduce the above copyright 13e671a13dStoshii * notice, this list of conditions and the following disclaimer in the 14e671a13dStoshii * documentation and/or other materials provided with the distribution. 15e671a13dStoshii * 3. All advertising materials mentioning features or use of this software 16e671a13dStoshii * must display the following acknowledgement: 17e671a13dStoshii * This product includes software developed by the PocketBSD project 18e671a13dStoshii * and its contributors. 19e671a13dStoshii * 4. Neither the name of the project nor the names of its contributors 20e671a13dStoshii * may be used to endorse or promote products derived from this software 21e671a13dStoshii * without specific prior written permission. 22e671a13dStoshii * 23d6a89fc1Speter * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 24e671a13dStoshii * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25e671a13dStoshii * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26d6a89fc1Speter * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 27e671a13dStoshii * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28e671a13dStoshii * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29e671a13dStoshii * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30e671a13dStoshii * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31e671a13dStoshii * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32e671a13dStoshii * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33e671a13dStoshii * SUCH DAMAGE. 34e671a13dStoshii */ 35e671a13dStoshii 36e671a13dStoshii #include <dev/hpc/hpcfbio.h> 37e671a13dStoshii 38e671a13dStoshii struct sed1356_softc { 39*4c494f76Srjs device_t sc_dev; 40e671a13dStoshii bus_space_tag_t sc_iot; 41e671a13dStoshii bus_space_handle_t sc_regh; 42e671a13dStoshii struct sa11x0_softc *sc_parent; 43e671a13dStoshii 44e671a13dStoshii struct hpcfb_fbconf sc_fbconf; 45e671a13dStoshii struct hpcfb_dspconf sc_dspconf; 46e671a13dStoshii 47e671a13dStoshii void *sc_powerhook; /* power management hook */ 48e671a13dStoshii int sc_powerstate; 49e671a13dStoshii #define PWRSTAT_SUSPEND (1<<0) 50e671a13dStoshii #define PWRSTAT_VIDEOOFF (1<<1) 51e671a13dStoshii #define PWRSTAT_LCD (1<<2) 52e671a13dStoshii #define PWRSTAT_BACKLIGHT (1<<3) 53e671a13dStoshii #define PWRSTAT_ALL (0xffffffff) 54e671a13dStoshii int sc_lcd_inited; 55e671a13dStoshii #define BACKLIGHT_INITED (1<<0) 56e671a13dStoshii #define BRIGHTNESS_INITED (1<<1) 57e671a13dStoshii #define CONTRAST_INITED (1<<2) 58e671a13dStoshii int sc_brightness; 59e671a13dStoshii int sc_brightness_save; 60e671a13dStoshii int sc_max_brightness; 61e671a13dStoshii int sc_contrast; 62e671a13dStoshii int sc_max_contrast; 63e671a13dStoshii 64e671a13dStoshii }; 65e671a13dStoshii 66e671a13dStoshii void sed1356_init_brightness(struct sed1356_softc *, int); 67e671a13dStoshii void sed1356_init_contrast(struct sed1356_softc *, int); 68547e1f66Speter void sed1356_toggle_lcdlight(void); 69