All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Chew <achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: romain.naour-oid7hba3+9NWj0EZb7rXcA@public.gmane.org,
	kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
	drwyrm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	stefan-WB6LKoYH/xlAfugRpC6u6w@public.gmane.org,
	laforge-WB6LKoYH/xlAfugRpC6u6w@public.gmane.org,
	philipp.zabel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	lost.distance-/E1597aS9LQAvxtiuMwx3w@public.gmane.org,
	robert.jarzmik-GANU6spQydw@public.gmane.org,
	eric.y.miao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org,
	haojian.zhuang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
	gxt-TG0Ac1+ktVePQbnJrJN+5g@public.gmane.org
Cc: thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org,
	achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	openezx-devel-ZwoEplunGu3n3BO9LpVK+9i2O/JbrIOy@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH V6 2/9] ARM: S3C24XX: Provide regulator to pwm-backlight
Date: Mon, 1 Apr 2013 14:53:21 -0700	[thread overview]
Message-ID: <1364853208-32503-3-git-send-email-achew@nvidia.com> (raw)
In-Reply-To: <1364853208-32503-1-git-send-email-achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

The pwm-backlight driver now takes a mandatory regulator that is gotten
during driver probe.  Initialize a dummy regulator to satisfy this
requirement.

Signed-off-by: Andrew Chew <achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Acked-by: Alexandre Courbot <acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/mach-s3c24xx/mach-h1940.c  | 8 ++++++++
 arch/arm/mach-s3c24xx/mach-rx1950.c | 9 +++++++++
 2 files changed, 17 insertions(+)

diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
index 8dd6601..008be7e 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c24xx/mach-h1940.c
@@ -24,6 +24,8 @@
 #include <linux/gpio.h>
 #include <linux/input.h>
 #include <linux/gpio_keys.h>
+#include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>
 #include <linux/pwm_backlight.h>
 #include <linux/i2c.h>
 #include <linux/leds.h>
@@ -497,6 +499,9 @@ static void h1940_backlight_exit(struct device *dev)
 	gpio_set_value(H1940_LATCH_MAX1698_nSHUTDOWN, 0);
 }
 
+/* Dummy regulator for pwm-backlight driver */
+static struct regulator_consumer_supply backlight_supply =
+	REGULATOR_SUPPLY("power", "pwm-backlight");
 
 static struct platform_pwm_backlight_data backlight_data = {
 	.pwm_id         = 0,
@@ -720,6 +725,9 @@ static void __init h1940_init(void)
 	gpio_request(H1940_LATCH_SD_POWER, "SD power");
 	gpio_direction_output(H1940_LATCH_SD_POWER, 0);
 
+	regulator_register_always_on(-1, "backlight-power",
+				     &backlight_supply, 1, 0);
+
 	platform_add_devices(h1940_devices, ARRAY_SIZE(h1940_devices));
 
 	gpio_request(S3C2410_GPA(1), "Red LED blink");
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index e4d67a3..f6978b6 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -25,6 +25,8 @@
 #include <linux/gpio_keys.h>
 #include <linux/device.h>
 #include <linux/pda_power.h>
+#include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>
 #include <linux/pwm_backlight.h>
 #include <linux/pwm.h>
 #include <linux/s3c_adc_battery.h>
@@ -518,6 +520,10 @@ static int rx1950_backlight_notify(struct device *dev, int brightness)
 	return brightness;
 }
 
+/* Dummy regulator for pwm-backlight driver */
+static struct regulator_consumer_supply backlight_supply =
+	REGULATOR_SUPPLY("power", "pwm-backlight");
+
 static struct platform_pwm_backlight_data rx1950_backlight_data = {
 	.pwm_id = 0,
 	.max_brightness = 24,
@@ -795,6 +801,9 @@ static void __init rx1950_init_machine(void)
 	gpio_direction_output(S3C2410_GPA(4), 0);
 	gpio_direction_output(S3C2410_GPJ(6), 0);
 
+	regulator_register_always_on(-1, "backlight-power",
+				     &backlight_supply, 1, 0);
+
 	platform_add_devices(rx1950_devices, ARRAY_SIZE(rx1950_devices));
 
 	i2c_register_board_info(0, rx1950_i2c_devices,
-- 
1.8.1.5

WARNING: multiple messages have this Message-ID (diff)
From: achew@nvidia.com (Andrew Chew)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V6 2/9] ARM: S3C24XX: Provide regulator to pwm-backlight
Date: Mon, 1 Apr 2013 14:53:21 -0700	[thread overview]
Message-ID: <1364853208-32503-3-git-send-email-achew@nvidia.com> (raw)
In-Reply-To: <1364853208-32503-1-git-send-email-achew@nvidia.com>

The pwm-backlight driver now takes a mandatory regulator that is gotten
during driver probe.  Initialize a dummy regulator to satisfy this
requirement.

Signed-off-by: Andrew Chew <achew@nvidia.com>
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
---
 arch/arm/mach-s3c24xx/mach-h1940.c  | 8 ++++++++
 arch/arm/mach-s3c24xx/mach-rx1950.c | 9 +++++++++
 2 files changed, 17 insertions(+)

diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
index 8dd6601..008be7e 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c24xx/mach-h1940.c
@@ -24,6 +24,8 @@
 #include <linux/gpio.h>
 #include <linux/input.h>
 #include <linux/gpio_keys.h>
+#include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>
 #include <linux/pwm_backlight.h>
 #include <linux/i2c.h>
 #include <linux/leds.h>
@@ -497,6 +499,9 @@ static void h1940_backlight_exit(struct device *dev)
 	gpio_set_value(H1940_LATCH_MAX1698_nSHUTDOWN, 0);
 }
 
