From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9B21C433E7 for ; Thu, 15 Oct 2020 15:39:57 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 69D7D22248 for ; Thu, 15 Oct 2020 15:39:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ig4FYG5T" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 69D7D22248 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZCWri9bCGho1eEdwyj+SAMWDr8Ia5EW23eF6j3T/rTY=; b=Ig4FYG5T43DW7bWHmO/dl9g0y ZwrT+V2KdQivd98pdzUEH1NYG510+m6JdaFH5JSEp2mz3npGofHf6BHaaY33UdNlCAkiIPgZ1Scrh sZYmPTOcrdRL2lECgu0jUATYvCRB/haxRbthih1X2dnHH6Co5zTqqCl05RTC2iDsixOlgWfKZugd4 d/oy4NnmTtpVgcGBb2kfaq3WAnnWu3I4tuQm7elOLUSRNzizrSPM762f52Nkp/kcfczqA2PbyNcIy 94dtLzi0YlLSB+zMxasom4ajgh/09xrxVqlmY3YytOfrAqpYKta3k0J3SpenOXvq/MS7BbQqPbLwS Ifu+XHE4A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kT5Kn-0002Us-57; Thu, 15 Oct 2020 15:38:29 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kT5Kk-0002Ty-Bf for linux-arm-kernel@lists.infradead.org; Thu, 15 Oct 2020 15:38:27 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CCE5613D5; Thu, 15 Oct 2020 08:38:21 -0700 (PDT) Received: from e120937-lin (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6FE803F719; Thu, 15 Oct 2020 08:38:20 -0700 (PDT) Date: Thu, 15 Oct 2020 16:38:18 +0100 From: Cristian Marussi To: Mark Brown Subject: Re: [PATCH 3/4] regulator: add SCMI driver Message-ID: <20201015153818.GD34395@e120937-lin> References: <20201005222623.1123-1-cristian.marussi@arm.com> <20201005222623.1123-4-cristian.marussi@arm.com> <20201006105637.GB5259@sirena.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201006105637.GB5259@sirena.org.uk> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201015_113826_449436_EFF7EB2F X-CRM114-Status: GOOD ( 18.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robh@kernel.org, satyakim@qti.qualcomm.com, sudeep.holla@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, james.quinlan@broadcom.com, Jonathan.Cameron@Huawei.com, etienne.carriere@linaro.org, lukasz.luba@arm.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi sorry for the late reply. On Tue, Oct 06, 2020 at 11:56:37AM +0100, Mark Brown wrote: > On Mon, Oct 05, 2020 at 11:26:22PM +0100, Cristian Marussi wrote: > > > - .get_voltage / .set_voltage: routed via SCMI Voltage Domain Protocol > > - .get_voltage_sel/.set_voltage_sel: using regulator framework helpers > > You should not be implementing both of these interfaces, pick one. It > looks like the direct voltage operations are the redundant ones here, > while the protocol uses actual voltages to communicate with the firmware > which makes the direct voltage operations a better fit it seems like the > expectation is that only a limited set of voltages is supported (as is > normal for the underlying physical regulators) so you want selectors. > I'm dropping non _sel methods in V2. > > + sreg->name = devm_kasprintf(dev, GFP_KERNEL, "%s", vinfo->name); > > + sreg->desc.name = devm_kasprintf(dev, GFP_KERNEL, > > + "Vscmi.%s", sreg->name); > > + if (!sreg->name || !sreg->desc.name) > > + return -ENOMEM; > > Why are we using different names here? > Not really a good reason...dropping internal name and "Vscmi" prefix in V2. > > + num_doms = handle->voltage_ops->num_domains_get(handle); > > + if (num_doms <= 0) { > > + dev_err(&sdev->dev, "number of voltage domains invalid\n"); > > + return num_doms ?: -EINVAL; > > Please write normal conditional statements to improve legibility. Ok. Thanks Cristian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel