From patchwork Mon Apr 18 13:33:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 8872341 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E97B9BF29F for ; Mon, 18 Apr 2016 13:33:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0A22C20251 for ; Mon, 18 Apr 2016 13:33:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 181E520122 for ; Mon, 18 Apr 2016 13:33:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752063AbcDRNdm (ORCPT ); Mon, 18 Apr 2016 09:33:42 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:28841 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751560AbcDRNdl (ORCPT ); Mon, 18 Apr 2016 09:33:41 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O5U00K7G0C03M20@mailout1.w1.samsung.com>; Mon, 18 Apr 2016 14:33:37 +0100 (BST) X-AuditID: cbfec7f4-f796c6d000001486-8a-5714e2304162 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 1F.F7.05254.032E4175; Mon, 18 Apr 2016 14:33:36 +0100 (BST) Received: from AMDC2174.DIGITAL.local ([106.120.53.17]) by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O5U00AAZ0BX7440@eusync2.samsung.com>; Mon, 18 Apr 2016 14:33:36 +0100 (BST) From: Krzysztof Kozlowski To: Sangbeom Kim , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Lee Jones , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Bartlomiej Zolnierkiewicz Subject: [PATCH v2] regulator: s2mps11: Set default ramp delay for S2MPS11 LDOs Date: Mon, 18 Apr 2016 15:33:10 +0200 Message-id: <1460986390-9674-1-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpkluLIzCtJLcpLzFFi42I5/e/4FV2DRyLhBtO3WVhsnLGe1WLqwyds Fq9fGFrc/3qU0eLblQ4mi8u75rBZzDi/j8ni4oovTA4cHjtn3WX32LSqk83jzrU9bB59W1Yx enzeJBfAGsVlk5Kak1mWWqRvl8CVseP9QaaCRYIVs/ecZWlgbODrYuTkkBAwkTg5/S4LhC0m ceHeerYuRi4OIYGljBKNe15DOY1MErM/XGACqWITMJbYvHwJWEJEoI1JYmLfAUaQBLOAhcTW ravZQWxhAX+JvUdPgI1lEVCVmD15DhuIzSvgJjHn5Ek2iHVyEiePTWadwMi9gJFhFaNoamly QXFSeq6hXnFibnFpXrpecn7uJkZIwHzZwbj4mNUhRgEORiUe3ggGkXAh1sSy4srcQ4wSHMxK IrzzHwCFeFMSK6tSi/Lji0pzUosPMUpzsCiJ887d9T5ESCA9sSQ1OzW1ILUIJsvEwSnVwLg6 o6bUOkBGqNXaRqWyaOOTgge3l32/kbrXJk2g6p7UP0cfxpqUzYdaZjFFiTefncQtrXShQe4S i/LxqhPTHG6KXq8Nv/91xWzL9eH75z2YdmEne++TQxbdXzqyMs6k/rhbHFVR9OvlMQfp71tD X/+JMrAV/bZfdkk+c/WS0LXnb75+Ivbwv7oSS3FGoqEWc1FxIgAFVg6lFAIAAA== Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 Driver did not provide default value for ramp delay for LDOs which lead to warning in dmesg, e.g. on Odroid XU4: [ 1.486076] vdd_ldo9: ramp_delay not set [ 1.506875] vddq_mmc2: ramp_delay not set [ 1.523766] vdd_ldo15: ramp_delay not set [ 1.544702] vdd_sd: ramp_delay not set The datasheet for all the S2MPS1x family is inconsistent here and does not specify unambiguously the value of ramp delay for LDO. It mentions 30 mV/us in one timing diagram but then omits it completely in LDO regulator characteristics table (it is specified for bucks). However the vendor kernels for Galaxy S5 and Odroid XU3 use values of 12 mV/us or 24 mV/us. Without the ramp delay value the consumers do not wait for voltage settle after changing it. Although the proper value of ramp delay for LDOs is unknown, it seems safer to use at least some value from reference kernel than to leave it unset. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas --- Changes since v1: 1. Instead of removing the implementation of .set_voltage_time_sel() callback, use some value from reference kernel. --- drivers/regulator/s2mps11.c | 1 + include/linux/mfd/samsung/core.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index 64a262f10845..02fb6b4ea820 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c @@ -267,6 +267,7 @@ static struct regulator_ops s2mps11_buck_ops = { .ops = &s2mps11_ldo_ops, \ .type = REGULATOR_VOLTAGE, \ .owner = THIS_MODULE, \ + .ramp_delay = RAMP_DELAY_12_MVUS, \ .min_uV = MIN_800_MV, \ .uV_step = step, \ .n_voltages = S2MPS11_LDO_N_VOLTAGES, \ diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h index 6bc4bcd488ac..5a23dd4df432 100644 --- a/include/linux/mfd/samsung/core.h +++ b/include/linux/mfd/samsung/core.h @@ -30,6 +30,9 @@ #define MIN_600_MV 600000 #define MIN_500_MV 500000 +/* Ramp delay in uV/us */ +#define RAMP_DELAY_12_MVUS 12000 + /* Macros to represent steps for LDO/BUCK */ #define STEP_50_MV 50000 #define STEP_25_MV 25000