via_vt1632.h revision 963d66ac
1/* 2 * Copyright 2014 SHS SERVICES GmbH 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sub license, 8 * and/or sell copies of the Software, and to permit persons to whom the 9 * Software is furnished to do so, subject to the following conditions: 10 * 11 * The above copyright notice and this permission notice (including the 12 * next paragraph) shall be included in all copies or substantial portions 13 * of the Software. 14 * 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 * DEALINGS IN THE SOFTWARE. 22 */ 23 24#ifndef _VIA_VT1632_H_ 25#define _VIA_VT1632_H_ 1 26 27#define VIA_VT1632_VEN 0x20 28#define VIA_VT1632_HEN 0x10 29#define VIA_VT1632_DSEL 0x08 30#define VIA_VT1632_BSEL 0x04 31#define VIA_VT1632_EDGE 0x02 32#define VIA_VT1632_PDB 0x01 33 34struct ViaVT1632PrivateData { 35 I2CDevPtr VT1632I2CDev; 36 37 int DotclockMin; 38 int DotclockMax; 39 CARD8 Register08; 40 CARD8 Register09; 41 CARD8 Register0A; 42 CARD8 Register0C; 43}; 44 45void via_vt1632_power(xf86OutputPtr output, BOOL on); 46void via_vt1632_save(xf86OutputPtr output); 47void via_vt1632_restore(xf86OutputPtr output); 48int via_vt1632_mode_valid(xf86OutputPtr output, DisplayModePtr pMode); 49void via_vt1632_mode_set(xf86OutputPtr output, DisplayModePtr mode, DisplayModePtr adjusted_mode); 50xf86OutputStatus via_vt1632_detect(xf86OutputPtr output); 51BOOL via_vt1632_probe(ScrnInfoPtr pScrn, I2CDevPtr pDev); 52struct ViaVT1632PrivateData * via_vt1632_init(ScrnInfoPtr pScrn, I2CDevPtr pDev); 53 54#endif /* _VIA_VT1632_H_ */ 55