From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752483AbcLEWrl (ORCPT ); Mon, 5 Dec 2016 17:47:41 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:33024 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751311AbcLEWrj (ORCPT ); Mon, 5 Dec 2016 17:47:39 -0500 Date: Mon, 5 Dec 2016 23:47:33 +0100 From: Alexandre Belloni To: Emil Bartczak Cc: a.zummo@towertech.it, rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/4] rtc: mcp795: fix month write resetting date to 1. Message-ID: <20161205224733.rioq3c4icjjkrg4c@piout.net> References: <6a1e8548654fd8a5b65ba98f59b2b5ccb1544f7f.1480939487.git.emilbart@gmail.com> <20161205152410.qj64rw67jdccyrab@piout.net> <20161205221655.GA15764@emba-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161205221655.GA15764@emba-laptop> User-Agent: NeoMutt/20161104 (1.7.1) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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