From patchwork Mon Feb 4 11:54:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 14518 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 075FD23F96 for ; Mon, 4 Feb 2013 11:58:09 +0000 (UTC) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by fiordland.canonical.com (Postfix) with ESMTP id A0215A19236 for ; Mon, 4 Feb 2013 11:58:08 +0000 (UTC) Received: by mail-vc0-f173.google.com with SMTP id fy7so3824608vcb.18 for ; Mon, 04 Feb 2013 03:58:08 -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=GWCx+Jm0mHoF0ONXf8zW7A0TjTxS3IGkRduX6qikhKo=; b=LIYqvoUXxTBGV7MfdjP/5zL5IOG63XQxSMxRBQ04BFv8SQUE05q/tsZfACGUU5zVf4 pHEhs6IK4a2s7MBeIZhmdQoH/2lG81jLR+KPTACkAJLMDfDT1Tjp+0oel1jC31uzJsM5 NJhQPs34LWbnoiTt5XRzGEfVZ+AjY6bSkEwZ33m00eickfZk5zUnJAGJO+LuTxEDhhv1 XEPNKvAsVvkyOdQaJpGLtXyYLNSzkzpTCO/QdIHgsrn4aFoL6JQU32sXliycDjq2ykkd SsSFQ9KlosU0xKL4lG4MYbutKKB5XkaEZXE+bZV0SvyyiypHECxk1NzUwJNgOM/e9yIY i5mA== X-Received: by 10.220.149.200 with SMTP id u8mr20448326vcv.7.1359979088157; Mon, 04 Feb 2013 03:58:08 -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 zo8csp83147vec; Mon, 4 Feb 2013 03:58:07 -0800 (PST) X-Received: by 10.180.83.227 with SMTP id t3mr9954246wiy.2.1359979087300; Mon, 04 Feb 2013 03:58:07 -0800 (PST) Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) by mx.google.com with ESMTPS id o8si3484268wix.7.2013.02.04.03.58.07 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Feb 2013 03:58:07 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.54 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.54; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.54 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-f54.google.com with SMTP id fm10so4524051wgb.33 for ; Mon, 04 Feb 2013 03:58:06 -0800 (PST) X-Received: by 10.180.77.35 with SMTP id p3mr9918183wiw.18.1359979086887; Mon, 04 Feb 2013 03:58:06 -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.58.04 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Feb 2013 03:58:05 -0800 (PST) From: Lee Jones To: linux-kernel@vger.kernel.org, broonie@opensource.wolfsonmicro.com Cc: Zhenhua HUANG , Lee Jones Subject: [PATCH 69/73] regulator: ab8500: Introduce aux5, aux6 regulators for AB8540 Date: Mon, 4 Feb 2013 11:54:24 +0000 Message-Id: <1359978868-28736-70-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: ALoCoQnvcMNX4LrFSoKKWmHFUmavjb3OjiMud4A66hegRq9xTghbVP+oVY1So5Wk0foZqb4LhKE9 From: Zhenhua HUANG Introduce aux5, aux6 into ab8540 regulator framework. Signed-off-by: Zhenhua HUANG Signed-off-by: Lee Jones Reviewed-by: Maxime COQUELIN Reviewed-by: David PARIS Reviewed-by: Philippe LANGLAIS --- drivers/regulator/ab8500.c | 65 ++++++++++++++++++++++++++++++++++++++ include/linux/regulator/ab8500.h | 2 ++ 2 files changed, 67 insertions(+) diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c index 142c5fb..6a96618 100644 --- a/drivers/regulator/ab8500.c +++ b/drivers/regulator/ab8500.c @@ -151,6 +151,21 @@ static const unsigned int ldo_vaux3_ab8540_voltages[] = { 3050000, }; +static const int ldo_vaux56_ab8540_voltages[] = { + 750000, 760000, 770000, 780000, 790000, 800000, + 810000, 820000, 830000, 840000, 850000, 860000, + 870000, 880000, 890000, 900000, 910000, 920000, + 930000, 940000, 950000, 960000, 970000, 980000, + 990000, 1000000, 1010000, 1020000, 1030000, + 1040000, 1050000, 1060000, 1070000, 1080000, + 1090000, 1100000, 1110000, 1120000, 1130000, + 1140000, 1150000, 1160000, 1170000, 1180000, + 1190000, 1200000, 1210000, 1220000, 1230000, + 1240000, 1250000, 1260000, 1270000, 1280000, + 1290000, 1300000, 1310000, 1320000, 1330000, + 1340000, 1350000, 1360000, 1800000, 2790000, +}; + static const unsigned int ldo_vintcore_voltages[] = { 1200000, 1225000, @@ -1559,6 +1574,54 @@ static struct ab8500_regulator_info .voltage_reg = 0x2f, .voltage_mask = 0x0f, }, + [AB8540_LDO_AUX5] = { + .desc = { + .name = "LDO-AUX5", + .ops = &ab8500_regulator_volt_mode_ops, + .type = REGULATOR_VOLTAGE, + .id = AB8540_LDO_AUX5, + .owner = THIS_MODULE, + .n_voltages = ARRAY_SIZE(ldo_vaux56_ab8540_voltages), + }, + .load_lp_uA = 20000, + /* values for Vaux5Regu register */ + .update_bank = 0x04, + .update_reg = 0x32, + .update_mask = 0x03, + .update_val = 0x01, + .update_val_idle = 0x03, + .update_val_normal = 0x01, + /* values for Vaux5SEL register */ + .voltage_bank = 0x04, + .voltage_reg = 0x33, + .voltage_mask = 0x3f, + .voltages = ldo_vaux56_ab8540_voltages, + .voltages_len = ARRAY_SIZE(ldo_vaux56_ab8540_voltages), + }, + [AB8540_LDO_AUX6] = { + .desc = { + .name = "LDO-AUX6", + .ops = &ab8500_regulator_volt_mode_ops, + .type = REGULATOR_VOLTAGE, + .id = AB8540_LDO_AUX6, + .owner = THIS_MODULE, + .n_voltages = ARRAY_SIZE(ldo_vaux56_ab8540_voltages), + }, + .load_lp_uA = 20000, + /* values for Vaux6Regu register */ + .update_bank = 0x04, + .update_reg = 0x35, + .update_mask = 0x03, + .update_val = 0x01, + .update_val_idle = 0x03, + .update_val_normal = 0x01, + /* values for Vaux6SEL register */ + .voltage_bank = 0x04, + .voltage_reg = 0x36, + .voltage_mask = 0x3f, + .voltages = ldo_vaux56_ab8540_voltages, + .voltages_len = ARRAY_SIZE(ldo_vaux56_ab8540_voltages), + }, [AB8540_LDO_INTCORE] = { .desc = { .name = "LDO-INTCORE", @@ -2964,6 +3027,8 @@ static struct of_regulator_match ab8540_regulator_match[] = { { .name = "ab8500_ldo_aux2", .driver_data = (void *) AB8540_LDO_AUX2, }, { .name = "ab8500_ldo_aux3", .driver_data = (void *) AB8540_LDO_AUX3, }, { .name = "ab8500_ldo_aux4", .driver_data = (void *) AB8540_LDO_AUX4, }, + { .name = "ab8500_ldo_aux5", .driver_data = (void *) AB8540_LDO_AUX5, }, + { .name = "ab8500_ldo_aux6", .driver_data = (void *) AB8540_LDO_AUX6, }, { .name = "ab8500_ldo_intcore", .driver_data = (void *) AB8540_LDO_INTCORE, }, { .name = "ab8500_ldo_tvout", .driver_data = (void *) AB8540_LDO_TVOUT, }, { .name = "ab8500_ldo_audio", .driver_data = (void *) AB8540_LDO_AUDIO, }, diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h index bb0140c..b490a16 100644 --- a/include/linux/regulator/ab8500.h +++ b/include/linux/regulator/ab8500.h @@ -74,6 +74,8 @@ enum ab8540_regulator_id { AB8540_LDO_AUX2, AB8540_LDO_AUX3, AB8540_LDO_AUX4, + AB8540_LDO_AUX5, + AB8540_LDO_AUX6, AB8540_LDO_INTCORE, AB8540_LDO_TVOUT, AB8540_LDO_AUDIO,