+/* Dummy regulator for pwm-backlight driver */
+static struct regulator_consumer_supply backlight_supply =
+	REGULATOR_SUPPLY("power", "pwm-backlight");
 
 static struct platform_pwm_backlight_data backlight_data = {
 	.pwm_id         = 0,
@@ -720,6 +725,9 @@ static void __init h1940_init(void)
 	gpio_request(H1940_LATCH_SD_POWER, "SD power");
 	gpio_direction_output(H1940_LATCH_SD_POWER, 0);
 
+	regulator_register_always_on(-1, "backlight-power",
+				     &backlight_supply, 1, 0);
+
 	platform_add_devices(h1940_devices, ARRAY_SIZE(h1940_devices));
 
 	gpio_request(S3C2410_GPA(1), "Red LED blink");
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index e4d67a3..f6978b6 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -25,6 +25,8 @@
 #include <linux/gpio_keys.h>
 #include <linux/device.h>
 #include <linux/pda_power.h>
+#include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>
 #include <linux/pwm_backlight.h>
 #include <linux/pwm.h>
 #include <linux/s3c_adc_battery.h>
@@ -518,6 +520,10 @@ static int rx1950_backlight_notify(struct device *dev, int brightness)
 	return brightness;
 }
 
+/* Dummy regulator for pwm-backlight driver */
+static struct regulator_consumer_supply backlight_supply =
+	REGULATOR_SUPPLY("power", "pwm-backlight");
+
 static struct platform_pwm_backlight_data rx1950_backlight_data = {
 	.pwm_id = 0,
 	.max_brightness = 24,
@@ -795,6 +801,9 @@ static void __init rx1950_init_machine(void)
 	gpio_direction_output(S3C2410_GPA(4), 0);
 	gpio_direction_output(S3C2410_GPJ(6), 0);
 
+	regulator_register_always_on(-1, "backlight-power",
+				     &backlight_supply, 1, 0);
+
 	platform_add_devices(rx1950_devices, ARRAY_SIZE(rx1950_devices));
 
 	i2c_register_board_info(0, rx1950_i2c_devices,
-- 
1.8.1.5

  parent reply	other threads:[~2013-04-01 21:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-01 21:53 [PATCH V6 0/9] Add mandatory regulator for all users of pwm-backlight Andrew Chew
2013-04-01 21:53 ` Andrew Chew
2013-04-01 21:53 ` [PATCH V6 6/9] ARM: mxs: Provide regulator to pwm-backlight Andrew Chew
2013-04-01 21:53   ` Andrew Chew
     [not found] ` <1364853208-32503-1-git-send-email-achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-04-01 21:53   ` [PATCH V6 1/9] ARM: OMAP: board-4430sdp: " Andrew Chew
2013-04-01 21:53     ` Andrew Chew
2013-04-01 21:53   ` Andrew Chew [this message]
2013-04-01 21:53     ` [PATCH V6 2/9] ARM: S3C24XX: " Andrew Chew
2013-04-01 21:53   ` [PATCH V6 3/9] ARM: pxa: " Andrew Chew
2013-04-01 21:53     ` Andrew Chew
2013-04-01 21:53   ` [PATCH V6 4/9] ARM: EXYNOS: " Andrew Chew
2013-04-01 21:53     ` Andrew Chew
2013-04-01 21:53   ` [PATCH V6 5/9] unicore32: " Andrew Chew
2013-04-01 21:53     ` Andrew Chew
2013-04-01 21:53   ` [PATCH V6 7/9] ARM: vt8500: " Andrew Chew
2013-04-01 21:53     ` Andrew Chew
2013-04-01 21:53   ` [PATCH V6 8/9] ARM: tegra: " Andrew Chew
2013-04-01 21:53     ` Andrew Chew
2013-04-01 21:53 ` [PATCH V6 9/9] pwm_bl: Add mandatory backlight power regulator Andrew Chew
2013-04-01 21:53   ` Andrew Chew

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=1364853208-32503-3-git-send-email-achew@nvidia.com \
    --to=achew-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
    --cc=drwyrm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=eric.y.miao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=gxt-TG0Ac1+ktVePQbnJrJN+5g@public.gmane.org \
    --cc=haojian.zhuang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=laforge-WB6LKoYH/xlAfugRpC6u6w@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
    --cc=linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lost.distance-/E1597aS9LQAvxtiuMwx3w@public.gmane.org \
    --cc=openezx-devel-ZwoEplunGu3n3BO9LpVK+9i2O/JbrIOy@public.gmane.org \
    --cc=philipp.zabel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=robert.jarzmik-GANU6spQydw@public.gmane.org \
    --cc=romain.naour-oid7hba3+9NWj0EZb7rXcA@public.gmane.org \
    --cc=stefan-WB6LKoYH/xlAfugRpC6u6w@public.gmane.org \
    --cc=thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.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 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.