1*15cbc832Sriastradh /* $NetBSD: pm.h,v 1.5 2018/08/27 06:07:20 riastradh Exp $ */ 22adb3a73Sriastradh 32adb3a73Sriastradh /*- 42adb3a73Sriastradh * Copyright (c) 2013 The NetBSD Foundation, Inc. 52adb3a73Sriastradh * All rights reserved. 62adb3a73Sriastradh * 72adb3a73Sriastradh * This code is derived from software contributed to The NetBSD Foundation 82adb3a73Sriastradh * by Taylor R. Campbell. 92adb3a73Sriastradh * 102adb3a73Sriastradh * Redistribution and use in source and binary forms, with or without 112adb3a73Sriastradh * modification, are permitted provided that the following conditions 122adb3a73Sriastradh * are met: 132adb3a73Sriastradh * 1. Redistributions of source code must retain the above copyright 142adb3a73Sriastradh * notice, this list of conditions and the following disclaimer. 152adb3a73Sriastradh * 2. Redistributions in binary form must reproduce the above copyright 162adb3a73Sriastradh * notice, this list of conditions and the following disclaimer in the 172adb3a73Sriastradh * documentation and/or other materials provided with the distribution. 182adb3a73Sriastradh * 192adb3a73Sriastradh * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 202adb3a73Sriastradh * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 212adb3a73Sriastradh * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 222adb3a73Sriastradh * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 232adb3a73Sriastradh * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 242adb3a73Sriastradh * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 252adb3a73Sriastradh * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 262adb3a73Sriastradh * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 272adb3a73Sriastradh * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 282adb3a73Sriastradh * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 292adb3a73Sriastradh * POSSIBILITY OF SUCH DAMAGE. 302adb3a73Sriastradh */ 312adb3a73Sriastradh 322adb3a73Sriastradh #ifndef _LINUX_PM_H_ 332adb3a73Sriastradh #define _LINUX_PM_H_ 342adb3a73Sriastradh 352adb3a73Sriastradh /* Silly stub for i915_suspend. */ 362adb3a73Sriastradh 372adb3a73Sriastradh typedef struct { 382adb3a73Sriastradh int event; 392adb3a73Sriastradh } pm_message_t; 402adb3a73Sriastradh 412adb3a73Sriastradh #define PM_EVENT_PRETHAW 0 422adb3a73Sriastradh #define PM_EVENT_SUSPEND 1 43*15cbc832Sriastradh #define PM_EVENT_FREEZE 2 442adb3a73Sriastradh 457b7df45fSriastradh struct dev_pm_domain { 467b7df45fSriastradh char dummy; /* XXX */ 477b7df45fSriastradh }; 487b7df45fSriastradh 49acb4c781Sriastradh struct dev_pm_ops { 50acb4c781Sriastradh int (*resume)(struct device *); 51*15cbc832Sriastradh int (*resume_early)(struct device *); 52*15cbc832Sriastradh int (*suspend)(struct device *); 53*15cbc832Sriastradh int (*suspend_late)(struct device *); 54*15cbc832Sriastradh int (*freeze)(struct device *); 55*15cbc832Sriastradh int (*freeze_late)(struct device *); 56*15cbc832Sriastradh int (*thaw_early)(struct device *); 57*15cbc832Sriastradh int (*thaw)(struct device *); 58*15cbc832Sriastradh int (*poweroff)(struct device *); 59*15cbc832Sriastradh int (*poweroff_late)(struct device *); 60*15cbc832Sriastradh int (*restore_early)(struct device *); 61*15cbc832Sriastradh int (*restore)(struct device *); 62*15cbc832Sriastradh int (*runtime_suspend)(struct device *); 63*15cbc832Sriastradh int (*runtime_resume)(struct device *); 64acb4c781Sriastradh }; 65acb4c781Sriastradh 662adb3a73Sriastradh #endif /* _LINUX_PM_H_ */ 67