1bbbb262dSAlan Cox /************************************************************************** 2bbbb262dSAlan Cox * Copyright (c) 2009-2011, Intel Corporation. 3bbbb262dSAlan Cox * All Rights Reserved. 4bbbb262dSAlan Cox 5bbbb262dSAlan Cox * Permission is hereby granted, free of charge, to any person obtaining a 6bbbb262dSAlan Cox * copy of this software and associated documentation files (the "Software"), 7bbbb262dSAlan Cox * to deal in the Software without restriction, including without limitation 8bbbb262dSAlan Cox * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9bbbb262dSAlan Cox * and/or sell copies of the Software, and to permit persons to whom the 10bbbb262dSAlan Cox * Software is furnished to do so, subject to the following conditions: 11bbbb262dSAlan Cox * 12bbbb262dSAlan Cox * The above copyright notice and this permission notice (including the next 13bbbb262dSAlan Cox * paragraph) shall be included in all copies or substantial portions of the 14bbbb262dSAlan Cox * Software. 15bbbb262dSAlan Cox * 16bbbb262dSAlan Cox * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17bbbb262dSAlan Cox * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18bbbb262dSAlan Cox * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19bbbb262dSAlan Cox * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20bbbb262dSAlan Cox * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21bbbb262dSAlan Cox * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22bbbb262dSAlan Cox * SOFTWARE. 23bbbb262dSAlan Cox * 24bbbb262dSAlan Cox * Authors: 25bbbb262dSAlan Cox * Benjamin Defnet <benjamin.r.defnet@intel.com> 26bbbb262dSAlan Cox * Rajesh Poornachandran <rajesh.poornachandran@intel.com> 27bbbb262dSAlan Cox * Massively reworked 28bbbb262dSAlan Cox * Alan Cox <alan@linux.intel.com> 29bbbb262dSAlan Cox */ 30bbbb262dSAlan Cox #ifndef _PSB_POWERMGMT_H_ 31bbbb262dSAlan Cox #define _PSB_POWERMGMT_H_ 32bbbb262dSAlan Cox 33bbbb262dSAlan Cox #include <linux/pci.h> 34*51474335SSam Ravnborg 35*51474335SSam Ravnborg struct device; 36*51474335SSam Ravnborg struct drm_device; 37bbbb262dSAlan Cox 38bbbb262dSAlan Cox void gma_power_init(struct drm_device *dev); 39bbbb262dSAlan Cox void gma_power_uninit(struct drm_device *dev); 40bbbb262dSAlan Cox 41bbbb262dSAlan Cox /* 42bbbb262dSAlan Cox * The kernel bus power management will call these functions 43bbbb262dSAlan Cox */ 44bbbb262dSAlan Cox int gma_power_suspend(struct device *dev); 45bbbb262dSAlan Cox int gma_power_resume(struct device *dev); 46bbbb262dSAlan Cox 47bbbb262dSAlan Cox /* 48bbbb262dSAlan Cox * These are the functions the driver should use to wrap all hw access 49bbbb262dSAlan Cox * (i.e. register reads and writes) 50bbbb262dSAlan Cox */ 51bbbb262dSAlan Cox bool gma_power_begin(struct drm_device *dev, bool force); 52bbbb262dSAlan Cox void gma_power_end(struct drm_device *dev); 53bbbb262dSAlan Cox 54bbbb262dSAlan Cox #endif /*_PSB_POWERMGMT_H_*/ 55