---
name: "pci_set_power_state"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/pci_set_power_state"
---

# pci\_set\_power\_state(9)

Set the power state of a PCI device

## NAME

pci\_set\_power\_state - Set the power state of a PCI device

## SYNOPSIS

**int pci\_set\_power\_state(struct pci\_dev \*** *dev***, pci\_power\_t** *state***);**

## ARGUMENTS

*dev*

PCI device to handle.

*state*

PCI power state (D0, D1, D2, D3hot) to put the device into.

## DESCRIPTION

Transition a device to a new power state, using the platform firmware and/or the device's PCI PM registers.

RETURN VALUE: -EINVAL if the requested state is invalid. -EIO if device does not support PCI PM or its PM capabilities register has a wrong version, or device doesn't support the requested state. 0 if device already is in the requested state. 0 if device's power state has been successfully changed.

## COPYRIGHT
