From patchwork Thu Mar 28 16:11:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 15742 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 77ADA23E10 for ; Thu, 28 Mar 2013 16:12:46 +0000 (UTC) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by fiordland.canonical.com (Postfix) with ESMTP id 317F1A18890 for ; Thu, 28 Mar 2013 16:12:46 +0000 (UTC) Received: by mail-vc0-f176.google.com with SMTP id ib11so7714041vcb.21 for ; Thu, 28 Mar 2013 09:12:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=6QwbsmxLVrqb2B4ACb625oLrahi/3yAruAN2R8EcEu0=; b=NVn0g4sD2kXXpjOQEa0Bu/P+d3QLVyfQb0iLoL979cYrkE1FSat5wU0BspHrG0j+ZX 5x7VjP9jb8/Vzimu3BbcJSypGGgTIdB6GEq+KJaW53I3VqZGXnvZsJODR6BkyM58VRbd 298SIK4CGSPUdKTE9fYm+GvOGX0ngZSM4GYsE95hPPkThUIWd2S9nSJ5+W4pzDv7uEUB wVyqkQk6WI1BrYjcO2FDqtRMu581XQoAndPqZXV3KGBCSBCmagEe3aBihi73UGZu+zIW nyeHiCm8RztFmQvOUd5iAS9ka1UdANBkZNXCHtu+F0rlpS1sNW1iN/rD3R8VelDm0g0x BLKg== X-Received: by 10.220.150.74 with SMTP id x10mr7361102vcv.68.1364487165738; Thu, 28 Mar 2013 09:12:45 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.59.4.204 with SMTP id cg12csp22434ved; Thu, 28 Mar 2013 09:12:45 -0700 (PDT) X-Received: by 10.180.76.84 with SMTP id i20mr17638691wiw.9.1364487158178; Thu, 28 Mar 2013 09:12:38 -0700 (PDT) Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]) by mx.google.com with ESMTPS id ls8si10119339wjb.45.2013.03.28.09.12.37 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Mar 2013 09:12:38 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::234 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c05::234; Authentication-Results: mx.google.com; spf=neutral (google.com: 2a00:1450:400c:c05::234 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-wi0-f180.google.com with SMTP id c10so3402695wiw.7 for ; Thu, 28 Mar 2013 09:12:37 -0700 (PDT) X-Received: by 10.180.181.40 with SMTP id dt8mr17475874wic.17.1364487155661; Thu, 28 Mar 2013 09:12:35 -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 ESMTPS id o5sm16765926wix.3.2013.03.28.09.12.33 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Mar 2013 09:12:34 -0700 (PDT) From: Lee Jones To: linux-kernel@vger.kernel.org, broonie@opensource.wolfsonmicro.com Cc: Lee Jones , Alexandre Torgue Subject: [PATCH 22/33] regulator: ab8500: Also check for AB8505 based platforms Date: Thu, 28 Mar 2013 16:11:22 +0000 Message-Id: <1364487093-19551-23-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1364487093-19551-1-git-send-email-lee.jones@linaro.org> References: <1364487093-19551-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQmS6VnuXeOP23Jb/Eg2LCGWQIaWXQEx/RJGUf1raMbm8K8/en/MH+8LmGmHRRVmA4w38dZP Ensure we initialise AB8505 external supply regulators. Signed-off-by: Alexandre Torgue Signed-off-by: Lee Jones Reviewed-by: Philippe LANGLAIS Tested-by: Xiao Mei ZHANG --- drivers/regulator/ab8500-ext.c | 2 +- drivers/regulator/ab8500.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/ab8500-ext.c b/drivers/regulator/ab8500-ext.c index 993e9e4..412a9ac 100644 --- a/drivers/regulator/ab8500-ext.c +++ b/drivers/regulator/ab8500-ext.c @@ -419,7 +419,7 @@ int ab8500_ext_regulator_init(struct platform_device *pdev) config.init_data = &pdata->ext_regulator[i]; config.driver_data = info; - if (is_ab9540(ab8500) && + if ((is_ab9540(ab8500) || is_ab8540(ab8500)) && ((info->desc.id == AB8500_EXT_SUPPLY1) || (info->desc.id == AB8500_EXT_SUPPLY2) || (info->desc.id == AB8500_EXT_SUPPLY3))) diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c index 90f5263..be8351a 100644 --- a/drivers/regulator/ab8500.c +++ b/drivers/regulator/ab8500.c @@ -2841,6 +2841,9 @@ static int ab8500_regulator_remove(struct platform_device *pdev) } else if (is_ab8505(ab8500)) { regulator_info = ab8505_regulator_info; regulator_info_size = ARRAY_SIZE(ab8505_regulator_info); + } else if (is_ab8540(ab8500)) { + regulator_info = ab8540_regulator_info; + regulator_info_size = ARRAY_SIZE(ab8540_regulator_info); } else { regulator_info = ab8500_regulator_info; regulator_info_size = ARRAY_SIZE(ab8500_regulator_info);