Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp4041308pxb; Fri, 11 Feb 2022 13:44:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJzPDERBo3EWuRukaj1mGqbqqy/QpDI+emLYT5WkF8Ljvp/C2S9qe2B0R2AeMoT1iZC3gqw4 X-Received: by 2002:a17:907:7da3:: with SMTP id oz35mr308438ejc.144.1644615892164; Fri, 11 Feb 2022 13:44:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644615892; cv=none; d=google.com; s=arc-20160816; b=b8rj1DuRum6Fy2UQLhDm3gPSiFptG80KXD6qQ/8JXB75wJCJ31MHiZRDqLqbl5yD9b L/CamDoiAAnZewFmD+vhQ7WVWVkLNUrmOjvdTfkWN4ay5ndVKXWRYrSbSHfKw+kgIVPk DQEWVuPSJ8F0l8UVctLieRdwlQ5f3IPUtcctL+RGOfDcG1kEn+tAuiEXzPRRYCkwbUoa MSRGbeEU1Kvx8Z3vhK7MKc6Vk6/MFWb8ihBQiXezDPy1djiCmL4IZZFheBhvaixT7kzS tsBoe80ebOIMjcFjPIN3bPvn17xq55dmfZ2Mwnr9joEt/NPnc7Bb3gvltrTW6AHCmvpq n03w== 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=VSQeArOnGdl7FcIKdua2NdAwZTNifoQ+KWawkwDJKbI=; b=VebslHHqEAo/zDfT3k4jiEoLqQUvlkZ2KnHKEcT8Kv1LW24DAZS9ITqYeFP2B72Fjn o4y9NPm6w34Pj+OAtEGE2T2TOfoVWfQobKmotPG3oD410tK003wQlseUfPv4T9bKJqiz q4SLzQvuN4kBTvMyV9+aUA2gNQEy5FhQEX8FcCqrROLmQUvLdkvKJSQEYKAytmyaoc1G U8KWqbyhXW1yHBTyh7YssUilNdYb7t5UzVBRHxx7I5NncV5hfcseEWpA+J3O44IoJF0l aPBf+tqx2D4ZFuACdqxg+refpHrZeotYzU9gn9giUXARBWGZ40MluQt1eAAzrhXEx7VQ PZUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b="Ic9/BJZX"; 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 h7si17294017edb.418.2022.02.11.13.44.28; Fri, 11 Feb 2022 13:44:52 -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="Ic9/BJZX"; 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 S1349100AbiBKKgF (ORCPT + 99 others); Fri, 11 Feb 2022 05:36:05 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:32806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349053AbiBKKfW (ORCPT ); Fri, 11 Feb 2022 05:35:22 -0500 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 714A6F1D; Fri, 11 Feb 2022 02:35:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1644575716; x=1676111716; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=VSQeArOnGdl7FcIKdua2NdAwZTNifoQ+KWawkwDJKbI=; b=Ic9/BJZX6iXH/PYtts4WOYLxPs5OyF4rnJMJ8Jk+EJXOWNMaAyn8C2xF uzWV6SiRVJ6+wR+YNX6LSiHCJdFLQ5BAfNDjv3BO4FqMfAeJ4i/rzFbo/ kjH+cZb2trPf6ZlRiXhV5toyFU0LqpvxJ4Zzk40o4A+BQKA604t1uOF+S U=; Received: from ironmsg08-lv.qualcomm.com ([10.47.202.152]) by alexa-out.qualcomm.com with ESMTP; 11 Feb 2022 02:35:16 -0800 X-QCInternal: smtphost Received: from nalasex01a.na.qualcomm.com ([10.47.209.196]) by ironmsg08-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Feb 2022 02:35:15 -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 02:35:10 -0800 Subject: Re: [PATCH V5 4/6] regulator: Add a regulator driver for the PM8008 PMIC To: Bjorn Andersson CC: Rob Herring , Krzysztof Kozlowski , 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> From: "Satya Priya Kakitapalli (Temp)" Message-ID: <653bc533-8dca-cd9c-3ca0-d5628da37f4a@quicinc.com> Date: Fri, 11 Feb 2022 16:05:07 +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: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit 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 On 2/11/2022 6:27 AM, Bjorn Andersson wrote: > On Tue 08 Feb 08:52 CST 2022, Satya Priya wrote: >> diff --git a/drivers/regulator/qcom-pm8008-regulator.c b/drivers/regulator/qcom-pm8008-regulator.c > [..] >> +static int pm8008_regulator_probe(struct platform_device *pdev) >> +{ >> + struct device *dev = &pdev->dev; >> + int id = pdev->id % PM8008_NUM_LDOS; > Why does this driver look completely different from all the other > Qualcomm regulator drivers that we already have, and why do you register > one platform_device per regulator? Based on Mark's suggestions and the discussion happened here [1], I've changed the design like this. [1] https://patchwork.kernel.org/project/linux-arm-msm/patch/1637314953-4215-3-git-send-email-quic_c_skakit@quicinc.com/ > The fundamental difference in design makes it hard to maintain and > you're wasting quite a bit of memory with the unnecessary > platfrom_device objects. I'm going to change this. I will add only one cell with .name to match with the regulator driver and probe all the regulators using a single loop. That way we don't waste lot of memory by registering multiple regulator platform devices. > Regards, > Bjorn