Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2168565ybt; Mon, 15 Jun 2020 21:31:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzs3g8nD2AWVaEAY02HlUebn/WvlIL3cNUbaQd3HxCd0Gz5CM9f86Q63tVpDjo5e02C6xJr X-Received: by 2002:aa7:c3d7:: with SMTP id l23mr886800edr.264.1592281907781; Mon, 15 Jun 2020 21:31:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592281907; cv=none; d=google.com; s=arc-20160816; b=xTHMxoBRgzMezbQ57sinG2daNgcUFTae+XKuAixLF/LSu9Ly1wPg8abb0ewmUOXYi4 LvbWeAV1/F54CrNX9xPAkJXEBEEfceslMrDAgyKVSysdIa6osGNmUaCsBtWGrvLrKlIt I/WaAY5ml59erheH+7LCq3nC23xyG/fG4lBfVuuY0z7JkGj77aB71cIb/pMhJ+tN2NSH MGqWn6oheF+MP2qbPHI0n5LfG2mv4o3yeNSTn3LQ5/uavedb35jQTN551CynDozLNKjY N5/d3HNUwthPgYOdiGT51TfbSotFKvFUt4aMBrZBmhzGObATvg5gs5VhLSMtRwqSp29x l9Cg== 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; bh=gGj1AtaJzmAOYRDgt6sxpRjS45WebWT4WO2xGcv/aok=; b=L7P8E9fAiozDHT/0E6jrUJBDz5xsGhPSzIxRqS8fVqy4efTurOZQKlFcpRqFaSSwch CVm/MPe6wK4jzJJa0vAflNm1rOEArVDYKyyrQz0SLWiolGzOxzBXe57VWDpllhkH5UlV 5udD033A6kkQcL6xe5GdKThInzV9LZSAEI5LqbIPuY/FmKEcmT+3obMc912dAzD48wt3 ls7R/DJLQLSt/u1bUvSrK6BruF1/BIzn58KJyMnh7L5wQ9YRfPEA7og+j++vxpMNO1lu R+cnV6ajfH6JARKTiNc6+SnZy2vEWCEMSIyL9oP2wgQNlp9JLUIfWs9gmAB7DFU29cSE /tAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=hddA91om; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j11si9902774edp.371.2020.06.15.21.31.25; Mon, 15 Jun 2020 21:31:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=hddA91om; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726476AbgFPE1f (ORCPT + 99 others); Tue, 16 Jun 2020 00:27:35 -0400 Received: from mail27.static.mailgun.info ([104.130.122.27]:56513 "EHLO mail27.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725928AbgFPE1e (ORCPT ); Tue, 16 Jun 2020 00:27:34 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1592281654; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: Cc: To: Subject: Sender; bh=gGj1AtaJzmAOYRDgt6sxpRjS45WebWT4WO2xGcv/aok=; b=hddA91omBB8o3QKAfdj2XyiYL0JV8OO/4MWqipEmQm+cNCceN7S8MbBkE5ihDYbkF+CiFAVF ovSA9lC0nswcPURgiJjB3OQ7fq2A7/73xTDNh5s0p7NU43X3/r+NYN5LSqb/cOBC7bySpQLd OkCGghmdRiqjeBa/v+o/rnOxV7w= X-Mailgun-Sending-Ip: 104.130.122.27 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n03.prod.us-east-1.postgun.com with SMTP id 5ee84a1fc4bb4f886d2824fd (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 16 Jun 2020 04:27:11 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id B57A1C433AD; Tue, 16 Jun 2020 04:27:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from [10.110.37.174] (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: wcheng) by smtp.codeaurora.org (Postfix) with ESMTPSA id A508EC433CA; Tue, 16 Jun 2020 04:27:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org A508EC433CA Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=wcheng@codeaurora.org Subject: Re: [PATCH v2 4/6] regulator: Add support for QCOM PMIC VBUS booster To: Mark Brown Cc: robh+dt@kernel.org, heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, mark.rutland@arm.com, lgirdwood@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org, lijun.kernel@gmail.com, rdunlap@infradead.org, jackp@codeaurora.org, bryan.odonoghue@linaro.org References: <20200612231918.8001-1-wcheng@codeaurora.org> <20200612231918.8001-5-wcheng@codeaurora.org> <20200615120018.GI4447@sirena.org.uk> From: Wesley Cheng Message-ID: Date: Mon, 15 Jun 2020 21:27:08 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: <20200615120018.GI4447@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 6/15/2020 5:00 AM, Mark Brown wrote: > On Fri, Jun 12, 2020 at 04:19:16PM -0700, Wesley Cheng wrote: > >> +++ b/drivers/regulator/qcom_usb_vbus-regulator.c >> @@ -0,0 +1,147 @@ >> +// SPDX-License-Identifier: GPL-2.0-only >> +/* >> + * Copyright (c) 2020, The Linux Foundation. All rights reserved. >> + */ > > Please make the entire comment a C++ one so things look more > intentional. > Hi Mark, Sure, will do. >> +static int qcom_usb_vbus_enable(struct regulator_dev *rdev) >> +{ > >> +static int qcom_usb_vbus_disable(struct regulator_dev *rdev) >> +{ > >> +static int qcom_usb_vbus_is_enabled(struct regulator_dev *rdev) >> +{ > > These operations can all be replaced by regulator_is_enabled_regmap() > and friends. > Got it. This simplifies the driver a lot. Thanks for the tip. >> + init_data.constraints.valid_ops_mask |= REGULATOR_CHANGE_STATUS; > > No, this is broken - regulators should not override the constraints the > machine sets. > Understood. I decided to go with of_get_regulator_init_data() to initialize the init_data parameter. This should take care of the constraint settings. -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project