ssb: add 'ssb_pcihost_set_power_state' function
PATCH 1/2 ssb: add 'ssb_pcihost_set_power_state' function
This patch adds the 'ssb_pcihost_set_power_state' function.
This function allows us to set the power state of a PCI device (for example b44 ethernet device).=20
include/linux/ssb/ssb.h +0 -0
@@ -349,6 +349,13 @@ static inline void ssb_pcihost_unregister(struct p=
ci_driver *driver)
{
pci_unregister_driver(driver);
}
+
+static inline
+void ssb_pcihost_set_power_state(struct ssb_device *sdev, pci_power_t = state)
+{
+ if (sdev->bus->bustype =3D=3D SSB_BUSTYPE_PCI)
+ pci_set_power_state(sdev->bus->host_pci, state);
+}
#endif /* CONFIG_SSB_PCIHOST */
=20
=20
--=20
Miguel Bot=C3=B3n
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles= s" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 6 lines · On Tuesday 01 January 2008 01:16:46 Miguel Bot=C3=B3n wrote:
This patch adds the '
ssb_pcihost_set_power_state' function. =20
This function allows us to set the power state of a PCI device (for example b44 ethernet device).=20
=20Signed-off-by Miguel Bot=C3=B3n <[email protected]>
include/linux/ssb/ssb.h static inline void ssb_pcihost_unregister(struct=
Quoted 6 lines
=20
include/linux/ssb/ssb.h +0
-0@@ -349,6 +349,13 @@ static inline void ssb_pcihost_unregister(struct=
pci_driver *driver)
include/linux/ssb/ssb.h static inline void ssb_pcihost_unregister(struct= · line 354
Quoted 6 lines
include/linux/ssb/ssb.h +3
-0{pci_unregister_driver (driver); } + +static inline +void ssb_pcihost_set_power_state(struct ssb_device *sdev, pci_power_=
t state)
Quoted 8 lines
include/linux/ssb/ssb.h +4
-0+{ + if (sdev->bus->bustype =3D=3D SSB_BUSTYPE_PCI) +pci_set_power_state (sdev->bus->host_pci, state); +}#endif /* CONFIG_SSB_PCIHOST */ =20
=20
=20
--=20
Greetings Michael.
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles= s" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html