mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nandor Han <nandor.han@vaisala.com>
To: Biwen Li <biwen.li@nxp.com>,
	a.zummo@towertech.it, alexandre.belloni@bootlin.com,
	leoyang.li@nxp.com, broonie@kernel.org
Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [v5] rtc: pcf85363/pcf85263: fix error that failed to run hwclock -w
Date: Thu, 29 Aug 2019 09:45:50 +0300	[thread overview]
Message-ID: <65a85fb2-0482-2007-4a84-b622e5308c3d@vaisala.com> (raw)
In-Reply-To: <20190829021418.4607-1-biwen.li@nxp.com>

On 8/29/19 5:14 AM, Biwen Li wrote:
> Issue:
>      - # hwclock -w
>        hwclock: RTC_SET_TIME: Invalid argument
> 
> Why:
>      - Relative commit: 8b9f9d4dc511309918c4f6793bae7387c0c638af, this patch
>        will always check for unwritable registers, it will compare reg
>        with max_register in regmap_writeable.
> 
>      - The pcf85363/pcf85263 has the capability of address wrapping
>        which means if you access an address outside the allowed range
>        (0x00-0x2f) hardware actually wraps the access to a lower address.
>        The rtc-pcf85363 driver will use this feature to configure the time
>        and execute 2 actions in the same i2c write operation (stopping the
>        clock and configure the time). However the driver has also
>        configured the `regmap maxregister` protection mechanism that will
>        block accessing addresses outside valid range (0x00-0x2f).
> 
> How:
>      - Split of writing regs to two parts, first part writes control
>        registers about stop_enable and resets, second part writes
>        RTC time and date registers.
> 
> Signed-off-by: Biwen Li <biwen.li@nxp.com>
> ---
> Change in v5:
> 	- drop robust explanation
> 

LGTM +1

Nandor


  reply	other threads:[~2019-08-29  6:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-29  2:14 Biwen Li
2019-08-29  6:45 ` Nandor Han [this message]
2019-08-29 21:05 ` Alexandre Belloni

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=65a85fb2-0482-2007-4a84-b622e5308c3d@vaisala.com \
    --to=nandor.han@vaisala.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=biwen.li@nxp.com \
    --cc=broonie@kernel.org \
    --cc=leoyang.li@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.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

all inboxes | Powered by JetHome®