From: Jonathan Cameron <jic23@kernel.org>
To: 杨明金 <magicyangmingjin@gmail.com>
Cc: Mingjin Yang <mingjin.yang@unisoc.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Ling_Ling.Xu@unisoc.com, Jinfeng.Lin1@unisoc.com,
Yangbin.Li@unisoc.com, Jiansheng.Wu@unisoc.com,
Orson Zhai <orsonzhai@gmail.com>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
Chunyan Zhang <zhang.lyra@gmail.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH V0 2/2] iio: adc: sprd_pmic_adc: Add support for UMP serise pmic adc
Date: Sun, 10 Sep 2023 14:57:06 +0100 [thread overview]
Message-ID: <20230910145706.7cae84aa@jic23-huawei> (raw)
In-Reply-To: <CAKJtOf6N0P9Phqsm-2B1p1kCZ+Tezz3rZ8muLzAvXQoi=QFCtg@mail.gmail.com>
On Tue, 5 Sep 2023 10:59:33 +0800
杨明金 <magicyangmingjin@gmail.com> wrote:
> > > > > +static int sprd_adc_enable(struct sprd_adc_data *data, int channel)
> > > > > +{
> > > > > + int ret = 0;
> > > > > + u32 reg_read = 0;
> > > > > +
> > > > > + if (data->pm_data.clk_regmap) {
> > > > > + ret = regmap_update_bits(data->pm_data.clk_regmap, data->pm_data.clk_reg,
> > > > > + data->pm_data.clk_reg_mask,
> > > > > + data->pm_data.clk_reg_mask);
> > > > > + ret |= regmap_read(data->pm_data.clk_regmap, data->pm_data.clk_reg, ®_read);
> > > > > + if (ret) {
> > > > > + dev_err(data->dev, "failed to enable clk26m, channel %d\n", channel);
> > > > > + return ret;
> > > > > + }
> > > > > + dev_dbg(data->dev, "enable clk26m: ch %d, reg_read 0x%x\n", channel, reg_read);
> > > >
> > > > Directly accessing the regmap of a clock seems unusual. Why not provide generic clock interfaces
> > > > for this?
> > >
> > > This register is used to vote to enable/disable the pmic 26m clk which
> > > is provided to modules like audio, typec and adc.
> > > Therefore, this clk cannot be disabled or enabled directly.
> >
> > clk_enable() and friends support reference counted enable and disable
> > so I don't understand why this needs something unusual.
>
> Through communication with internal clk colleagues,
> I learned that this register is not a traditional eb register,
eb?
Sorry, I'm not familiar with the term.
> so the current clk driver is not configured to support this.
>
> Jonathan Cameron <jic23@kernel.org> 于2023年9月3日周日 19:14写道:
> >
> > On Wed, 30 Aug 2023 15:15:12 +0800
> > 杨明金 <magicyangmingjin@gmail.com> wrote:
> >
prev parent reply other threads:[~2023-09-10 13:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-16 8:02 [PATCH V0 0/2] Add support for UMP serise pmic adc Mingjin Yang
2023-08-16 8:02 ` [PATCH V0 1/2] dt-bindings: iio: adc: Add support for ump518 " Mingjin Yang
2023-08-16 14:44 ` Conor Dooley
2023-08-28 14:40 ` Jonathan Cameron
2023-08-16 8:02 ` [PATCH V0 2/2] iio: adc: sprd_pmic_adc: Add support for UMP serise " Mingjin Yang
2023-08-16 14:07 ` kernel test robot
2023-08-28 14:38 ` Jonathan Cameron
2023-08-28 15:57 ` Jonathan Cameron
2023-08-30 7:15 ` 杨明金
2023-09-03 11:14 ` Jonathan Cameron
2023-09-05 2:59 ` 杨明金
2023-09-10 13:57 ` Jonathan Cameron [this message]
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=20230910145706.7cae84aa@jic23-huawei \
--to=jic23@kernel.org \
--cc=Jiansheng.Wu@unisoc.com \
--cc=Jinfeng.Lin1@unisoc.com \
--cc=Ling_Ling.Xu@unisoc.com \
--cc=Yangbin.Li@unisoc.com \
--cc=baolin.wang@linux.alibaba.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=magicyangmingjin@gmail.com \
--cc=mingjin.yang@unisoc.com \
--cc=orsonzhai@gmail.com \
--cc=robh+dt@kernel.org \
--cc=zhang.lyra@gmail.com \
/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).