Re: [PATCH 3/4] rtc: mcp795: fix month write resetting date to 1.

From: Alexandre Belloni
Date: Mon Dec 05 2016 - 17:47:54 EST


On 05/12/2016 at 23:16:55 +0100, Emil Bartczak wrote :
> > > +static int mcp795_start_oscillator(struct device *dev)
> > > +{
> > > + return mcp795_rtcc_set_bits(dev, MCP795_REG_SECONDS,
> > > + MCP795_ST_BIT, MCP795_ST_BIT);
> >
> > You probably want to restore EXTOSC to its previous value here.
> I came to the conclusion that it is better to remove clearing of bit EXTOSC in function mcp795_stop_oscillator.
> Because regarding datasheet, after power up the RTC chip (or reset) that bit has value 0.
> What do you think?
>

That is one way but maybe some people are setting that bit in the
bootloader. It doesn't matter much. If you are not using the feature,
let it that way. If anybody needs it at some point they can still send a
patch :)


--
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com