All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Chen-Yu Tsai <wens@csie.org>
Cc: Lee Jones <lee.jones@linaro.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-sunxi <linux-sunxi@googlegroups.com>
Subject: Re: [PATCH v2 2/2] mfd: axp20x: Fix AXP806 access errors on cold boot
Date: Wed, 14 Dec 2016 17:40:53 +0000	[thread overview]
Message-ID: <20161214174053.qsm6umlgtdivevwt@sirena.org.uk> (raw)
In-Reply-To: <CAGb2v66vggNNfFrAiNKKGXY0ayiG1qh5tcRok2NLTRkVHWKFeg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 965 bytes --]

On Wed, Dec 14, 2016 at 09:52:31PM +0800, Chen-Yu Tsai wrote:

> What this patch does is make sure the registers match, to guarantee
> access, and then reinitialize the regmap cache to get rid of any
> stale data.

So what you're saying is that previous writes may have been ignored?

> > If the chip has been reset then you'd want to reset the cache too.  I've
> > no idea if that's needed here or not though, it depends what happens to
> > the global state of the chip when this reconfiguration happens.

> It is not a reset in the general sense. I suppose a better way would
> be to do an explicit write to the register first, then initialize
> the regmap. I'd have to export the write function from the RSB bus
> driver first though.

Surely just doing a write immediately after initializing the regmap
would have the same effect?  That'd ensure that the hardware has the
desired value before there are any other writes.  But I might be missing
something here.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: broonie@kernel.org (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/2] mfd: axp20x: Fix AXP806 access errors on cold boot
Date: Wed, 14 Dec 2016 17:40:53 +0000	[thread overview]
Message-ID: <20161214174053.qsm6umlgtdivevwt@sirena.org.uk> (raw)
In-Reply-To: <CAGb2v66vggNNfFrAiNKKGXY0ayiG1qh5tcRok2NLTRkVHWKFeg@mail.gmail.com>

On Wed, Dec 14, 2016 at 09:52:31PM +0800, Chen-Yu Tsai wrote:

> What this patch does is make sure the registers match, to guarantee
> access, and then reinitialize the regmap cache to get rid of any
> stale data.

So what you're saying is that previous writes may have been ignored?

> > If the chip has been reset then you'd want to reset the cache too.  I've
> > no idea if that's needed here or not though, it depends what happens to
> > the global state of the chip when this reconfiguration happens.

> It is not a reset in the general sense. I suppose a better way would
> be to do an explicit write to the register first, then initialize
> the regmap. I'd have to export the write function from the RSB bus
> driver first though.

Surely just doing a write immediately after initializing the regmap
would have the same effect?  That'd ensure that the hardware has the
desired value before there are any other writes.  But I might be missing
something here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161214/082576db/attachment.sig>

  reply	other threads:[~2016-12-14 17:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-23  3:16 [PATCH v2 0/2] mfd: axp20x: Fix AXP806 access errors on cold boot Chen-Yu Tsai
2016-11-23  3:16 ` Chen-Yu Tsai
2016-11-23  3:16 ` [PATCH v2 1/2] mfd: axp20x: Add address extension registers for AXP806 regmap Chen-Yu Tsai
2016-11-23  3:16   ` Chen-Yu Tsai
2016-12-09 11:05   ` Lee Jones
2016-12-09 11:05     ` Lee Jones
2016-11-23  3:16 ` [PATCH v2 2/2] mfd: axp20x: Fix AXP806 access errors on cold boot Chen-Yu Tsai
2016-11-23  3:16   ` Chen-Yu Tsai
2016-12-09 11:20   ` Lee Jones
2016-12-09 11:20     ` Lee Jones
2016-12-13 16:47     ` Mark Brown
2016-12-13 16:47       ` Mark Brown
2016-12-14 13:52       ` Chen-Yu Tsai
2016-12-14 13:52         ` Chen-Yu Tsai
2016-12-14 17:40         ` Mark Brown [this message]
2016-12-14 17:40           ` Mark Brown
2017-01-03  3:54           ` Chen-Yu Tsai
2017-01-03  3:54             ` Chen-Yu Tsai

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=20161214174053.qsm6umlgtdivevwt@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=wens@csie.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.