From patchwork Fri Dec 20 09:46:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 303969 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id ACC0E2C00E5 for ; Fri, 20 Dec 2013 20:48:26 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755718Ab3LTJs0 (ORCPT ); Fri, 20 Dec 2013 04:48:26 -0500 Received: from mail-bk0-f54.google.com ([209.85.214.54]:41667 "EHLO mail-bk0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755157Ab3LTJsZ (ORCPT ); Fri, 20 Dec 2013 04:48:25 -0500 Received: by mail-bk0-f54.google.com with SMTP id v16so1094578bkz.41 for ; Fri, 20 Dec 2013 01:48:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=2p2b08lXPKkqXRzyMgxLWntaRs5bJf2hLu6Zhv2to1g=; b=ZTfxy95npFxnqmSUS+lgbFU+69+C+XwgV4GXCy41ORG7i/3BoRis20z/p4+xmJ8iWO Xb0F+5RczqrVTLqzJY99H90gghPiSi0YHS4dxWZGkmOV7FM9TurP0oS+oPynUoD+tR2S cB92kiQ/rMVIB1X4iY+jaMwdd4DKWUzwQXF+OPTevOV6AMVxeGjdzynvjZ8YvGqk3jnD iWaa8XsKPTp67UeXWy1xA5mTbfqluNkvJAnjS/EQRVPGdci2DqXWPfcTM8H1060yJs38 Yw9UmjZ1MddYS0nZVt5B278Pd7sWxXp5B8ApPArM+gciVDv2NZOYeLLoY/EmsysdQJdj A4/Q== X-Received: by 10.204.173.69 with SMTP id o5mr42377bkz.74.1387532903553; Fri, 20 Dec 2013 01:48:23 -0800 (PST) Received: from localhost (port-49924.pppoe.wtnet.de. [46.59.195.160]) by mx.google.com with ESMTPSA id o5sm6058491bkz.4.2013.12.20.01.48.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Dec 2013 01:48:22 -0800 (PST) From: Thierry Reding To: Haojian Zhuang , Robert Jarzmik Cc: linux-arm-kernel@lists.infradead.org, linux-pwm@vger.kernel.org Subject: [PATCH] ARM: pxa: Add dummy backlight power supply on Mitac Mio A701 Date: Fri, 20 Dec 2013 10:46:52 +0100 Message-Id: <1387532812-11742-1-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 1.8.4.2 Sender: linux-pwm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pwm@vger.kernel.org Recent changes to the pwm-backlight driver have made the power supply mandatory. There is code in the regulator core to deal with situations where no regulator is specified and provide a dummy, but that works on DT-based boards only. The situation can be remedied by adding a dummy regulator during board initialization. Tested-by: Robert Jarzmik Signed-off-by: Thierry Reding --- arch/arm/mach-pxa/mioa701.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c index f70583fee59f..29997bde277d 100644 --- a/arch/arm/mach-pxa/mioa701.c +++ b/arch/arm/mach-pxa/mioa701.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -714,6 +715,10 @@ static struct gpio global_gpios[] = { { GPIO56_MT9M111_nOE, GPIOF_OUT_INIT_LOW, "Camera nOE" }, }; +static struct regulator_consumer_supply fixed_5v0_consumers[] = { + REGULATOR_SUPPLY("power", "pwm-backlight"), +}; + static void __init mioa701_machine_init(void) { int rc; @@ -753,6 +758,10 @@ static void __init mioa701_machine_init(void) pxa_set_i2c_info(&i2c_pdata); pxa27x_set_i2c_power_info(NULL); pxa_set_camera_info(&mioa701_pxacamera_platform_data); + + regulator_register_always_on(0, "fixed-5.0V", fixed_5v0_consumers, + ARRAY_SIZE(fixed_5v0_consumers), + 5000000); } static void mioa701_machine_exit(void)