From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937915AbdAKNkB (ORCPT ); Wed, 11 Jan 2017 08:40:01 -0500 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:9853 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937890AbdAKNj7 (ORCPT ); Wed, 11 Jan 2017 08:39:59 -0500 Subject: Re: [PATCHv4 3/8] rtc: add STM32 RTC driver To: Corentin Labbe References: <1484138905-5903-1-git-send-email-amelie.delaunay@st.com> <20170111130438.GA9327@Red> CC: Alessandro Zummo , Alexandre Belloni , Rob Herring , Mark Rutland , Maxime Coquelin , Alexandre TORGUE , Russell King , "devicetree@vger.kernel.org" , "rtc-linux@googlegroups.com" , "linux-kernel@vger.kernel.org" , Gabriel FERNANDEZ , "linux-arm-kernel@lists.infradead.org" From: Amelie DELAUNAY Message-ID: Date: Wed, 11 Jan 2017 14:39:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170111130438.GA9327@Red> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.47] X-ClientProxiedBy: SFHDAG8NODE2.st.com (10.75.127.23) To SFHDAG3NODE2.st.com (10.75.127.8) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-01-11_12:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Corentin, Thanks for reviewing, On 01/11/2017 02:04 PM, Corentin Labbe wrote: > On Wed, Jan 11, 2017 at 01:48:25PM +0100, Amelie Delaunay wrote: >> This patch adds support for the STM32 RTC. >> >> Signed-off-by: Amelie Delaunay >> --- >> drivers/rtc/Kconfig | 11 + >> drivers/rtc/Makefile | 1 + >> drivers/rtc/rtc-stm32.c | 727 ++++++++++++++++++++++++++++++++++++++++++++++++ >> 3 files changed, 739 insertions(+) >> create mode 100644 drivers/rtc/rtc-stm32.c > > [...] >> +/* STM32_PWR_CR */ >> +#define PWR_CR 0x00 >> +/* STM32_PWR_CR bit field */ >> +#define PWR_CR_DBP BIT(8) >> + >> +static struct regmap *dbp; > > Hello > > Why using a global static struct ? > You could alloc a private structure in probe for storing it and use platform_set_drvdata() > This is to stay closer to how this backup domain protection is managed in clk-stm32f4 driver, but I realize that I haven't the same constraints. I'll move this struct in my stm32_rtc private structure. > Regards > Regards