From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Sender: rtc-linux@googlegroups.com Received: from mail-wj0-x244.google.com (mail-wj0-x244.google.com. [2a00:1450:400c:c01::244]) by gmr-mx.google.com with ESMTPS id 133si1123291wmj.1.2017.01.11.05.04.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jan 2017 05:04:45 -0800 (PST) Received: by mail-wj0-x244.google.com with SMTP id dh1so10427326wjb.3 for ; Wed, 11 Jan 2017 05:04:45 -0800 (PST) Date: Wed, 11 Jan 2017 14:04:38 +0100 From: Corentin Labbe To: Amelie Delaunay 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 Subject: [rtc-linux] Re: [PATCHv4 3/8] rtc: add STM32 RTC driver Message-ID: <20170111130438.GA9327@Red> References: <1484138905-5903-1-git-send-email-amelie.delaunay@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 In-Reply-To: <1484138905-5903-1-git-send-email-amelie.delaunay@st.com> Reply-To: rtc-linux@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , 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() Regards -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout. From mboxrd@z Thu Jan 1 00:00:00 1970 From: clabbe.montjoie@gmail.com (Corentin Labbe) Date: Wed, 11 Jan 2017 14:04:38 +0100 Subject: [PATCHv4 3/8] rtc: add STM32 RTC driver In-Reply-To: <1484138905-5903-1-git-send-email-amelie.delaunay@st.com> References: <1484138905-5903-1-git-send-email-amelie.delaunay@st.com> Message-ID: <20170111130438.GA9327@Red> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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() Regards From mboxrd@z Thu Jan 1 00:00:00 1970 From: Corentin Labbe Subject: Re: [PATCHv4 3/8] rtc: add STM32 RTC driver Date: Wed, 11 Jan 2017 14:04:38 +0100 Message-ID: <20170111130438.GA9327@Red> References: <1484138905-5903-1-git-send-email-amelie.delaunay@st.com> Reply-To: rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Sender: rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Content-Disposition: inline In-Reply-To: <1484138905-5903-1-git-send-email-amelie.delaunay-qxv4g6HH51o@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Amelie Delaunay Cc: Alessandro Zummo , Alexandre Belloni , Rob Herring , Mark Rutland , Maxime Coquelin , Alexandre Torgue , Russell King , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Gabriel Fernandez , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: devicetree@vger.kernel.org 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() Regards -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/d/optout. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966454AbdAKNEt (ORCPT ); Wed, 11 Jan 2017 08:04:49 -0500 Received: from mail-wj0-f194.google.com ([209.85.210.194]:35861 "EHLO mail-wj0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966428AbdAKNEr (ORCPT ); Wed, 11 Jan 2017 08:04:47 -0500 Date: Wed, 11 Jan 2017 14:04:38 +0100 From: Corentin Labbe To: Amelie Delaunay 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 Subject: Re: [PATCHv4 3/8] rtc: add STM32 RTC driver Message-ID: <20170111130438.GA9327@Red> References: <1484138905-5903-1-git-send-email-amelie.delaunay@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1484138905-5903-1-git-send-email-amelie.delaunay@st.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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() Regards