Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1556469

Re: [PATCHv4 3/8] rtc: add STM32 RTC driver

From Corentin Labbe <clabbe.montjoie@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCHv4 3/8] rtc: add STM32 RTC driver
Date 2017-01-11 14:10 +0100
Message-ID <sYqP7-7ld-13@gated-at.bofh.it> (permalink)
References <sYqvL-6ZO-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <amelie.delaunay@st.com>
> ---
>  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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCHv4 3/8] rtc: add STM32 RTC driver Amelie Delaunay <amelie.delaunay@st.com> - 2017-01-11 13:50 +0100
  Re: [PATCHv4 3/8] rtc: add STM32 RTC driver Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-01-11 14:10 +0100
    Re: [PATCHv4 3/8] rtc: add STM32 RTC driver Amelie DELAUNAY <amelie.delaunay@st.com> - 2017-01-11 14:50 +0100

csiph-web