All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Miguel Botón" <mboton.lkml@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com, mb@bu3sch.de
Subject: [PATCH 1/2] ssb: add 'ssb_pcihost_set_power_state' function
Date: Tue, 1 Jan 2008 01:16:46 +0100	[thread overview]
Message-ID: <200801010116.46190.mboton@gmail.com> (raw)

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

Signed-off-by: Miguel Bot=C3=B3n <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 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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: "Miguel Botón" <mboton.lkml@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com, mb@bu3sch.de
Subject: [PATCH 1/2] ssb: add 'ssb_pcihost_set_power_state' function
Date: Tue, 1 Jan 2008 01:16:46 +0100	[thread overview]
Message-ID: <200801010116.46190.mboton@gmail.com> (raw)

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

             reply	other threads:[~2008-01-01  0:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-01  0:16 Miguel Botón [this message]
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
2008-01-01  0:50   ` Michael Buesch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200801010116.46190.mboton@gmail.com \
    --to=mboton.lkml@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mb@bu3sch.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.