From: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
To: linux-leds@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Cc: mpe@ellerman.id.au, j.anaszewski@samsung.com,
stewart@linux.vnet.ibm.com, j.anaszewski81@gmail.com,
arnd@arndb.de, cooloney@gmail.com, rpurdie@rpsys.net,
khandual@linux.vnet.ibm.com, benh@kernel.crashing.org,
Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Subject: [PATCH v10 2/3] powerpc/powernv: Create LED platform device
Date: Wed, 19 Aug 2015 22:19:53 +0530 [thread overview]
Message-ID: <1440002994-25662-3-git-send-email-hegdevasant@linux.vnet.ibm.com> (raw)
In-Reply-To: <1440002994-25662-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
next prev parent reply other threads:[~2015-08-19 16:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-19 16:49 [PATCH v10 0/3] LED driver for PowerNV platform Vasant Hegde
2015-08-19 16:49 ` [PATCH v10 1/3] powerpc/powernv: Add OPAL interfaces for accessing and modifying system LED states Vasant Hegde
2015-08-20 8:38 ` [v10, " Michael Ellerman
2015-08-19 16:49 ` Vasant Hegde [this message]
2015-08-20 8:38 ` [v10,2/3] powerpc/powernv: Create LED platform device Michael Ellerman
2015-08-19 16:49 ` [PATCH v10 3/3] leds/powernv: Add driver for PowerNV platform Vasant Hegde
2015-08-20 8:38 ` [v10,3/3] " Michael Ellerman
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=1440002994-25662-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).