From patchwork Mon Feb 4 11:54:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 14502 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 BCE4323F96 for ; Mon, 4 Feb 2013 11:57:32 +0000 (UTC) Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by fiordland.canonical.com (Postfix) with ESMTP id 6740EA18F62 for ; Mon, 4 Feb 2013 11:57:32 +0000 (UTC) Received: by mail-ve0-f181.google.com with SMTP id d10so4534418vea.26 for ; Mon, 04 Feb 2013 03:57:32 -0800 (PST) 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=d0d/aC2B1NDBkOQDJYgSzFpbHvG7TD1XDDcyq7jAnr0=; b=fJLM/svvwt7whNK4NFzjn6dZdSuH9pCSkNqtXf9PdYVzCDchmm17YMgIVVEMjtn5U1 YStSKzWkJZVeGwZ7G5i8N8gCGJ+bAT05wHksv6/lI45CUFC095ZzfJGYgTRk8kaRuhe0 b7U/6vDvfWI/IBmKTIu6/BhY34IL4FAHr0RMw7V7Ql3c+jmIFHLqeXYsel0fnbXDS76O ALYtF4fHeSLa1IZSorKqTsyaG0CVjBtN7C8dxIje9wJ7sSKqJBw07CG1qDcbplRwV2UQ enxhO3137QwW7QTQkXppmTetOmP8fs9ZSVIuNMsMemwv+pS4ptiy63xNr+HwhT6PE528 G8dA== X-Received: by 10.220.151.141 with SMTP id c13mr21797093vcw.64.1359979051936; Mon, 04 Feb 2013 03:57:31 -0800 (PST) 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.58.252.8 with SMTP id zo8csp83112vec; Mon, 4 Feb 2013 03:57:31 -0800 (PST) X-Received: by 10.180.106.231 with SMTP id gx7mr9947062wib.4.1359979051030; Mon, 04 Feb 2013 03:57:31 -0800 (PST) Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by mx.google.com with ESMTPS id q8si5714638wja.170.2013.02.04.03.57.30 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Feb 2013 03:57:31 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.171 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.212.171; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.171 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-f171.google.com with SMTP id hn17so1492068wib.16 for ; Mon, 04 Feb 2013 03:57:30 -0800 (PST) X-Received: by 10.194.71.244 with SMTP id y20mr34531448wju.19.1359979050308; Mon, 04 Feb 2013 03:57:30 -0800 (PST) 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 j9sm12937128wia.5.2013.02.04.03.57.28 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Feb 2013 03:57:29 -0800 (PST) From: Lee Jones To: linux-kernel@vger.kernel.org, broonie@opensource.wolfsonmicro.com Cc: Rabin Vincent , Lee Jones Subject: [PATCH 53/73] regulator: ab8500: Don't register external regulators on AB8505 Date: Mon, 4 Feb 2013 11:54:08 +0000 Message-Id: <1359978868-28736-54-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1359978868-28736-1-git-send-email-lee.jones@linaro.org> References: <1359978868-28736-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQnKLfrmnqL/0pKxQ2J7gIDvLAgYXinTZuq+p/C9fQn9Kl6OmRY3Org1O60oKkEyTaMm7MFR From: Rabin Vincent ExtSupply regulators are not included on AB8505 based platforms. Signed-off-by: Rabin Vincent Signed-off-by: Lee Jones Tested-by: Marcus COOPER --- drivers/regulator/ab8500.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c index 12ec061..392e469 100644 --- a/drivers/regulator/ab8500.c +++ b/drivers/regulator/ab8500.c @@ -2740,10 +2740,12 @@ static int ab8500_regulator_probe(struct platform_device *pdev) return err; } - /* register external regulators (before Vaux1, 2 and 3) */ - err = ab8500_ext_regulator_init(pdev); - if (err) - return err; + if (!is_ab8505(ab8500)) { + /* register external regulators (before Vaux1, 2 and 3) */ + err = ab8500_ext_regulator_init(pdev); + if (err) + return err; + } /* register all regulators */ for (i = 0; i < regulator_info_size; i++) { @@ -2785,10 +2787,12 @@ static int ab8500_regulator_remove(struct platform_device *pdev) regulator_unregister(info->regulator); } - /* remove external regulators (after Vaux1, 2 and 3) */ - err = ab8500_ext_regulator_exit(pdev); - if (err) - return err; + if (!is_ab8505(ab8500)) { + /* remove external regulators (after Vaux1, 2 and 3) */ + err = ab8500_ext_regulator_exit(pdev); + if (err) + return err; + } /* remove regulator debug */ err = ab8500_regulator_debug_exit(pdev);