All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
To: linux-leds@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	j.anaszewski@samsung.com
Cc: rpurdie@rpsys.net, cooloney@gmail.com,
	khandual@linux.vnet.ibm.com, j.anaszewski81@gmail.com,
	arnd@arndb.de, stewart@linux.vnet.ibm.com, mpe@ellerman.id.au,
	benh@kernel.crashing.org,
	Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Subject: [PATCH v8 2/3] powerpc/powernv: Create LED platform device
Date: Sat, 25 Jul 2015 10:51:09 +0530	[thread overview]
Message-ID: <1437801670-23705-3-git-send-email-hegdevasant@linux.vnet.ibm.com> (raw)
In-Reply-To: <1437801670-23705-1-git-send-email-hegdevasant@linux.vnet.ibm.com>

This patch adds platform devices for leds. Also export LED related
OPAL API's so that led driver can use these APIs.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/platforms/powernv/opal.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index f084afa..6839358 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -648,7 +648,7 @@ static void opal_init_heartbeat(void)
 
 static int __init opal_init(void)
 {
-	struct device_node *np, *consoles;
+	struct device_node *np, *consoles, *leds;
 	int rc;
 
 	opal_node = of_find_node_by_path("/ibm,opal");
@@ -689,6 +689,13 @@ static int __init opal_init(void)
 	/* Setup a heatbeat thread if requested by OPAL */
 	opal_init_heartbeat();
 
+	/* Create leds platform devices */
+	leds = of_find_node_by_path("/ibm,opal/leds");
+	if (leds) {
+		of_platform_device_create(leds, "opal_leds", NULL);
+		of_node_put(leds);
+	}
+
 	/* Create "opal" kobject under /sys/firmware */
 	rc = opal_sysfs_init();
 	if (rc == 0) {
@@ -841,3 +848,6 @@ EXPORT_SYMBOL_GPL(opal_rtc_write);
 EXPORT_SYMBOL_GPL(opal_tpo_read);
 EXPORT_SYMBOL_GPL(opal_tpo_write);
 EXPORT_SYMBOL_GPL(opal_i2c_request);
+/* Export these symbols for PowerNV LED class driver */
+EXPORT_SYMBOL_GPL(opal_leds_get_ind);
+EXPORT_SYMBOL_GPL(opal_leds_set_ind);
-- 
2.1.0

  parent reply	other threads:[~2015-07-25  5:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-25  5:21 [PATCH v8 0/3] LED driver for PowerNV platform Vasant Hegde
2015-07-25  5:21 ` [PATCH v8 1/3] powerpc/powernv: Add OPAL interfaces for accessing and modifying system LED states Vasant Hegde
2015-07-25  5:21 ` Vasant Hegde [this message]
2015-07-25  5:21 ` [PATCH v8 3/3] leds/powernv: Add driver for PowerNV platform Vasant Hegde
2015-07-26 21:41   ` Jacek Anaszewski
2015-07-27  3:41     ` Vasant Hegde
2015-07-27  9:50       ` Jacek Anaszewski
2015-07-28 13:40         ` Vasant Hegde
2015-07-28 17:40           ` Jacek Anaszewski
2015-08-19 11:54             ` Jacek Anaszewski
2015-08-19 12:06               ` Vasant Hegde
2015-07-28  6:38       ` Jacek Anaszewski
2015-07-28 10:14         ` Benjamin Herrenschmidt
2015-07-28 11:23           ` Jacek Anaszewski
2015-08-18 10:21   ` [v8,3/3] " Michael Ellerman
2015-08-18 10:21     ` Michael Ellerman
2015-08-19  8:42     ` Vasant Hegde

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=1437801670-23705-3-git-send-email-hegdevasant@linux.vnet.ibm.com \
    --to=hegdevasant@linux.vnet.ibm.com \
    --cc=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=cooloney@gmail.com \
    --cc=j.anaszewski81@gmail.com \
    --cc=j.anaszewski@samsung.com \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=rpurdie@rpsys.net \
    --cc=stewart@linux.vnet.ibm.com \
    /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.