From patchwork Sat Feb 21 00:53:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 5858921 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D34AF9F269 for ; Sat, 21 Feb 2015 00:59:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0DB4520465 for ; Sat, 21 Feb 2015 00:59:24 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2B1322045B for ; Sat, 21 Feb 2015 00:59:23 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YOyKo-0007Gy-5X; Sat, 21 Feb 2015 00:54:18 +0000 Received: from mail-ie0-x22d.google.com ([2607:f8b0:4001:c03::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YOyKj-0006jZ-Cf for linux-arm-kernel@lists.infradead.org; Sat, 21 Feb 2015 00:54:14 +0000 Received: by iecar1 with SMTP id ar1so12043144iec.0 for ; Fri, 20 Feb 2015 16:53:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=7r/Mm7NnyYiVv2iVkt6WZtmrxnUWI5GKpbWxO3kNMLs=; b=J2QCRdztYN8W+8oC9Ou2WKEGRmy4xTWMMqKj/8++So+mUvsmyV5jo6N0yjQNMwYYet H1twsf777AhbOv3Kf0F4S9MDGYz61gX38MPcHocAKpYX3eaPcGQJvUshUdU4u8ZuoOrR K2rp7NH6ERTlA3AMsewM1U6K1ocDS6lAusSss= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=7r/Mm7NnyYiVv2iVkt6WZtmrxnUWI5GKpbWxO3kNMLs=; b=VD0v9y24K+lN8PqD5gAfLwU0ypphVnh5MswN4WujUd7a8bTWBLctX0sN/2d/sdJUW6 +Rpv2jXfnCdFRszUHCLdrCvHzsBt7Vo0IcHq/ECFIm4DauJWXXLzkHSKAJxkYsfkzq6b 5IQTJD4muEjB5i5m/goHoMTld0B2gghUyeCFBbj7gT5gEbImqoBDO384ZOY3bB/PTan9 v848XEQRogUC3t8XeEg2HX+body4ZnzAsa7jzwia4TOWIRy85qmluBzJVoqPv4kuGzM2 DCzCPCV8w+emB2MOg726awU9gfkxs31R5KQN3MZ2vKWWYg3wU3si7UcJWzIxYmHVnChu Zi1Q== X-Gm-Message-State: ALoCoQkmGllKK8+LnTCN+EvG/14VRh1rpW/keKhwdd3D70WEDpL9MKNz02Nii2SlfAVJL4quMwdO X-Received: by 10.50.43.169 with SMTP id x9mr158897igl.28.1424480031014; Fri, 20 Feb 2015 16:53:51 -0800 (PST) Received: from tictac.mtv.corp.google.com ([172.22.65.76]) by mx.google.com with ESMTPSA id qd2sm1931544igc.22.2015.02.20.16.53.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Feb 2015 16:53:50 -0800 (PST) From: Doug Anderson To: Mark Brown Subject: [PATCH] regulator: rk808: Set the enable time for LDOs Date: Fri, 20 Feb 2015 16:53:38 -0800 Message-Id: <1424480018-29298-1-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150220_165413_507400_1085C29D X-CRM114-Status: UNSURE ( 9.44 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.8 (/) Cc: Addy Ke , Alexandru Stan , linux-kernel@vger.kernel.org, Dmitry Torokhov , Doug Anderson , lgirdwood@gmail.com, linux-rockchip@lists.infradead.org, Chris Zhong , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The LDOs are documented in the rk808 datasheet to have a soft start time of 400us. Add that to the driver. If this time takes longer on a certain board the device tree should be able to override with "regulator-enable-ramp-delay". This fixes some dw_mmc probing problems (together with other patches posted to the mmc maiing lists) on rk3288. Signed-off-by: Doug Anderson --- drivers/regulator/rk808-regulator.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-regulator.c index 1f93b75..3fd4435 100644 --- a/drivers/regulator/rk808-regulator.c +++ b/drivers/regulator/rk808-regulator.c @@ -235,6 +235,7 @@ static const struct regulator_desc rk808_reg[] = { .vsel_mask = RK808_LDO_VSEL_MASK, .enable_reg = RK808_LDO_EN_REG, .enable_mask = BIT(0), + .enable_time = 400, .owner = THIS_MODULE, }, { .name = "LDO_REG2", @@ -249,6 +250,7 @@ static const struct regulator_desc rk808_reg[] = { .vsel_mask = RK808_LDO_VSEL_MASK, .enable_reg = RK808_LDO_EN_REG, .enable_mask = BIT(1), + .enable_time = 400, .owner = THIS_MODULE, }, { .name = "LDO_REG3", @@ -263,6 +265,7 @@ static const struct regulator_desc rk808_reg[] = { .vsel_mask = RK808_BUCK4_VSEL_MASK, .enable_reg = RK808_LDO_EN_REG, .enable_mask = BIT(2), + .enable_time = 400, .owner = THIS_MODULE, }, { .name = "LDO_REG4", @@ -277,6 +280,7 @@ static const struct regulator_desc rk808_reg[] = { .vsel_mask = RK808_LDO_VSEL_MASK, .enable_reg = RK808_LDO_EN_REG, .enable_mask = BIT(3), + .enable_time = 400, .owner = THIS_MODULE, }, { .name = "LDO_REG5", @@ -291,6 +295,7 @@ static const struct regulator_desc rk808_reg[] = { .vsel_mask = RK808_LDO_VSEL_MASK, .enable_reg = RK808_LDO_EN_REG, .enable_mask = BIT(4), + .enable_time = 400, .owner = THIS_MODULE, }, { .name = "LDO_REG6", @@ -305,6 +310,7 @@ static const struct regulator_desc rk808_reg[] = { .vsel_mask = RK808_LDO_VSEL_MASK, .enable_reg = RK808_LDO_EN_REG, .enable_mask = BIT(5), + .enable_time = 400, .owner = THIS_MODULE, }, { .name = "LDO_REG7", @@ -319,6 +325,7 @@ static const struct regulator_desc rk808_reg[] = { .vsel_mask = RK808_LDO_VSEL_MASK, .enable_reg = RK808_LDO_EN_REG, .enable_mask = BIT(6), + .enable_time = 400, .owner = THIS_MODULE, }, { .name = "LDO_REG8", @@ -333,6 +340,7 @@ static const struct regulator_desc rk808_reg[] = { .vsel_mask = RK808_LDO_VSEL_MASK, .enable_reg = RK808_LDO_EN_REG, .enable_mask = BIT(7), + .enable_time = 400, .owner = THIS_MODULE, }, { .name = "SWITCH_REG1",