linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
	Matt Turner <mattst88@gmail.com>,
	linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rtc: m41t80: Complete error propagation from SMBus calls
Date: Wed, 14 Nov 2018 13:20:05 +0100	[thread overview]
Message-ID: <20181114122005.GY29768@piout.net> (raw)
In-Reply-To: <alpine.LFD.2.21.1811141139450.21654@eddie.linux-mips.org>

On 14/11/2018 12:05:14+0000, Maciej W. Rozycki wrote:
> On Wed, 14 Nov 2018, Alexandre Belloni wrote:
> 
> > >  I'll be posting further patches over the coming weeks, based on my 
> > > original effort as archived here: <https://lkml.org/lkml/2008/5/12/385>,
> > > <https://lore.kernel.org/patchwork/project/lkml/list/?series=73524&archive=both> 
> > > However I have just realised they'll need another iteration before I post 
> > > them.  So for now just these two obvious fixes.
> > > 
> > 
> > Regarding the persistent part, do you really need more than what is
> > provided? As far as I know, the timekeeping core is already taking care
> > of using the best source to get the suspended time.
> 
>  For that we have platform code duplicating what the RTC framework 
> already does.  Some of that cannot be made to work reasonably.  See e.g. 
> arch/mips/dec/time.c or arch/mips/sibyte/swarm/rtc_*.c.
> 
>  The DEC code is technically sound, but spreads the same function (RTC 
> r/w access) across another place, in addition to drivers/rtc/rtc-cmos.c.  
> The SiByte code bypasses the I2C driver and therefore cannot be 
> converted to use I2C interrupts, which means system latency problems.  
> The write part used for NTP can be removed right away by making it 
> return -ENODEV, and I have separate patches to do that for these 
> platforms.  The read part cannot AFAICT.
> 
>  I think we can discuss that when I post the patches.  The m41t80 driver 
> currently does not work for me anyway and has to be fixed because of:
> 
> i2c /dev entries driver
> i2c-sibyte: i2c SMBus adapter module for SiByte board
> i2c i2c-1: doesn't support I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_I2C_BLOCK
> 
> and the persistent part is only one patch in the upcoming number of 
> changes.
> 

Well, one of the solution for that (and tis is on my todo list) is to
convert the driver to use regmap which would take care of using the
proper i2c transfers. However, one of the concern when not having bock
accesses is that the registers are not latched (as you seem to know).
One thing I would like is then to avoid the multiple SEC register read
when not necessary.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2018-11-14 12:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-07  2:39 [PATCH] rtc: m41t80: Complete error propagation from SMBus calls Maciej W. Rozycki
2018-11-14  9:48 ` Alexandre Belloni
2018-11-14  9:57 ` Alexandre Belloni
2018-11-14 12:05   ` Maciej W. Rozycki
2018-11-14 12:20     ` Alexandre Belloni [this message]
2018-11-14 12:50       ` Maciej W. Rozycki

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=20181114122005.GY29768@piout.net \
    --to=alexandre.belloni@bootlin.com \
    --cc=a.zummo@towertech.it \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=macro@linux-mips.org \
    --cc=mattst88@gmail.com \
    /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).