Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Hsin-hsiung Wang <hsin-hsiung.wang@mediatek.com>
To: Axel Lin <axel.lin@ingics.com>
Cc: Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	<linux-mediatek@lists.infradead.org>, <fan.chen@mediatek.com>
Subject: Re: regulator: mt6358 vdram2_idx/vsel_mask/ vsel_shift setting seems wrong
Date: Wed, 23 Jun 2021 13:02:47 +0800	[thread overview]
Message-ID: <1624424567.1145.0.camel@mtksdaap41> (raw)
In-Reply-To: <CAFRkauDjKaEmtEoUH94wkT0Xd9-XL3NOYyvB3haYVT+BrAK-Dw@mail.gmail.com>

Hi, Axel sir
After checking the spec, the vsel_mask is wrong.
I submit a patch to fix it.
Many thanks for the correcting. :)

On Tue, 2021-06-22 at 11:20 +0800, Axel Lin wrote:
> Hi Hsin-Hsiung,
> 
> In drivers/regulator/mt6358-regulator.c:
> 
> static const u32 vdram2_idx[] = {
>         0, 12,
> };
> 
> MT6358_LDO("ldo_vdram2", VDRAM2, vdram2_voltages, vdram2_idx,
>            MT6358_LDO_VDRAM2_CON0, 0, MT6358_LDO_VDRAM2_ELR0, 0x10, 0),
> 
> With current setting the vsel_mask does not match the vsel_shift setting
>    So in set_voltage_sel, it will call regmap_update_bits with
>    mask = 0x10
>    val = idx << 0
>    No matter idx is 0 (pvol[0]) or 12 (pvol[1]), it will clear vsel_mask bits
> 
> I don't have the datasheet to check, so please help to double check the
> vdram2_idx, vsel_mask and vsel_shift settings for ldo_vdram2.
> I think at least one of the settings is wrong.
> 
> Regards,
> Axel

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

      reply	other threads:[~2021-06-23  5:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-22  3:20 regulator: mt6358 vdram2_idx/vsel_mask/ vsel_shift setting seems wrong Axel Lin
2021-06-23  5:02 ` Hsin-hsiung Wang [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=1624424567.1145.0.camel@mtksdaap41 \
    --to=hsin-hsiung.wang@mediatek.com \
    --cc=axel.lin@ingics.com \
    --cc=broonie@kernel.org \
    --cc=fan.chen@mediatek.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    /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