1/******************************************************************************* 2* 3* "cs4281pm-24.h" -- Cirrus Logic-Crystal CS4281 linux audio driver. 4* 5* Copyright (C) 2000,2001 Cirrus Logic Corp. 6* -- tom woller (twoller@crystal.cirrus.com) or 7* (audio@crystal.cirrus.com). 8* 9* This program is free software; you can redistribute it and/or modify 10* it under the terms of the GNU General Public License as published by 11* the Free Software Foundation; either version 2 of the License, or 12* (at your option) any later version. 13* 14* This program is distributed in the hope that it will be useful, 15* but WITHOUT ANY WARRANTY; without even the implied warranty of 16* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17* GNU General Public License for more details. 18* 19* You should have received a copy of the GNU General Public License 20* along with this program; if not, write to the Free Software 21* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22* 23* 2001.04.05 trw - new file. 24* 25*******************************************************************************/ 26#ifndef NOT_CS4281_PM 27#include <linux/pm.h> 28#include <linux/config.h> 29#include "cs4281pm.h" 30 31//#define CS4281_PCI_PM_SUPPORT_ENABLE 1 32#if CS4281_PCI_PM_SUPPORT_ENABLE 33#define cs_pm_register(a, b, c) 0; 34#define cs_pm_unregister_all(a) 35/* 36* for now (12/22/00) only enable the pm_register PM support. 37* allow these table entries to be null. 38*/ 39#define CS4281_SUSPEND_TBL cs4281_suspend_tbl 40#define CS4281_RESUME_TBL cs4281_resume_tbl 41#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,12) 42static int cs4281_suspend_tbl(struct pci_dev *pcidev, u32 unused); 43static int cs4281_resume_tbl(struct pci_dev *pcidev); 44#else 45void cs4281_suspend_tbl(struct pci_dev *pcidev); 46void cs4281_resume_tbl(struct pci_dev *pcidev); 47#endif //LINUX_VERSION 48#else //CS4281_PCI_PM_SUPPORT_ENABLE 49#ifdef CONFIG_PM 50int cs4281_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data); 51#define cs_pm_register(a, b, c) pm_register((a), (b), (c)); 52#define cs_pm_unregister_all(a) pm_unregister_all((a)); 53#define CS4281_SUSPEND_TBL cs4281_null_suspend 54#define CS4281_RESUME_TBL cs4281_null_resume 55#else 56#define cs_pm_register(a, b, c) 0; 57#define cs_pm_unregister_all(a) 58#define CS4281_SUSPEND_TBL cs4281_null_suspend 59#define CS4281_RESUME_TBL cs4281_null_resume 60#endif //CONFIG_PM 61#endif //CS4281_PCI_PM_SUPPORT_ENABLE 62#else 63#define cs_pm_register(a, b, c) 0; 64#define cs_pm_unregister_all(a) 65#define CS4281_SUSPEND_TBL cs4281_null_suspend 66#define CS4281_RESUME_TBL cs4281_null_resume 67#endif //NOT_CS4281_PM 68