From: Andrew Chew <achew@nvidia.com> To: romain.naour@openwide.fr, kgene.kim@samsung.com, drwyrm@gmail.com, stefan@openezx.org, laforge@openezx.org, philipp.zabel@gmail.com, lost.distance@yahoo.com, marek.vasut@gmail.com, robert.jarzmik@free.fr, eric.y.miao@gmail.com, linux@arm.linux.org.uk, haojian.zhuang@gmail.com, kyungmin.park@samsung.com, gxt@mprc.pku.edu.cn, shawn.guo@linaro.org, linux@prisktech.co.nz Cc: thierry.reding@avionic-design.de, achew@nvidia.com, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, openezx-devel@lists.openezx.org, linux-tegra@vger.kernel.org Subject: [PATCH V5 2/9] ARM: S3C24XX: Provide regulator to pwm-backlight Date: Mon, 25 Mar 2013 18:21:46 -0700 [thread overview] Message-ID: <1364260913-25490-3-git-send-email-achew@nvidia.com> (raw) In-Reply-To: <1364260913-25490-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
WARNING: multiple messages have this Message-ID (diff)
From: achew@nvidia.com (Andrew Chew) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH V5 2/9] ARM: S3C24XX: Provide regulator to pwm-backlight Date: Mon, 25 Mar 2013 18:21:46 -0700 [thread overview] Message-ID: <1364260913-25490-3-git-send-email-achew@nvidia.com> (raw) In-Reply-To: <1364260913-25490-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
next prev parent reply other threads:[~2013-03-26 1:21 UTC|newest] Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-03-26 1:21 [PATCH V5 0/9] Add mandatory regulator for all users of pwm-backlight Andrew Chew 2013-03-26 1:21 ` Andrew Chew 2013-03-26 1:21 ` Andrew Chew [this message] 2013-03-26 1:21 ` [PATCH V5 2/9] ARM: S3C24XX: Provide regulator to pwm-backlight Andrew Chew [not found] ` <1364260913-25490-1-git-send-email-achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> 2013-03-26 1:21 ` [PATCH V5 1/9] ARM: OMAP: board-4430sdp: " Andrew Chew 2013-03-26 1:21 ` Andrew Chew 2013-03-26 1:21 ` [PATCH V5 3/9] ARM: pxa: " Andrew Chew 2013-03-26 1:21 ` Andrew Chew 2013-03-28 14:47 ` Marek Vasut 2013-03-28 14:47 ` Marek Vasut 2013-03-26 1:21 ` [PATCH V5 5/9] unicore32: " Andrew Chew 2013-03-26 1:21 ` Andrew Chew 2013-03-26 1:21 ` [PATCH V5 6/9] ARM: mxs: " Andrew Chew 2013-03-26 1:21 ` Andrew Chew 2013-03-26 5:48 ` Shawn Guo 2013-03-26 5:48 ` Shawn Guo 2013-03-26 1:21 ` [PATCH V5 7/9] ARM: vt8500: " Andrew Chew 2013-03-26 1:21 ` Andrew Chew 2013-03-26 1:21 ` [PATCH V5 8/9] ARM: tegra: " Andrew Chew 2013-03-26 1:21 ` Andrew Chew [not found] ` <1364260913-25490-9-git-send-email-achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> 2013-03-26 7:26 ` Thierry Reding 2013-03-26 7:26 ` Thierry Reding 2013-03-26 1:21 ` [PATCH V5 9/9] pwm_bl: Add mandatory backlight power regulator Andrew Chew 2013-03-26 1:21 ` Andrew Chew [not found] ` <1364260913-25490-10-git-send-email-achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> 2013-03-26 7:37 ` Thierry Reding 2013-03-26 7:37 ` Thierry Reding 2013-03-26 1:21 ` [PATCH V5 4/9] ARM: EXYNOS: Provide regulator to pwm-backlight Andrew Chew 2013-03-26 1:21 ` 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=1364260913-25490-3-git-send-email-achew@nvidia.com \ --to=achew@nvidia.com \ --cc=drwyrm@gmail.com \ --cc=eric.y.miao@gmail.com \ --cc=gxt@mprc.pku.edu.cn \ --cc=haojian.zhuang@gmail.com \ --cc=kgene.kim@samsung.com \ --cc=kyungmin.park@samsung.com \ --cc=laforge@openezx.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-samsung-soc@vger.kernel.org \ --cc=linux-tegra@vger.kernel.org \ --cc=linux@arm.linux.org.uk \ --cc=linux@prisktech.co.nz \ --cc=lost.distance@yahoo.com \ --cc=marek.vasut@gmail.com \ --cc=openezx-devel@lists.openezx.org \ --cc=philipp.zabel@gmail.com \ --cc=robert.jarzmik@free.fr \ --cc=romain.naour@openwide.fr \ --cc=shawn.guo@linaro.org \ --cc=stefan@openezx.org \ --cc=thierry.reding@avionic-design.de \ /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: linkBe 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.