From patchwork Mon Feb 4 11:53:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 14492 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 626A323F96 for ; Mon, 4 Feb 2013 11:57:13 +0000 (UTC) Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com [209.85.212.44]) by fiordland.canonical.com (Postfix) with ESMTP id 03951A1877A for ; Mon, 4 Feb 2013 11:57:12 +0000 (UTC) Received: by mail-vb0-f44.google.com with SMTP id fr13so473651vbb.3 for ; Mon, 04 Feb 2013 03:57:12 -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=iN4mN3RY1LAxr4fFEg1Nnaj1RQc9hgcojeqab4UlZx0=; b=McgoNP7Rd5kd03P6rGLHLv94ppf1NsIs29zcz4D8FuE3QkqjziC1bCVSX1taazaNfL vLEBoSqxMgNR/QLl1lsit7sW0ax1q7KczlgvAzk9bGFutKCBvB+VYKIJ1Y+Fo5pIv2ce tF/pLVDI4jOhaLnKrbii6Qt/SWWjK+xGR7ZGvHz1leWbW5TWbyqvZRkRwvu/oekR1/lX x56X9Nv81QEDJfjt15GP2MMr/J3SfvORuLwiwjVlW7VXPrzLvbYqDWvA3rsToG3EemdH 0fdh6wk0cQubJEaUssjsrRokEDiI62hUM9IcQ97IlWZoyt2jPEPK0RTJQAL8OY9TDizR sr2A== X-Received: by 10.52.66.168 with SMTP id g8mr19460237vdt.27.1359979032511; Mon, 04 Feb 2013 03:57:12 -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 zo8csp83088vec; Mon, 4 Feb 2013 03:57:12 -0800 (PST) X-Received: by 10.180.83.227 with SMTP id t3mr9949239wiy.2.1359979031642; Mon, 04 Feb 2013 03:57:11 -0800 (PST) Received: from mail-wg0-x229.google.com ([2a00:1450:400c:c00::229]) by mx.google.com with ESMTPS id wu4si1232821wjc.240.2013.02.04.03.57.11 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Feb 2013 03:57:11 -0800 (PST) Received-SPF: neutral (google.com: 2a00:1450:400c:c00::229 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c00::229; Authentication-Results: mx.google.com; spf=neutral (google.com: 2a00:1450:400c:c00::229 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-wg0-f41.google.com with SMTP id ds1so3043053wgb.0 for ; Mon, 04 Feb 2013 03:57:11 -0800 (PST) X-Received: by 10.194.178.33 with SMTP id cv1mr34502284wjc.46.1359979031230; Mon, 04 Feb 2013 03:57:11 -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.09 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Feb 2013 03:57:10 -0800 (PST) From: Lee Jones To: linux-kernel@vger.kernel.org, broonie@opensource.wolfsonmicro.com Cc: Lee Jones , Zhenhua HUANG Subject: [PATCH 43/73] regulator: ab8500: Add VSDIO definition for the AB8540 Date: Mon, 4 Feb 2013 11:53:58 +0000 Message-Id: <1359978868-28736-44-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: ALoCoQnTV10KH+p6EAhmjGkX4NVZukvTnaKgXlM2J+AwSRieNZ0pTaSKb8yqqKW4zQaaRhmlOzO6 Add the definitions for VSDIO to Regulator Framework for AB8540. Signed-off-by: Zhenhua HUANG Signed-off-by: Lee Jones Reviewed-by: Xiao Mei ZHANG Reviewed-by: Mattias WALLIN Reviewed-by: Mian Yousaf KAUKAB Reviewed-by: Philippe LANGLAIS Tested-by: Maxime COQUELIN --- drivers/regulator/ab8500.c | 35 +++++++++++++++++++++++++++++++++++ include/linux/regulator/ab8500.h | 1 + 2 files changed, 36 insertions(+) diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c index 1f1f361..2a08642 100644 --- a/drivers/regulator/ab8500.c +++ b/drivers/regulator/ab8500.c @@ -132,6 +132,17 @@ static const unsigned int ldo_vintcore_voltages[] = { 1350000, }; +static const int ldo_sdio_voltages[] = { + 1160000, + 1050000, + 1100000, + 1500000, + 1800000, + 2200000, + 2910000, + 3050000, +}; + static int ab8500_regulator_enable(struct regulator_dev *rdev) { int ret; @@ -1409,6 +1420,30 @@ static struct ab8500_regulator_info .update_val_idle = 0x0c, .update_val_normal = 0x04, }, + [AB8540_LDO_SDIO] = { + .desc = { + .name = "LDO-SDIO", + .ops = &ab8500_regulator_volt_mode_ops, + .type = REGULATOR_VOLTAGE, + .id = AB8540_LDO_SDIO, + .owner = THIS_MODULE, + .n_voltages = ARRAY_SIZE(ldo_sdio_voltages), + }, + .min_uV = 1050000, + .max_uV = 3050000, + .load_lp_uA = 5000, + .update_bank = 0x03, + .update_reg = 0x88, + .update_mask = 0x30, + .update_val = 0x10, + .update_val_idle = 0x00, + .update_val_normal = 0x20, + .voltage_bank = 0x03, + .voltage_reg = 0x88, + .voltage_mask = 0x07, + .voltages = ldo_sdio_voltages, + .voltages_len = ARRAY_SIZE(ldo_sdio_voltages), + }, }; struct ab8500_reg_init { diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h index e3d4a5b..caa9f6a 100644 --- a/include/linux/regulator/ab8500.h +++ b/include/linux/regulator/ab8500.h @@ -82,6 +82,7 @@ enum ab8540_regulator_id { AB8540_LDO_ANAMIC2, AB8540_LDO_DMIC, AB8540_LDO_ANA, + AB8540_LDO_SDIO, AB8540_SYSCLKREQ_2, AB8540_SYSCLKREQ_4, AB8540_NUM_REGULATORS,