Re: [PATCH v2 1/2] rtc: m48t59: Use platform_data struct for year offset value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 8 Oct 2024, Geert Uytterhoeven wrote:

> Hi Finn,
> 
> On Tue, Oct 8, 2024 at 12:43 AM Finn Thain <fthain@xxxxxxxxxxxxxx> wrote:
> > Instead of hard-coded values and ifdefs, store the year offset in the
> > platform_data struct.
> >
> > Tested-by: Daniel Palmer <daniel@xxxxxxxx>
> > Signed-off-by: Finn Thain <fthain@xxxxxxxxxxxxxx>
> 
> Thanks for your patch!
> 

Thanks for your review.

> > --- 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...
> 

A vestige of an earlier experiment. Sorry about that. I shall send v3.

[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux