linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Finn Thain <fthain@linux-m68k.org>
Cc: "David S. Miller" <davem@davemloft.net>,
	Andreas Larsson <andreas@gaisler.com>,
	 Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Daniel Palmer <daniel@0x0f.com>,
	 Michael Pavone <pavone@retrodev.com>,
	linux-m68k@lists.linux-m68k.org,  linux-rtc@vger.kernel.org,
	sparclinux@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] rtc: m48t59: Use platform_data struct for year offset value
Date: Tue, 8 Oct 2024 08:57:32 +0200	[thread overview]
Message-ID: <CAMuHMdXsekSXJOEf6chaMBHiRt_4nNvKYOOmQVC=ODg0qccKKA@mail.gmail.com> (raw)
In-Reply-To: <fb25eb97521363ab8a18d2fd499cb4c76209cebf.1728340717.git.fthain@linux-m68k.org>

Hi Finn,

On Tue, Oct 8, 2024 at 12:43 AM Finn Thain <fthain@linux-m68k.org> wrote:
> Instead of hard-coded values and ifdefs, store the year offset in the
> platform_data struct.
>
> Tested-by: Daniel Palmer <daniel@0x0f.com>
> Signed-off-by: Finn Thain <fthain@linux-m68k.org>

Thanks for your patch!

> --- a/include/linux/rtc/m48t59.h
> +++ b/include/linux/rtc/m48t59.h
> @@ -56,6 +56,9 @@ struct m48t59_plat_data {
>         void __iomem *ioaddr;
>         /* offset to RTC registers, automatically set according to the type */
>         unsigned int offset;
> +
> +       /* YY digits (in RTC) are offset, i.e. year is 1900 + yy_offset + YY */
> +       time64_t yy_offset;

time64_t sounds like overkill to me...

>  };
>
>  #endif /* _LINUX_RTC_M48T59_H_ */

The rest LGTM.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2024-10-08  6:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-07 22:38 [PATCH v2 0/2] MVME: Adopt standard RTC driver Finn Thain
2024-10-07 22:38 ` [PATCH v2 2/2] m68k: mvme147, mvme16x: Adopt rtc-m48t59 platform driver Finn Thain
2024-10-07 22:38 ` [PATCH v2 1/2] rtc: m48t59: Use platform_data struct for year offset value Finn Thain
2024-10-08  6:57   ` Geert Uytterhoeven [this message]
2024-10-08  7:15     ` Finn Thain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMuHMdXsekSXJOEf6chaMBHiRt_4nNvKYOOmQVC=ODg0qccKKA@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andreas@gaisler.com \
    --cc=daniel@0x0f.com \
    --cc=davem@davemloft.net \
    --cc=fthain@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=pavone@retrodev.com \
    --cc=sparclinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).