From: henryc.chen@mediatek.com (Henry Chen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V4 09/11] soc: mediatek: PMIC wrap: add a slave specific struct
Date: Mon, 1 Feb 2016 16:38:01 +0800 [thread overview]
Message-ID: <1454315881.2134.4.camel@mtksdaap41> (raw)
In-Reply-To: <56AF167C.5030501@openwrt.org>
On Mon, 2016-02-01 at 09:25 +0100, John Crispin wrote:
>
> On 28/01/2016 03:37, Henry Chen wrote:
> > Hi John,
> >
> > On Wed, 2016-01-27 at 12:29 +0100, John Crispin wrote:
> >
> >> @@ -746,7 +786,7 @@ static int pwrap_init(struct pmic_wrapper *wrp)
> >> pwrap_writel(wrp, 1, PWRAP_DIO_EN);
> >>
> >> /* Read Test */
> >> - pwrap_read(wrp, PWRAP_DEW_READ_TEST, &rdata);
> >> + pwrap_dew_read(wrp, PWRAP_DEW_READ_TEST, &rdata);
> >> if (rdata != PWRAP_DEW_READ_TEST_VAL) {
> >> dev_err(wrp->dev, "Read test failed after switch to DIO mode: 0x%04x != 0x%04x\n",
> >> PWRAP_DEW_READ_TEST_VAL, rdata);
> >> @@ -759,12 +799,13 @@ static int pwrap_init(struct pmic_wrapper *wrp)
> >> return ret;
> >>
> >> /* Signature checking - using CRC */
> >> - if (pwrap_write(wrp, PWRAP_DEW_CRC_EN, 0x1))
> >> + if (pwrap_dew_write(wrp, PWRAP_DEW_CRC_EN, 0x1))
> >> return -EFAULT;
> >>
> >> pwrap_writel(wrp, 0x1, PWRAP_CRC_EN);
> >> pwrap_writel(wrp, 0x0, PWRAP_SIG_MODE);
> >> - pwrap_writel(wrp, PWRAP_DEW_CRC_VAL, PWRAP_SIG_ADR);
> >> + pwrap_writel(wrp, wrp->slave->dew_regs[PWRAP_DEW_CRC_VAL],
> >> + PWRAP_SIG_ADR);
> >
> > It should be "pwrap_dew_write(wrp, PWRAP_DEW_CRC_VAL, PWRAP_SIG_ADR);",
> > right?
> >
> > Henry
> >
>
> Hi Henry,
>
> i stumbled across this aswell. however this DEW access is direct using
> pwrap_writel() and not indirect pwrap_write(). hence this is correct.
> the DEW wrapper only exists for pwrap_write() style access. this might
> have been a bug in the original commit.
>
> this patch however keeps the functionality as is.
>
> John
Hi John,
Oh. Sorry, there is no need to change, I just mixed up the parameter
val/reg of pwrap_writel() of this line.
Please keep original code, thanks.
Henry
next prev parent reply other threads:[~2016-02-01 8:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-27 11:28 [PATCH V4 01/11] dt-bindings: ARM: Mediatek: add MT2701/7623 string to the PMIC wrapper doc John Crispin
2016-01-27 11:29 ` [PATCH V4 02/11] soc: mediatek: PMIC wrap: don't duplicate the wrapper data John Crispin
2016-01-27 11:29 ` [PATCH V4 03/11] soc: mediatek: PMIC wrap: add wrapper callbacks for init_reg_clock John Crispin
2016-01-27 11:29 ` [PATCH V4 04/11] soc: mediatek: PMIC wrap: split SoC specific init into callback John Crispin
2016-01-27 11:29 ` [PATCH V4 05/11] soc: mediatek: PMIC wrap: WRAP_INT_EN needs a different bitmask for MT2701/7623 John Crispin
2016-01-27 11:29 ` [PATCH V4 06/11] soc: mediatek: PMIC wrap: SPI_WRITE " John Crispin
2016-01-27 11:29 ` [PATCH V4 07/11] soc: mediatek: PMIC wrap: move wdt_src into the pmic_wrapper_type struct John Crispin
2016-01-27 11:29 ` [PATCH V4 08/11] soc: mediatek: PMIC wrap: remove pwrap_is_mt8135() and pwrap_is_mt8173() John Crispin
2016-01-27 11:29 ` [PATCH V4 09/11] soc: mediatek: PMIC wrap: add a slave specific struct John Crispin
2016-01-28 2:37 ` Henry Chen
2016-02-01 8:25 ` John Crispin
2016-02-01 8:38 ` Henry Chen [this message]
2016-01-27 11:29 ` [PATCH V4 10/11] soc: mediatek: PMIC wrap: add mt6323 slave support John Crispin
2016-01-27 11:29 ` [PATCH V4 11/11] soc: mediatek: PMIC wrap: add MT2701/7623 support John Crispin
2016-02-01 11:21 ` Matthias Brugger
2016-02-01 11:25 ` Matthias Brugger
2016-02-01 11:29 ` John Crispin
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=1454315881.2134.4.camel@mtksdaap41 \
--to=henryc.chen@mediatek.com \
--cc=linux-arm-kernel@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;
as well as URLs for NNTP newsgroup(s).