public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ssb: add 'ssb_pcihost_set_power_state' function
@ 2008-01-01  0:16 Miguel Botón
  2008-01-01  0:50 ` Michael Buesch
  0 siblings, 1 reply; 2+ messages in thread
From: Miguel Botón @ 2008-01-01  0:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-wireless, linville, mb

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). 

Signed-off-by: Miguel Botón <mboton@gmail.com>

diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h
index a21ab29..aa70fd0 100644
--- a/include/linux/ssb/ssb.h
+++ b/include/linux/ssb/ssb.h
@@ -349,6 +349,13 @@ static inline void ssb_pcihost_unregister(struct pci_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 == SSB_BUSTYPE_PCI)
+		pci_set_power_state(sdev->bus->host_pci, state);
+}
 #endif /* CONFIG_SSB_PCIHOST */
 
 

-- 
	Miguel Botón

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2] ssb: add 'ssb_pcihost_set_power_state' function
  2008-01-01  0:16 [PATCH 1/2] ssb: add 'ssb_pcihost_set_power_state' function Miguel Botón
@ 2008-01-01  0:50 ` Michael Buesch
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Buesch @ 2008-01-01  0:50 UTC (permalink / raw)
  To: Miguel Botón; +Cc: linux-kernel, linux-wireless, linville

On Tuesday 01 January 2008 01:16:46 Miguel Botón wrote:
> 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). 
> 
> Signed-off-by: Miguel Botón <mboton@gmail.com>

Acked-by: Michael Buesch <mb@bu3sch.de>

> 
> diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h
> index a21ab29..aa70fd0 100644
> --- a/include/linux/ssb/ssb.h
> +++ b/include/linux/ssb/ssb.h
> @@ -349,6 +349,13 @@ static inline void ssb_pcihost_unregister(struct pci_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 == SSB_BUSTYPE_PCI)
> +		pci_set_power_state(sdev->bus->host_pci, state);
> +}
>  #endif /* CONFIG_SSB_PCIHOST */
>  
>  
> 



-- 
Greetings Michael.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-01-01  0:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-01  0:16 [PATCH 1/2] ssb: add 'ssb_pcihost_set_power_state' function Miguel Botón
2008-01-01  0:50 ` Michael Buesch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox