Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) /**************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2)  * Copyright (c) 2009-2011, Intel Corporation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3)  * All Rights Reserved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5)  * Permission is hereby granted, free of charge, to any person obtaining a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6)  * copy of this software and associated documentation files (the "Software"),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7)  * to deal in the Software without restriction, including without limitation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8)  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9)  * and/or sell copies of the Software, and to permit persons to whom the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)  * Software is furnished to do so, subject to the following conditions:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)  * The above copyright notice and this permission notice (including the next
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)  * paragraph) shall be included in all copies or substantial portions of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)  * Software.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)  * SOFTWARE.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)  * Authors:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)  *    Benjamin Defnet <benjamin.r.defnet@intel.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)  *    Rajesh Poornachandran <rajesh.poornachandran@intel.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)  * Massively reworked
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)  *    Alan Cox <alan@linux.intel.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) #ifndef _PSB_POWERMGMT_H_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) #define _PSB_POWERMGMT_H_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) #include <linux/pci.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) struct device;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) struct drm_device;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) void gma_power_init(struct drm_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) void gma_power_uninit(struct drm_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)  * The kernel bus power management  will call these functions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) int gma_power_suspend(struct device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) int gma_power_resume(struct device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) int gma_power_thaw(struct device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) int gma_power_freeze(struct device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) int gma_power_restore(struct device *_dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51)  * These are the functions the driver should use to wrap all hw access
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52)  * (i.e. register reads and writes)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) bool gma_power_begin(struct drm_device *dev, bool force);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) void gma_power_end(struct drm_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58)  * Use this function to do an instantaneous check for if the hw is on.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59)  * Only use this in cases where you know the mutex is already held such
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60)  * as in irq install/uninstall and you need to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61)  * prevent a deadlock situation.  Otherwise use gma_power_begin().
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) bool gma_power_is_on(struct drm_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66)  * GFX-Runtime PM callbacks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) int psb_runtime_suspend(struct device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) int psb_runtime_resume(struct device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) int psb_runtime_idle(struct device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) #endif /*_PSB_POWERMGMT_H_*/