From mboxrd@z Thu Jan 1 00:00:00 1970 From: petr.cvek@tul.cz (Petr Cvek) Date: Mon, 28 Sep 2015 23:40:57 +0200 Subject: [PATCH v4 25/26] ARM: pxa: magician: Add missing regulator for PWM backlight In-Reply-To: References: Message-ID: <5609B3E9.60807@tul.cz> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Add a fake regulator, which is required for the correct initialization of the PWM backlight driver. Signed-off-by: Petr Cvek --- arch/arm/mach-pxa/magician.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index 5de33c6..8d3946d 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c @@ -425,6 +425,15 @@ static struct pxafb_mach_info samsung_info = { * Backlight */ + /* + * fixed regulator for pwm_backlight + */ + +static struct regulator_consumer_supply pwm_backlight_supply[] = { + REGULATOR_SUPPLY("power", "pwm_backlight"), +}; + + static struct gpio magician_bl_gpios[] = { { EGPIO_MAGICIAN_BL_POWER, GPIOF_DIR_OUT, "Backlight power" }, { EGPIO_MAGICIAN_BL_POWER2, GPIOF_DIR_OUT, "Backlight power 2" }, @@ -1125,6 +1134,9 @@ static void __init magician_init(void) spi_register_board_info(ARRAY_AND_SIZE(ads7846_spi_board_info)); pxa_set_camera_info(&magician_pxacamera_pdata); + + regulator_register_always_on(0, "power", pwm_backlight_supply, + ARRAY_SIZE(pwm_backlight_supply), 5000000); } MACHINE_START(MAGICIAN, "HTC Magician") -- 1.7.12.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754811AbbI1Vk5 (ORCPT ); Mon, 28 Sep 2015 17:40:57 -0400 Received: from bubo.tul.cz ([147.230.16.1]:46195 "EHLO bubo.tul.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753906AbbI1Vkz (ORCPT ); Mon, 28 Sep 2015 17:40:55 -0400 From: Petr Cvek Subject: [PATCH v4 25/26] ARM: pxa: magician: Add missing regulator for PWM backlight To: robert.jarzmik@free.fr, philipp.zabel@gmail.com, daniel@zonque.org, haojian.zhuang@gmail.com, linux@arm.linux.org.uk References: Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Message-ID: <5609B3E9.60807@tul.cz> Date: Mon, 28 Sep 2015 23:40:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a fake regulator, which is required for the correct initialization of the PWM backlight driver. Signed-off-by: Petr Cvek --- arch/arm/mach-pxa/magician.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index 5de33c6..8d3946d 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c @@ -425,6 +425,15 @@ static struct pxafb_mach_info samsung_info = { * Backlight */ + /* + * fixed regulator for pwm_backlight + */ + +static struct regulator_consumer_supply pwm_backlight_supply[] = { + REGULATOR_SUPPLY("power", "pwm_backlight"), +}; + + static struct gpio magician_bl_gpios[] = { { EGPIO_MAGICIAN_BL_POWER, GPIOF_DIR_OUT, "Backlight power" }, { EGPIO_MAGICIAN_BL_POWER2, GPIOF_DIR_OUT, "Backlight power 2" }, @@ -1125,6 +1134,9 @@ static void __init magician_init(void) spi_register_board_info(ARRAY_AND_SIZE(ads7846_spi_board_info)); pxa_set_camera_info(&magician_pxacamera_pdata); + + regulator_register_always_on(0, "power", pwm_backlight_supply, + ARRAY_SIZE(pwm_backlight_supply), 5000000); } MACHINE_START(MAGICIAN, "HTC Magician") -- 1.7.12.1