Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3855451pxb; Fri, 11 Feb 2022 09:10:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJzZi6R9QMPw7dITRdnXLUSrscbXjzLTy+QLMe+Bl3+Eca4CEaocGtEIDTJ8y6ZjsQmal326 X-Received: by 2002:a17:907:1c8a:: with SMTP id nb10mr2212997ejc.273.1644599455523; Fri, 11 Feb 2022 09:10:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644599455; cv=none; d=google.com; s=arc-20160816; b=aWpeSLehkb8eDqiJfwHQ7qz9twMTw3wSj/o8kZGOxMMjzxXB3h4Rnn8BkTV5LywUFY 3paqb70VeOaGrZywBzid4itsAN07cGKc8ADg+M1wxaZ/h7gxpd9ehPJjviyIF0UsOtTb T5QTFkLUSGEMCScIImpXXPDWPbUvdKV/SoG97DFkc7ihhZXhQha5i84BeSUaT7jsuAcU L0t6y8Bk07AqJ61GlPaKdZMaAXsEW6Z9ARcK3JErl8RodF7ycWNinIi6+bLZPj++elSl vKusfPCaG9W5lz7cTqKJkLtJCTXmw1dsz2C/iwEYcx1gei0d3eesbQyxdLY9C0NyNT9G gREw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=LeB8V2BK2eGUygILietSQ0lBWhPLWz2Zfy8r2Lh8pkU=; b=emUthjNAf/deXOuyHjPBs2vKvJGvf+VxfAatM8RYNxQi9+V1Q405BN6aDh+vbSOffB szVQVh2MTwEmCF2LZZVi2fayKqhDZMn7zHaQSeWJTCLo4jxkmbi4iWUQpmzp3RQj52aB 9XybQFMz6bHWcSI4M72mS+CD3zE5EtiRTGQLGpZHZEqOJdZd77cMPrfFRFOYVnIbMUFo Bz2YK+lu9VGZd3GiANKQPGCtvsTdUe6VRRRrQV//Dw0pCQrJ35ltIIA/2ximOj9IctGK xcKmMWctoASoNWvVjtVA1v5IlVYGYbEa9/Xx7wDLHL8jlZEu971YbyM62xmHaYzEAZw4 DtoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=uU2a3HNM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sb25si6641223ejc.166.2022.02.11.09.10.23; Fri, 11 Feb 2022 09:10:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=uU2a3HNM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237011AbiBKOsY (ORCPT + 99 others); Fri, 11 Feb 2022 09:48:24 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:44498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235874AbiBKOsX (ORCPT ); Fri, 11 Feb 2022 09:48:23 -0500 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E034FE; Fri, 11 Feb 2022 06:48:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1644590901; x=1676126901; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=LeB8V2BK2eGUygILietSQ0lBWhPLWz2Zfy8r2Lh8pkU=; b=uU2a3HNMXyuGQXzPvcumwvZVWB/tRa+KyQvn+U5ekhA8V4BmZK+VpduS UEWpWqPCL2gVSd006KaNoCXlqW6wgTl3xC6exQgC4Y4/bY24js3Se+qTQ O3UEYXXU+sYWjX+wXJbdS8RoBXnJbyT+wco3JjQ6+eKmVTGRkvOHHfLRQ g=; Received: from unknown (HELO ironmsg02-sd.qualcomm.com) ([10.53.140.142]) by alexa-out-sd-01.qualcomm.com with ESMTP; 11 Feb 2022 06:48:21 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg02-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Feb 2022 06:48:20 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Fri, 11 Feb 2022 06:48:20 -0800 Received: from [10.216.7.73] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Fri, 11 Feb 2022 06:48:14 -0800 Subject: Re: [PATCH V5 4/6] regulator: Add a regulator driver for the PM8008 PMIC To: Matti Vaittinen , Bjorn Andersson , Rob Herring , "Krzysztof Kozlowski" CC: Lee Jones , Liam Girdwood , Mark Brown , Das Srinagesh , , , , , , , References: <1644331940-18986-1-git-send-email-quic_c_skakit@quicinc.com> <1644331940-18986-5-git-send-email-quic_c_skakit@quicinc.com> <828ffa4e-d098-071f-1b5f-3bf414c0ed80@gmail.com> From: "Satya Priya Kakitapalli (Temp)" Message-ID: <654f9808-9787-cbbb-8f27-219aeea4024d@quicinc.com> Date: Fri, 11 Feb 2022 20:18:09 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <828ffa4e-d098-071f-1b5f-3bf414c0ed80@gmail.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Matti, Thanks for reviewing the patches! On 2/11/2022 4:31 PM, Matti Vaittinen wrote: > Hi Satya, > > It's always nice to see new PMIC drivers :) I just one question after > reading your patch - please ignore it if it has already been discussed > before - for some reason this version was caught by my filters where > the previous versions didn't. It means I do not know the full history. > On 2/8/22 16:52, Satya Priya wrote: >> Qualcomm Technologies, Inc. PM8008 is an I2C controlled PMIC >> containing 7 LDO regulators.  Add a PM8008 regulator driver to >> support PMIC regulator management via the regulator framework. >> >> Signed-off-by: Satya Priya >> --- > > snip > >> + >> +static int pm8008_regulator_of_parse(struct device_node *node, >> +            const struct regulator_desc *desc, >> +            struct regulator_config *config) >> +{ >> +    struct pm8008_regulator *pm8008_reg = config->driver_data; >> +    int rc; >> +    unsigned int reg; >> + >> +    /* get slew rate */ >> +    rc = regmap_bulk_read(pm8008_reg->regmap, >> +            LDO_STEPPER_CTL_REG(pm8008_reg->base), ®, 1); >> +    if (rc < 0) { >> +        dev_err(pm8008_reg->dev, >> +            "%s: failed to read step rate configuration rc=%d\n", >> +            pm8008_reg->rdesc.name, rc); >> +        return rc; >> +    } >> +    reg &= STEP_RATE_MASK; >> +    pm8008_reg->step_rate = DEFAULT_VOLTAGE_STEPPER_RATE >> reg; >> + >> +    return 0; >> +} > > I wonder why this is done in the of_parse_cb? Could this perhaps be > done directly in probe - I don't think this is actually parsing the > device_node properties, right? > Right, I will move this part to probe. In the previous version there was some code here which did the DT parsing, now that I removed all that, I should move this to probe. Thanks, Satya Priya > Overall this looks pretty nice to me. > > Best Regards >     -- Matti >