From patchwork Wed May 22 12:47:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 17090 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gg0-f199.google.com (mail-gg0-f199.google.com [209.85.161.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CDB13238FE for ; Wed, 22 May 2013 12:48:53 +0000 (UTC) Received: by mail-gg0-f199.google.com with SMTP id q3sf2078040gge.2 for ; Wed, 22 May 2013 05:48:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=iGdSRjTgGuiFBVKGx4BcYJlfSPxQhkdvakTdCJrl62Y=; b=EkvGCV0e6Nkpfi3olPNoEMHB6ZtrjQcoh5sqZijyHWQqM+ldKELj6SDUJqkOyMVZxR 3NigAWb12wHnD4RaKJ+wr9ajpBtyxxeURbIv9VryZ7cH2/NNhwKCHdMjnMiPgdtJh7Mr M7rv+ThCjOpQnd1EYrllTY37QnLLs3+X3jMRNnBjbZcdrmJh5oa8IwSB2oIUQOHaLNKC oFe37c3vCqoXJJJRBOuDUWrqsHaK9KMye0MYCPxwgS3EkAwZGgEh1uneicJgA/SUrTGi m0WDWDpa1vhtTzOxxfEUfoHKgWurg3Kjm8R4Y3Rkx7NAK+t4W7kvwtVnW7OR6ap7/SyT V2Qg== X-Received: by 10.236.16.19 with SMTP id g19mr3348202yhg.42.1369226880981; Wed, 22 May 2013 05:48:00 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.0.113 with SMTP id 17ls333473qed.28.gmail; Wed, 22 May 2013 05:48:00 -0700 (PDT) X-Received: by 10.220.192.3 with SMTP id do3mr2747005vcb.16.1369226880840; Wed, 22 May 2013 05:48:00 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id zt2si2499227vdb.141.2013.05.22.05.48.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 May 2013 05:48:00 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id kw10so1296453vcb.28 for ; Wed, 22 May 2013 05:48:00 -0700 (PDT) X-Received: by 10.52.69.200 with SMTP id g8mr2313672vdu.4.1369226880502; Wed, 22 May 2013 05:48:00 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.126.138 with SMTP id c10csp823vcs; Wed, 22 May 2013 05:47:59 -0700 (PDT) X-Received: by 10.180.9.238 with SMTP id d14mr33335967wib.18.1369226879322; Wed, 22 May 2013 05:47:59 -0700 (PDT) Received: from mail-wi0-x233.google.com (mail-wi0-x233.google.com [2a00:1450:400c:c05::233]) by mx.google.com with ESMTPS id p10si1962175wiy.79.2013.05.22.05.47.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 May 2013 05:47:59 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::233 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c05::233; Received: by mail-wi0-f179.google.com with SMTP id hq7so1159455wib.12 for ; Wed, 22 May 2013 05:47:58 -0700 (PDT) X-Received: by 10.180.185.179 with SMTP id fd19mr14491959wic.1.1369226878877; Wed, 22 May 2013 05:47:58 -0700 (PDT) Received: from localhost.localdomain (cpc34-aztw25-2-0-cust250.18-1.cable.virginmedia.com. [86.16.136.251]) by mx.google.com with ESMTPSA id h8sm10615271wiz.9.2013.05.22.05.47.56 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 May 2013 05:47:57 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, broonie@kernel.org, linus.walleij@linaro.org Cc: arnd@arndb.de, linus.walleij@stericsson.com, srinidhi.kasagar@stericsson.com, Lee Jones Subject: [PATCH] ARM: ux500: Allow Snowball to pass its own regulator settings Date: Wed, 22 May 2013 13:47:32 +0100 Message-Id: <1369226853-16978-2-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1369226853-16978-1-git-send-email-lee.jones@linaro.org> References: <1369226853-16978-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQmLxMy50EHMrfWRd1c3YulGFjmTsl6dLhUeNxOcdXlv92v/eTlRjExHsYhDs6r7HljiLrhQ X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patch fixes a bug introduced in the v3.10 merge window. Currently the external regulator settings are passed though to the AB8500 regulator driver regards of whether they can or should be used on any ux500 based platform. They are not applicable for the u8505 and when enabled, they turn off AUX2 which adversely affects the eMMC on Snowball. The driver already knows that the external regulator settings are not appropriate for the u8505, however it's more difficult for driver code to distinguish between two different u8500 based platforms. Using the new semantics, we can just not pass the external regulator initialisation values from platform code and the external regulator driver will know not to register them. Signed-off-by: Lee Jones --- arch/arm/mach-ux500/board-mop500-regulators.c | 8 ++++++++ arch/arm/mach-ux500/board-mop500-regulators.h | 1 + arch/arm/mach-ux500/board-mop500.c | 2 ++ 3 files changed, 11 insertions(+) diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c index b34441b..7399e90 100644 --- a/arch/arm/mach-ux500/board-mop500-regulators.c +++ b/arch/arm/mach-ux500/board-mop500-regulators.c @@ -996,6 +996,14 @@ struct ab8500_regulator_platform_data ab8500_regulator_plat_data = { .num_ext_regulator = ARRAY_SIZE(ab8500_ext_regulators), }; +/* External regulators turn off VAUX2 when in use on Snowball. */ +struct ab8500_regulator_platform_data snowball_regulator_plat_data = { + .reg_init = ab8500_reg_init, + .num_reg_init = ARRAY_SIZE(ab8500_reg_init), + .regulator = ab8500_regulators, + .num_regulator = ARRAY_SIZE(ab8500_regulators), +}; + struct ab8500_regulator_platform_data ab8505_regulator_plat_data = { .reg_init = ab8505_reg_init, .num_reg_init = ARRAY_SIZE(ab8505_reg_init), diff --git a/arch/arm/mach-ux500/board-mop500-regulators.h b/arch/arm/mach-ux500/board-mop500-regulators.h index 039f513..6300e79 100644 --- a/arch/arm/mach-ux500/board-mop500-regulators.h +++ b/arch/arm/mach-ux500/board-mop500-regulators.h @@ -16,6 +16,7 @@ extern struct ab8500_regulator_platform_data ab8500_regulator_plat_data; extern struct ab8500_regulator_platform_data ab8505_regulator_plat_data; +extern struct ab8500_regulator_platform_data snowball_regulator_plat_data; extern struct regulator_init_data tps61052_regulator; extern struct regulator_init_data gpio_en_3v3_regulator; extern struct regulator_init_data sdi0_reg_init_data; diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 0b018c4..2d609d4 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -615,6 +615,8 @@ static void __init snowball_init_machine(void) struct device *parent = NULL; int i; + ab8500_platdata.regulator = &snowball_regulator_plat_data; + platform_device_register(&db8500_prcmu_device); sdi0_reg_info.enable_gpio = SNOWBALL_SDMMC_EN_GPIO;