Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2111104pxb; Sat, 28 Aug 2021 04:59:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKVYOvjWYNiXKb9U+9BXXOe08KVRMiuLDHJMT7CtmzWuEMuQlBhK5ZHH/N7ysC0ApTW2vE X-Received: by 2002:a17:906:2ac1:: with SMTP id m1mr15228599eje.518.1630151992652; Sat, 28 Aug 2021 04:59:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630151992; cv=none; d=google.com; s=arc-20160816; b=O6Awy6F3AvArTuXQaQmxyxpTEw618rpRi4LF4nZecQI2TDX/4Ivn0BHTy7f5kG24eR vmqWXxat1ZYb68ivsSnCKUn4E0AfY9YSJEPbGq1/csoXotJlhMorPKbjtpDV7WuXIkPj 9Xj/7PT2EDEtBO+cOqnqrRE6SnUE2fk8MqW5M9MNhb0gMtnOKpqb2ACJx0dG/UU5T5x9 MbxyI/J6MzTnPLMztaPQpEqV5aDKFBCHBCq7PCBgLi4Z9vJ+MKaiWyUOjoK8RDT1zZ3i s9LIIi/6I3MhMxgAT/fT3/cVZ/NrzhTAkoOr5IZ6UsatIbHsBNMwwOlCXpsQIC1IEbm2 x4hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=4/LquTxgB8yeywkZTQuKhulBY+lQnXOj7io3Z67t10Y=; b=vW7s6qC2G4KmRcWONN+GyCR4iKHlYFx0g2Zw6pHSXZzQSwE0aocbgShwfEQ/hdR9X7 3KPL3HQveH7/g0Hr7knJd+zDdLc9tztLwfYMsXMtfK0bOr1P4ewBEEKOhdVNlHD2FVZx 2EMGxDYI4ZCXY9BElAOCAbj9mgSFbMVzG3VNiviWzmpnOVlgdQ2EryjlQdjtCUoQkZU/ vGe4nNM9yHONFbAJgXk/mSMn6lfsREoS8RVL2ippm4mLBQXvmSGXzk6XHmQ8ofBUP1GB 3LHS+u/Ij8K5uj+qHiHhD0RuwMWq03wOiYwVP5QISccv7Jw70Quyja1yfCfNXOalfkTc BxSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jJ6N5B8n; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p10si8782296ejl.495.2021.08.28.04.59.11; Sat, 28 Aug 2021 04:59:52 -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=pass header.i=@gmail.com header.s=20161025 header.b=jJ6N5B8n; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234070AbhH1L56 (ORCPT + 99 others); Sat, 28 Aug 2021 07:57:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233892AbhH1L5z (ORCPT ); Sat, 28 Aug 2021 07:57:55 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90298C061756; Sat, 28 Aug 2021 04:57:04 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id bt14so19876744ejb.3; Sat, 28 Aug 2021 04:57:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4/LquTxgB8yeywkZTQuKhulBY+lQnXOj7io3Z67t10Y=; b=jJ6N5B8nZJYrgv14X639TtTc+V0pYIKpisTfjba63zWBD32UtdLbN3CSTZUOV0Tfoi X85zp3sQmAoS3NRMC45C5LCeDp/OGyJHmBgAUwzKrOVGpcaSh2r1KKQ7R/amh/frMUns Gvxq8aEvjBDqj2bmZli4If9y7gurfh4Z1omctVQM01Qb8X3lZqFrNkTlctLZ4jcAzx5W zzFzYyU1oDInh+NNkA6Zs3PHwO2jw3N7TPCo7KKqWhtQ39qd+u8DHl7ssj+KEnd/wqPs 1bVPzyPRkk7ke0t2kYE/Po1J8xQHmcMsJeSi6adej8nTNUEQPtonqOgOCC0TQ8Ddixp0 rubg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4/LquTxgB8yeywkZTQuKhulBY+lQnXOj7io3Z67t10Y=; b=EEef2trVeq3NLqnYu/XGIQKkGanr/Ed3APCRf3ZhT7gz5WYLIkO4bA3c716DCQLAqv tU1hhXvef+Dggq0MILS3OaPhTArA++I4L+BeLu6w0ztgZsjuzXkU874zt+sIOq7ricKw BBBIizpo/uqoWgXRFG6mYP+3BH7N3bytf8OXqTyGa+p1SEtSylXD923TgraLf5lrcZjs tU57TwrdcxYzOaPSstvLjEtt4wpeXNpS3OJPj/Vb2ieJbCVNuVzCpyyMQRB5NtIPyn/L OCHSk3onW/QmEOqpe22KMlePvNMbsNLEKTHCTuY0Fid0MbAblAhbAZt+kFws0kPeNi3/ u7ww== X-Gm-Message-State: AOAM531LeadA0R7UiS1juTM17ALn8/iMBbKSCgHduR9DnB9HP7exUjZ9 Cf++A2YsksMxFC8u7EVyHTs= X-Received: by 2002:a17:906:7250:: with SMTP id n16mr14922055ejk.147.1630151823031; Sat, 28 Aug 2021 04:57:03 -0700 (PDT) Received: from localhost (178-169-161-196.razgrad.ddns.bulsat.com. [178.169.161.196]) by smtp.gmail.com with ESMTPSA id h19sm4183215ejt.46.2021.08.28.04.57.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 28 Aug 2021 04:57:02 -0700 (PDT) From: Iskren Chernev To: Bjorn Andersson , Mark Brown Cc: Andy Gross , Liam Girdwood , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Iskren Chernev Subject: [RFC PATCH 0/2] PM6125 regulator support Date: Sat, 28 Aug 2021 14:56:52 +0300 Message-Id: <20210828115654.647548-1-iskren.chernev@gmail.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series adds SPMI and SMD regulator support for the PM6125 found on SM4250/SM6115 SoCs from QCom. The main source used for this change is qpnp pm6125 support patch from caf [1]: [1]: https://source.codeaurora.org/quic/la/kernel/msm-5.4/commit/?h=kernel.lnx.5.4.r1-rel&id=d1220daeffaa440ffff0a8c47322eb0033bf54f5 Unfortunatelly the source patch doesn't contain regulator source groups, so all regulators define their own source. If that was available (suggestions are welcome), this patch could become acceptable. While at it I have a few suggestions: - spmi determines how to treat each regulator based on type,subtype,revision read from regulator register. I assume this information is fixed for a givem PM chip. It would be really helpful if it was available somewhere in code (comment) or maybe the commit message, so correct voltage range and ops can be determined without firing up an actual device and extracting that info. I've included this info in the spmi commit message in patch 1/2. - according to caf source, there are 3 general revisions of regs/ops, called common, common2, common3. I think this is cleaner than picking the first regulator name from the new generation and naming ops/regs on it. For example ftsmps426 functions/regs are common2 in caf, and my patch introduces common3 (named ftsmps3). About correctness: - spmi patch was compile-tested - rpm/smd patch was tested (voltage ranges come from spmi+type/subtype info) Iskren Chernev (2): regulator: qcom_spmi: Add PM6125 regulators regulator: qcom_smd: Add PM6125 regulator support drivers/regulator/qcom_smd-regulator.c | 46 +++++++ drivers/regulator/qcom_spmi-regulator.c | 160 +++++++++++++++++++++++- 2 files changed, 204 insertions(+), 2 deletions(-) base-commit: 5e63226c72287bc6c6724d4fc7e157af0e3d7908 -- 2.33.0