linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: arun.murthy@stericsson.com (Arun Murthy)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/7] backlight:pwm: add an element 'name' to platform data
Date: Tue, 28 Sep 2010 13:10:43 +0530	[thread overview]
Message-ID: <1285659648-21409-3-git-send-email-arun.murthy@stericsson.com> (raw)
In-Reply-To: <1285659648-21409-1-git-send-email-arun.murthy@stericsson.com>

A new element 'name' is added to pwm backlight platform data structure.
This is required to identify the pwm device.

Signed-off-by: Arun Murthy <arun.murthy@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
---
 drivers/video/backlight/pwm_bl.c |    4 +++-
 include/linux/pwm_backlight.h    |    1 +
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index 5504435..b0978a8 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -94,7 +94,9 @@ static int pwm_backlight_probe(struct platform_device *pdev)
 	pb->notify = data->notify;
 	pb->dev = &pdev->dev;
 
-	pb->pwm = pwm_request(data->pwm_id, "backlight");
+	if (!data->name)
+		data->name = "backlight";
+	pb->pwm = pwm_request(data->pwm_id, data->name);
 	if (IS_ERR(pb->pwm)) {
 		dev_err(&pdev->dev, "unable to request PWM for backlight\n");
 		ret = PTR_ERR(pb->pwm);
diff --git a/include/linux/pwm_backlight.h b/include/linux/pwm_backlight.h
index 01b3d75..c2ce8f8 100644
--- a/include/linux/pwm_backlight.h
+++ b/include/linux/pwm_backlight.h
@@ -6,6 +6,7 @@
 
 struct platform_pwm_backlight_data {
 	int pwm_id;
+	char *name;
 	unsigned int max_brightness;
 	unsigned int dft_brightness;
 	unsigned int pwm_period_ns;
-- 
1.7.2.dirty

  parent reply	other threads:[~2010-09-28  7:40 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-28  7:40 [PATCHv2 0/7] PWM core driver for pwm based led and backlight driver Arun Murthy
2010-09-28  7:40 ` [PATCH 1/7] pwm: Add pwm core driver Arun Murthy
2010-09-28  8:14   ` Vasily Khoruzhick
     [not found]     ` <F45880696056844FA6A73F415B568C69532DC2FA8F@EXDCVYMBSTM006.EQ1STM.local>
2010-09-28  8:47       ` Vasily Khoruzhick
     [not found]       ` <F45880696056844FA6A73F415B568C69532DC2FA8F@EXDCVYMBSTM006.EQ1STM.loca l>
2010-09-28  8:50         ` Hemanth V
     [not found]           ` <F45880696056844FA6A73F415B568C69532DC2FB21@EXDCVYMBSTM006.EQ1STM.local>
     [not found]             ` <F45880696056844FA6A73F415B568C69532DC2FB21@EXDCVYMBSTM006.EQ1STM.loca l>
2010-09-28  9:34               ` Hemanth V
     [not found]                 ` <F45880696056844FA6A73F415B568C69532DC2FBF9@EXDCVYMBSTM006.EQ1STM.local>
     [not found]                   ` <F45880696056844FA6A73F415B568C69532DC2FBF9@EXDCVYMBSTM006.EQ1STM.loca l>
2010-09-28 10:41                     ` Hemanth V
2010-09-28  8:54   ` Lars-Peter Clausen
     [not found]     ` <F45880696056844FA6A73F415B568C69532DC2FB6B@EXDCVYMBSTM006.EQ1STM.local>
2010-09-28  9:57       ` Lars-Peter Clausen
     [not found]         ` <F45880696056844FA6A73F415B568C69532DC2FC60@EXDCVYMBSTM006.EQ1STM.local>
2010-09-28 21:04           ` Lars-Peter Clausen
2010-09-29  4:49             ` Arun MURTHY
2010-09-29 12:12               ` Trilok Soni
2010-10-01  3:25                 ` Arun MURTHY
2010-10-01  6:47                   ` Trilok Soni
2010-10-01  7:25                     ` Arun MURTHY
2010-10-01  7:42                       ` Jassi Brar
2010-10-01  8:46                         ` Arun MURTHY
2010-10-01 10:39                           ` Jassi Brar
2010-10-01 18:00                           ` Mark Brown
2010-10-04  4:22                             ` Arun MURTHY
2010-09-28 17:46   ` Mark Brown
2010-09-28 19:42   ` Ryan Mallon
2010-09-28  7:40 ` Arun Murthy [this message]
2010-09-28 17:47   ` [PATCH 2/7] backlight:pwm: add an element 'name' to platform data Mark Brown
2010-09-28  7:40 ` [PATCH 3/7] leds: pwm: add a new " Arun Murthy
2010-09-28  8:01   ` Eric Miao
2010-09-28  8:36     ` Arun MURTHY
2010-09-28  7:40 ` [PATCH 4/7] pwm: Align existing pwm drivers with pwm-core driver Arun Murthy
2010-09-28  8:58   ` Lars-Peter Clausen
     [not found]     ` <F45880696056844FA6A73F415B568C69532DC2FB98@EXDCVYMBSTM006.EQ1STM.local>
2010-09-28 10:10       ` Lars-Peter Clausen
2010-09-28  7:40 ` [PATCH 5/7] platform: Update the pwm based led and backlight platform data Arun Murthy
2010-09-28  7:40 ` [PATCH 7/7] pwm: Modify backlight and led Kconfig aligning to pwm core Arun Murthy
     [not found] ` <1285659648-21409-7-git-send-email-arun.murthy@stericsson.com>
2010-09-28  8:02   ` [PATCH 6/7] pwm: move existing pwm driver to drivers/pwm Eric Miao
  -- strict thread matches above, loose matches on Subject: below --
2010-09-28 10:35 [PATCH 0/7] PWM core driver for pwm based led and backlight driver Arun Murthy
2010-09-28 10:35 ` [PATCH 2/7] backlight:pwm: add an element 'name' to platform data Arun Murthy

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=1285659648-21409-3-git-send-email-arun.murthy@stericsson.com \
    --to=arun.murthy@stericsson.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).