Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp247176imm; Thu, 12 Jul 2018 18:34:56 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdK9UZsiMJirIpoxnXYv4lrFm/V1B7hLac+ag6b5b2syfRUfX8YtJswEu+gDMl+q/66nU8g X-Received: by 2002:a63:5e45:: with SMTP id s66-v6mr4141481pgb.151.1531445696505; Thu, 12 Jul 2018 18:34:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531445696; cv=none; d=google.com; s=arc-20160816; b=1EZhmsMZ1v5USzbziID24CNO5jQFSbCtGZRl81Lr3fIuwtr1ZuZMU0jWJsjUPsWzWy URP875p/XH6pm+GhJHv0lkbfqbXj1R8tM2CVCUzsP1iT2H5Kvi8B1XTOU1vSkfl1SPmi 1SsCm2kfnHDEsfNxG3+4ZbhPU4Mzcer5sun2eb4ZeMAKK+kSulEC9q87FVFuWL8CXE8y zDH2eKCuitn0QJIw1O5KZHIHGFQniDt0I8nRZ3A3iwBVnkHZFSrN2FpgHGm9Jb6BsN3z VcFWY84/crZiH8nj4AnJ8kWrpmc8blTd4QYdtMZv09+mGBO3NtnR3gBwcgEusnljICpn jS3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=rhX1vdf7qfhy7pz2xMTWl3NiCo+3XBbTkD/+GoBW+A8=; b=wxZstkva+0uwe+pGLeS2l9+pzEG4ARKAx/eeHtiooMFhQ3TjbzQXbVZEyQA8KBCRFi DnuvqtWpFGRhpTWduZzK+3UxYk4blSgFWQd4v6QBZ30kXRHMDM0ftPMbkdjOBHQd20lh 8vF/kYPFWVJZMEaLCAYdtjLtrBFI3ahxeS6K+6MTESg/qepCrmSbCy4FUAJlSWA/orgE 6m7Q5iGlBrxQp8cFXosAEQf2+6IEsKnkO8BDce6zmgeqmX/ePHAT8se/Fy3jsfQ69Pp3 DSX7M9mR4y1J2hVImP8iAaoYJsI4HvHX1A0EVNtGdf9TbdcRiCR0VA40I5sOxr30CNSl dT3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=W7Ds9c1e; dkim=pass header.i=@codeaurora.org header.s=default header.b=SRZbKckk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u11-v6si5002388plm.143.2018.07.12.18.34.40; Thu, 12 Jul 2018 18:34:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=W7Ds9c1e; dkim=pass header.i=@codeaurora.org header.s=default header.b=SRZbKckk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387971AbeGMBqT (ORCPT + 99 others); Thu, 12 Jul 2018 21:46:19 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:58208 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387916AbeGMBqT (ORCPT ); Thu, 12 Jul 2018 21:46:19 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8FE2E60B72; Fri, 13 Jul 2018 01:34:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1531445644; bh=kxlr6AQTxvSp7Xi2YApJ0KHXD1mMqpQjyvxG9zGbDZo=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=W7Ds9c1eFBBBJtMhK5uMAEI/NiV2xFaYVHeORrVOtdZ4nxxD5m0FvMzExNfRX+dEo iyfxo+CT/taVYPnK2fPvZhFUH2kWaR+9CydEF/kI9B0IRzcowcprEkGzEXTgeSjxCE o4ORSWrp5fOBFzbp5Z4QWLlwFCK2eSLMJH2C2ZZY= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.46.160.165] (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: collinsd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6542560227; Fri, 13 Jul 2018 01:34:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1531445643; bh=kxlr6AQTxvSp7Xi2YApJ0KHXD1mMqpQjyvxG9zGbDZo=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=SRZbKckksZ+eaBYpa/vsprZP6Ht/GUKbWfNBPJibpjHTeFWHfnsD9+OY6G8P4ur6H RyTceI0e9UhIBIHI0aANRAj2zihdJ7kYSyTHiITIL155/nypADvBCwGPJKzitsG4ec xfGFLwaeYNM/Ak7nBKzNbjUB840CwKumZS58IwZ8= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 6542560227 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=collinsd@codeaurora.org Subject: Re: [PATCH v8 2/2] regulator: add QCOM RPMh regulator driver To: Mark Brown Cc: lgirdwood@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, rnayak@codeaurora.org, sboyd@kernel.org, dianders@chromium.org, mka@chromium.org References: <35c4ea70cdf5caba560fb6f40e866ee8bc456d93.1529712888.git.collinsd@codeaurora.org> <20180702102853.GI18211@sirena.org.uk> <9bbfb628-018d-2d89-257b-9cc4e716cb46@codeaurora.org> <20180712165457.GI10369@sirena.org.uk> From: David Collins Message-ID: Date: Thu, 12 Jul 2018 18:34:02 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20180712165457.GI10369@sirena.org.uk> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/12/2018 09:54 AM, Mark Brown wrote: > On Mon, Jul 09, 2018 at 04:44:14PM -0700, David Collins wrote: >> On 07/02/2018 03:28 AM, Mark Brown wrote: >>> On Fri, Jun 22, 2018 at 05:46:14PM -0700, David Collins wrote: >>>> +static unsigned int rpmh_regulator_pmic4_ldo_of_map_mode(unsigned int mode) >>>> +{ >>>> + static const unsigned int of_mode_map[RPMH_REGULATOR_MODE_COUNT] = { >>>> + [RPMH_REGULATOR_MODE_RET] = REGULATOR_MODE_STANDBY, >>>> + [RPMH_REGULATOR_MODE_LPM] = REGULATOR_MODE_IDLE, >>>> + [RPMH_REGULATOR_MODE_AUTO] = REGULATOR_MODE_INVALID, >>>> + [RPMH_REGULATOR_MODE_HPM] = REGULATOR_MODE_FAST, >>>> + }; > >>> Same here, based on that it looks like auto mode is a good map for >>> normal. > >> LDO type regulators physically do not support AUTO mode. That is why I >> specified REGULATOR_MODE_INVALID in the mapping. > > The other question here is why this is even in the table if it's not > valid (I'm not seeing a need for the MODE_COUNT define)? I thought that having a table would be more concise and easier to follow. I can change this to a switch case statement. Take care, David -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project