Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1549519

Re: [PATCH v2 2/2] mfd: axp20x: Fix AXP806 access errors on cold boot

From Chen-Yu Tsai <wens@csie.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 2/2] mfd: axp20x: Fix AXP806 access errors on cold boot
Date 2017-01-03 05:00 +0100
Message-ID <sVoqt-cw-1@gated-at.bofh.it> (permalink)
References (1 earlier) <sGwgh-7L8-1@gated-at.bofh.it> <sMrnz-2zR-11@gated-at.bofh.it> <sNYr7-3vi-7@gated-at.bofh.it> <sOig9-77w-17@gated-at.bofh.it> <sOlQJ-12U-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Dec 15, 2016 at 1:40 AM, Mark Brown <broonie@kernel.org> wrote:
> 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?

Sorry for the late reply.

Yes, any previous reads and writes may have been ignored. I'm not sure
if regmap cache prefetches any registers. Last I checked it didn't.

>> > 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.

So I just tested this. Dropping both the regcache_sync_region() and
regmap_reinit_cache() is ok.

I'll send a revised patch.

ChenYu

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2 2/2] mfd: axp20x: Fix AXP806 access errors on cold boot Mark Brown <broonie@kernel.org> - 2016-12-13 17:50 +0100
  Re: [PATCH v2 2/2] mfd: axp20x: Fix AXP806 access errors on cold boot Chen-Yu Tsai <wens@csie.org> - 2016-12-14 15:00 +0100
    Re: [PATCH v2 2/2] mfd: axp20x: Fix AXP806 access errors on cold boot Mark Brown <broonie@kernel.org> - 2016-12-14 18:50 +0100
      Re: [PATCH v2 2/2] mfd: axp20x: Fix AXP806 access errors on cold boot Chen-Yu Tsai <wens@csie.org> - 2017-01-03 05:00 +0100

csiph-web