本文整理汇总了C++中pci_save_state函数的典型用法代码示例。如果您正苦于以下问题:C++ pci_save_state函数的具体用法?C++ pci_save_state怎么用?C++ pci_save_state使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pci_save_state函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: vbox_drm_freeze
static int vbox_drm_freeze(struct drm_device *dev)
{
drm_kms_helper_poll_disable(dev);
pci_save_state(dev->pdev);
console_lock();
vbox_fbdev_set_suspend(dev, 1);
console_unlock();
return 0;
}
开发者ID:svn2github,项目名称:virtualbox,代码行数:11,代码来源:vbox_drv.c
示例2: agnx_pci_suspend
static int agnx_pci_suspend(struct pci_dev *pdev, pm_message_t state)
{
struct ieee80211_hw *dev = pci_get_drvdata(pdev);
AGNX_TRACE;
ieee80211_stop_queues(dev);
agnx_stop(dev);
pci_save_state(pdev);
pci_set_power_state(pdev, pci_choose_state(pdev, state));
return 0;
}
开发者ID:AppEngine,项目名称:linux-2.6,代码行数:12,代码来源:pci.c
示例3: vbox_drm_freeze
static int vbox_drm_freeze(struct drm_device *dev)
{
struct vbox_private *vbox = dev->dev_private;
drm_kms_helper_poll_disable(dev);
pci_save_state(dev->pdev);
drm_fb_helper_set_suspend_unlocked(&vbox->fbdev->helper, true);
return 0;
}
开发者ID:mdamt,项目名称:linux,代码行数:12,代码来源:vbox_drv.c
示例4: cs5520_pci_device_suspend
static int cs5520_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
{
struct ata_host *host = pci_get_drvdata(pdev);
int rc = 0;
rc = ata_host_suspend(host, mesg);
if (rc)
return rc;
pci_save_state(pdev);
return 0;
}
开发者ID:7799,项目名称:linux,代码行数:12,代码来源:pata_cs5520.c
示例5: snd_vx222_suspend
static int snd_vx222_suspend(struct pci_dev *pci, pm_message_t state)
{
struct snd_card *card = pci_get_drvdata(pci);
struct snd_vx222 *vx = card->private_data;
int err;
err = snd_vx_suspend(&vx->core, state);
pci_disable_device(pci);
pci_save_state(pci);
pci_set_power_state(pci, pci_choose_state(pci, state));
return err;
}
开发者ID:12rafael,项目名称:jellytimekernel,代码行数:12,代码来源:vx222.c
示例6: cnss_wlan_unregister_driver
void cnss_wlan_unregister_driver(struct cnss_wlan_driver *driver)
{
struct cnss_wlan_driver *wdrv;
struct cnss_wlan_vreg_info *vreg_info;
struct cnss_wlan_gpio_info *gpio_info;
struct pci_dev *pdev;
if (!penv)
return;
wdrv = penv->driver;
vreg_info = &penv->vreg_info;
gpio_info = &penv->gpio_info;
pdev = penv->pdev;
if (!wdrv) {
pr_err("driver not registered\n");
return;
}
if (penv->bus_client)
msm_bus_scale_client_update_request(penv->bus_client, 0);
if (!pdev) {
pr_err("%d: invalid pdev\n", __LINE__);
goto cut_power;
}
if (wdrv->remove)
wdrv->remove(pdev);
if (penv->pcie_link_state) {
pci_save_state(pdev);
penv->saved_state = pci_store_saved_state(pdev);
if (msm_pcie_pm_control(MSM_PCIE_SUSPEND,
cnss_get_pci_dev_bus_number(pdev),
NULL, NULL, PM_OPTIONS)) {
pr_debug("Failed to shutdown PCIe link\n");
return;
}
penv->pcie_link_state = PCIE_LINK_DOWN;
}
cut_power:
penv->driver = NULL;
cnss_wlan_gpio_set(gpio_info, WLAN_EN_LOW);
if (cnss_wlan_vreg_set(vreg_info, VREG_OFF))
pr_err("wlan vreg OFF failed\n");
}
开发者ID:rbheromax,项目名称:android_kernel_lge_dory,代码行数:52,代码来源:cnss.c
示例7: pch_suspend
static s32 pch_suspend(struct pci_dev *pdev, pm_message_t state)
{
pci_disable_device(pdev);
pci_enable_wake(pdev, PCI_D3hot, 0);
if (pci_save_state(pdev) != 0) {
dev_err(&pdev->dev, "could not save PCI config state\n");
return -ENOMEM;
}
pci_set_power_state(pdev, pci_choose_state(pdev, state));
return 0;
}
开发者ID:openube,项目名称:android_kernel_sony_c2305,代码行数:13,代码来源:ptp_pch.c
示例8: spi_suspend
static int spi_suspend(struct pci_dev *pdev, pm_message_t state)
{
struct dw_spi_pci *dwpci = pci_get_drvdata(pdev);
int ret;
ret = dw_spi_suspend_host(&dwpci->dws);
if (ret)
return ret;
pci_save_state(pdev);
pci_disable_device(pdev);
pci_set_power_state(pdev, pci_choose_state(pdev, state));
return ret;
}
开发者ID:Scorpio92,项目名称:mstar6a918,代码行数:13,代码来源:spi-dw-pci.c
示例9: adf_dev_restore
void adf_dev_restore(struct adf_accel_dev *accel_dev)
{
struct adf_hw_device_data *hw_device = accel_dev->hw_device;
struct pci_dev *pdev = accel_to_pci_dev(accel_dev);
if (hw_device->reset_device) {
dev_info(&GET_DEV(accel_dev), "Resetting device qat_dev%d\n",
accel_dev->accel_id);
hw_device->reset_device(accel_dev);
pci_restore_state(pdev);
pci_save_state(pdev);
}
}
开发者ID:CCNITSilchar,项目名称:linux,代码行数:13,代码来源:adf_aer.c
示例10: nm256_suspend
/*
* APM event handler, so the card is properly reinitialized after a power
* event.
*/
static int nm256_suspend(struct pci_dev *pci, pm_message_t state)
{
struct snd_card *card = pci_get_drvdata(pci);
struct nm256 *chip = card->private_data;
snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
snd_pcm_suspend_all(chip->pcm);
snd_ac97_suspend(chip->ac97);
chip->coeffs_current = 0;
pci_disable_device(pci);
pci_save_state(pci);
return 0;
}
开发者ID:jameshilliard,项目名称:actiontec_opensrc_mi424wr-rev-e-f_fw-20-10-7-5,代码行数:17,代码来源:nm256.c
示例11: vmw_pci_suspend
static int vmw_pci_suspend(struct pci_dev *pdev, pm_message_t state)
{
struct drm_device *dev = pci_get_drvdata(pdev);
struct vmw_private *dev_priv = vmw_priv(dev);
if (dev_priv->refuse_hibernation)
return -EBUSY;
pci_save_state(pdev);
pci_disable_device(pdev);
pci_set_power_state(pdev, PCI_D3hot);
return 0;
}
开发者ID:AshishNamdev,项目名称:linux,代码行数:13,代码来源:vmwgfx_drv.c
示例12: snd_vx222_suspend
static int snd_vx222_suspend(struct device *dev)
{
struct pci_dev *pci = to_pci_dev(dev);
struct snd_card *card = dev_get_drvdata(dev);
struct snd_vx222 *vx = card->private_data;
int err;
err = snd_vx_suspend(&vx->core);
pci_disable_device(pci);
pci_save_state(pci);
pci_set_power_state(pci, PCI_D3hot);
return err;
}
开发者ID:AD5GB,项目名称:kernel_n5_3.10-experimental,代码行数:13,代码来源:vx222.c
示例13: rt2860_suspend
static int rt2860_suspend(struct pci_dev *pci_dev, pm_message_t state)
{
struct net_device *net_dev = pci_get_drvdata(pci_dev);
struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)NULL;
int retval = 0;
DBGPRINT(RT_DEBUG_TRACE, ("===> rt2860_suspend()\n"));
if (net_dev == NULL) {
DBGPRINT(RT_DEBUG_ERROR, ("net_dev == NULL!\n"));
} else {
GET_PAD_FROM_NET_DEV(pAd, net_dev);
/* we can not use IFF_UP because ra0 down but ra1 up */
/* and 1 suspend/resume function for 1 module, not for each interface */
/* so Linux will call suspend/resume function once */
if (VIRTUAL_IF_NUM(pAd) > 0) {
/* avoid users do suspend after interface is down */
/* stop interface */
netif_carrier_off(net_dev);
netif_stop_queue(net_dev);
/* mark device as removed from system and therefore no longer available */
netif_device_detach(net_dev);
/* mark halt flag */
RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_HALT_IN_PROGRESS);
RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_RADIO_OFF);
/* take down the device */
rt28xx_close((struct net_device *)net_dev);
RT_MOD_DEC_USE_COUNT();
}
}
/* reference to http://vovo2000.com/type-lab/linux/kernel-api/linux-kernel-api.html */
/* enable device to generate PME# when suspended */
/* pci_choose_state(): Choose the power state of a PCI device to be suspended */
retval = pci_enable_wake(pci_dev, pci_choose_state(pci_dev, state), 1);
/* save the PCI configuration space of a device before suspending */
pci_save_state(pci_dev);
/* disable PCI device after use */
pci_disable_device(pci_dev);
retval = pci_set_power_state(pci_dev, pci_choose_state(pci_dev, state));
DBGPRINT(RT_DEBUG_TRACE, ("<=== rt2860_suspend()\n"));
return retval;
}
开发者ID:A2109devs,项目名称:lenovo_a2109a_kernel,代码行数:51,代码来源:pci_main_dev.c
示例14: test_save_state
/*
* test_save_state
* make call to pci_save_state, takes in a u32*
* buffer
*/
static int test_save_state(void)
{
struct pci_dev *dev = ltp_pci.dev;
prk_info("save state");
if (pci_save_state(dev)) {
prk_err("failed save state");
return TFAIL;
}
prk_info("saved state of device");
return TPASS;
}
开发者ID:1587,项目名称:ltp,代码行数:19,代码来源:ltp_tpci.c
示例15: spi_suspend
static int spi_suspend(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
struct dw_spi_pci *dwpci = pci_get_drvdata(pdev);
int ret;
ret = dw_spi_suspend_host(&dwpci->dws);
if (ret)
return ret;
pci_save_state(pdev);
pci_disable_device(pdev);
pci_set_power_state(pdev, PCI_D3hot);
return ret;
}
开发者ID:ddalex,项目名称:XT890-Kernel-Gamma,代码行数:14,代码来源:spi-dw-pci.c
示例16: ssb_pcihost_suspend
static int ssb_pcihost_suspend(struct pci_dev *dev, pm_message_t state)
{
struct ssb_bus *ssb = pci_get_drvdata(dev);
int err;
err = ssb_bus_suspend(ssb);
if (err)
return err;
pci_save_state(dev);
pci_disable_device(dev);
pci_set_power_state(dev, pci_choose_state(dev, state));
return 0;
}
开发者ID:DirtyDroidX,项目名称:android_kernel_htc_m8ul,代码行数:14,代码来源:pcihost_wrapper.c
示例17: p54p_suspend
static int p54p_suspend(struct pci_dev *pdev, pm_message_t state)
{
struct ieee80211_hw *dev = pci_get_drvdata(pdev);
struct p54p_priv *priv = dev->priv;
if (priv->common.mode != NL80211_IFTYPE_UNSPECIFIED) {
ieee80211_stop_queues(dev);
p54p_stop(dev);
}
pci_save_state(pdev);
pci_set_power_state(pdev, pci_choose_state(pdev, state));
return 0;
}
开发者ID:valentil,项目名称:CS-411-Group-13,代码行数:14,代码来源:p54pci.c
示例18: prism2_pci_suspend
static int prism2_pci_suspend(struct pci_dev *pdev, pm_message_t state)
{
struct net_device *dev = pci_get_drvdata(pdev);
if (netif_running(dev)) {
netif_stop_queue(dev);
netif_device_detach(dev);
}
prism2_suspend(dev);
pci_save_state(pdev);
pci_disable_device(pdev);
pci_set_power_state(pdev, PCI_D3hot);
return 0;
}
开发者ID:DirtyDroidX,项目名称:android_kernel_htc_m8ul,代码行数:15,代码来源:hostap_pci.c
示例19: serial_hsu_suspend
static int serial_hsu_suspend(struct pci_dev *pdev, pm_message_t state)
{
void *priv = pci_get_drvdata(pdev);
struct uart_hsu_port *up;
/* Make sure this is not the internal dma controller */
if (priv && (pdev->device != 0x081E)) {
up = priv;
uart_suspend_port(&serial_hsu_reg, &up->port);
}
pci_save_state(pdev);
pci_set_power_state(pdev, pci_choose_state(pdev, state));
return 0;
}
开发者ID:ANFS,项目名称:ANFS-kernel,代码行数:15,代码来源:mfd.c
示例20: vbox_pm_suspend
static int vbox_pm_suspend(struct device *dev)
{
struct vbox_private *vbox = dev_get_drvdata(dev);
int error;
error = drm_mode_config_helper_suspend(&vbox->ddev);
if (error)
return error;
pci_save_state(vbox->ddev.pdev);
pci_disable_device(vbox->ddev.pdev);
pci_set_power_state(vbox->ddev.pdev, PCI_D3hot);
return 0;
}
开发者ID:grate-driver,项目名称:linux,代码行数:15,代码来源:vbox_drv.c
注:本文中的pci_save_state函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论