All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Cc: stewart@linux.vnet.ibm.com, j.anaszewski81@gmail.com,
	cooloney@gmail.com, rpurdie@rpsys.net,
	linuxppc-dev@lists.ozlabs.org, linux-leds@vger.kernel.org,
	khandual@linux.vnet.ibm.com
Subject: Re: [PATCH v4 2/3] powerpc/powernv: Create LED platform device
Date: Thu, 25 Jun 2015 11:05:00 +1000	[thread overview]
Message-ID: <1435194300.3790.28.camel@kernel.crashing.org> (raw)
In-Reply-To: <20150428100958.26912.78396.stgit@localhost.localdomain>

On Tue, 2015-04-28 at 15:40 +0530, Vasant Hegde wrote:
> This patch adds paltform 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 2241565..b1951aa 100644
> --- a/arch/powerpc/platforms/powernv/opal.c
> +++ b/arch/powerpc/platforms/powernv/opal.c
> @@ -784,7 +784,7 @@ static void opal_init_heartbeat(void)
>  
>  static int __init opal_init(void)
>  {
> -	struct device_node *np, *consoles;
> +	struct device_node *np, *consoles, *led;
>  	int rc;
>  
>  	opal_node = of_find_node_by_path("/ibm,opal");
> @@ -813,6 +813,13 @@ static int __init opal_init(void)
>  	/* Setup a heatbeat thread if requested by OPAL */
>  	opal_init_heartbeat();
>  
> +	/* Create led platform devices */
> +	led = of_find_node_by_path("/ibm,opal/led");
> +	if (led) {
> +		of_platform_device_create(led, "opal_led", NULL);
> +		of_node_put(led);
> +	}
> +
>  	/* Find all OPAL interrupts and request them */
>  	opal_irq_init(opal_node);
>  
> @@ -970,3 +977,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);


_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, linux-leds@vger.kernel.org,
	stewart@linux.vnet.ibm.com, j.anaszewski81@gmail.com,
	cooloney@gmail.com, rpurdie@rpsys.net, mpe@ellerman.id.au,
	khandual@linux.vnet.ibm.com
Subject: Re: [PATCH v4 2/3] powerpc/powernv: Create LED platform device
Date: Thu, 25 Jun 2015 11:05:00 +1000	[thread overview]
Message-ID: <1435194300.3790.28.camel@kernel.crashing.org> (raw)
In-Reply-To: <20150428100958.26912.78396.stgit@localhost.localdomain>

On Tue, 2015-04-28 at 15:40 +0530, Vasant Hegde wrote:
> This patch adds paltform 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 2241565..b1951aa 100644
> --- a/arch/powerpc/platforms/powernv/opal.c
> +++ b/arch/powerpc/platforms/powernv/opal.c
> @@ -784,7 +784,7 @@ static void opal_init_heartbeat(void)
>  
>  static int __init opal_init(void)
>  {
> -	struct device_node *np, *consoles;
> +	struct device_node *np, *consoles, *led;
>  	int rc;
>  
>  	opal_node = of_find_node_by_path("/ibm,opal");
> @@ -813,6 +813,13 @@ static int __init opal_init(void)
>  	/* Setup a heatbeat thread if requested by OPAL */
>  	opal_init_heartbeat();
>  
> +	/* Create led platform devices */
> +	led = of_find_node_by_path("/ibm,opal/led");
> +	if (led) {
> +		of_platform_device_create(led, "opal_led", NULL);
> +		of_node_put(led);
> +	}
> +
>  	/* Find all OPAL interrupts and request them */
>  	opal_irq_init(opal_node);
>  
> @@ -970,3 +977,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);

  reply	other threads:[~2015-06-25  1:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-28 10:09 [PATCH v4 0/3] LED interface for PowerNV platform Vasant Hegde
2015-04-28 10:09 ` Vasant Hegde
2015-04-28 10:09 ` [PATCH v4 1/3] powerpc/powernv: Add OPAL interfaces for accessing and modifying system LED states Vasant Hegde
2015-04-28 10:09   ` Vasant Hegde
2015-06-25  1:04   ` Benjamin Herrenschmidt
2015-04-28 10:10 ` [PATCH v4 2/3] powerpc/powernv: Create LED platform device Vasant Hegde
2015-04-28 10:10   ` Vasant Hegde
2015-06-25  1:05   ` Benjamin Herrenschmidt [this message]
2015-06-25  1:05     ` Benjamin Herrenschmidt
2015-04-28 10:10 ` [PATCH v4 3/3] leds/powernv: Add driver for PowerNV platform Vasant Hegde
2015-04-28 10:10   ` Vasant Hegde
2015-04-28 10:18   ` Arnd Bergmann
2015-04-28 10:18     ` Arnd Bergmann
2015-04-30 15:04     ` Vasant Hegde
2015-04-30 15:04       ` Vasant Hegde
2015-04-30 14:29   ` Jacek Anaszewski
2015-04-30 14:29     ` Jacek Anaszewski
2015-04-30 15:08     ` Vasant Hegde
2015-04-30 15:08       ` Vasant Hegde
2015-06-25  1:09   ` Benjamin Herrenschmidt
2015-06-26  5:17     ` Vasant Hegde
2015-06-11  6:33 ` [PATCH v4 0/3] LED interface " Vasant Hegde
2015-06-22  8:03   ` Jacek Anaszewski

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=1435194300.3790.28.camel@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=cooloney@gmail.com \
    --cc=hegdevasant@linux.vnet.ibm.com \
    --cc=j.anaszewski81@gmail.com \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --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.