I need to phisically power off my PCI device in linux. I have find the functions I need, but it seems to write a kernel mode application to use that library, because I have find it in kernel headers.
I have found this function int pci_set_power_state(struct pci_dev *dev, pci_power_t state) in drivers/pci/pci.c and I don't know how to use it.
Also, I've read in documentation, that device driver in general is not used to switch device to d3cold, because the device simply switches off and don't work at all (yes, there are some devices, that can be switched off not completely, and are able to send a wake up call, but this is another story...) and I think, that I need to communicate with PCI bus.
I don't know where to look for an answer, please guide my quest.