linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Iskren Chernev <iskren.chernev@gmail.com>
To: Bjorn Andersson <bjorn.andersson@linaro.org>,
	Mark Brown <broonie@kernel.org>
Cc: Andy Gross <agross@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	phone-devel@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht,
	Iskren Chernev <iskren.chernev@gmail.com>
Subject: [RFC PATCH 0/2] PM6125 regulator support
Date: Sat, 28 Aug 2021 14:56:52 +0300	[thread overview]
Message-ID: <20210828115654.647548-1-iskren.chernev@gmail.com> (raw)

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


             reply	other threads:[~2021-08-28 11:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-28 11:56 Iskren Chernev [this message]
2021-08-28 11:56 ` [RFC PATCH 1/2] regulator: qcom_spmi: Add PM6125 regulators Iskren Chernev
2021-08-28 11:56 ` [RFC PATCH 2/2] regulator: qcom_smd: Add PM6125 regulator support Iskren Chernev
2021-09-03 15:23   ` Mark Brown
2021-09-03 19:49     ` Iskren Chernev
2021-09-13 14:32       ` Mark Brown
2021-09-03 15:24 ` [RFC PATCH 0/2] " Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210828115654.647548-1-iskren.chernev@gmail.com \
    --to=iskren.chernev@gmail.com \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).