Linux RTC
 help / color / mirror / Atom feed
From: MyungJoo Ham <myungjoo.ham@samsung.com>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	Donggeun Kim <dg77.kim@samsung.com>,
	Kukjin Kim <kgene@kernel.org>
Cc: "a.zummo@towertech.it" <a.zummo@towertech.it>,
	"ben-linux@fluff.org" <ben-linux@fluff.org>,
	"rtc-linux@googlegroups.com" <rtc-linux@googlegroups.com>,
	박경민 <kyungmin.park@samsung.com>
Subject: [rtc-linux] Re: Re: rtc: rtc-s3c: Set year, month, day value for setting alarm
Date: Wed, 06 May 2015 05:00:27 +0000 (GMT)	[thread overview]
Message-ID: <1049205672.108131430888425869.JavaMail.weblogic@epmlwas03c> (raw)

> ------- Original Message -------
> Sender : Alexandre Belloni<alexandre.belloni@free-electrons.com>
> Date : 2015-05-02 23:19 (GMT+09:00)
> Title : Re: rtc: rtc-s3c: Set year, month, day value for setting alarm
>=20
> Hi,
>=20
> On 10/06/2011 at 17:29:52 +0900, Donggeun Kim wrote :
> > This patch sets year, month, day value for set_alarm function.
> > The current driver omits to set the values.
> >=20
> > Signed-off-by: Donggeun Kim=20
> > Signed-off-by: MyungJoo Ham=20
> > Signed-off-by: KyungMin Park=20
>=20
> This patch never made it to the mainlined but seems useful enough. Do
> you want to respin it?

Donggeun is no more available with that address and I am not aware of
his new address either. I'm adding people who might be interested in
S3C-RTC driver.

CC: Chanwoo Choi <cw00.choi@samsung.com>
CC: Marek Szyprowski <m.szyprowski@samsung.com>

ps. Is there any problem for you to resubmit (conflict resolving)
that patch?

>=20
> > ---
> >  drivers/rtc/rtc-s3c.c |   16 ++++++++++++++++
> >  1 files changed, 16 insertions(+), 0 deletions(-)
> >=20
> > diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
> > index 16512ec..18e648b 100644
> > --- a/drivers/rtc/rtc-s3c.c
> > +++ b/drivers/rtc/rtc-s3c.c
> > @@ -251,6 +251,7 @@ static int s3c_rtc_setalarm(struct device *dev, str=
uct rtc_wkalrm *alrm)
> >   struct rtc_time *tm =3D &alrm->time;
> >   void __iomem *base =3D s3c_rtc_base;
> >   unsigned int alrm_en;
> > + int year =3D tm->tm_year - 100;
> > =20
> >   pr_debug("s3c_rtc_setalarm: %d, %04d.%02d.%02d %02d:%02d:%02d\n",
> >   alrm->enabled,
> > @@ -276,6 +277,21 @@ static int s3c_rtc_setalarm(struct device *dev, st=
ruct rtc_wkalrm *alrm)
> >   writeb(bin2bcd(tm->tm_hour), base + S3C2410_ALMHOUR);
> >   }
> > =20
> > + if (year < 100 && year >=3D 0) {
> > + alrm_en |=3D S3C2410_RTCALM_YEAREN;
> > + writeb(bin2bcd(year), base + S3C2410_ALMYEAR);
> > + }
> > +
> > + if (tm->tm_mon < 12 && tm->tm_mon >=3D 0) {
> > + alrm_en |=3D S3C2410_RTCALM_MONEN;
> > + writeb(bin2bcd(tm->tm_mon + 1), base + S3C2410_ALMMON);
> > + }
> > +
> > + if (tm->tm_mday <=3D 31 && tm->tm_mday >=3D 1) {
> > + alrm_en |=3D S3C2410_RTCALM_DAYEN;
> > + writeb(bin2bcd(tm->tm_mday), base + S3C2410_ALMDATE);
> > + }
> > +
> >   pr_debug("setting S3C2410_RTCALM to %08x\n", alrm_en);
> > =20
> >   writeb(alrm_en, base + S3C2410_RTCALM);
>=20
> --=20
> Alexandre Belloni, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com


--
MyungJoo Ham (=ED=95=A8=EB=AA=85=EC=A3=BC), Ph.D.
Frontier CS Lab, Software R&D Center
Samsung Electronics
Cell: +82-10-6714-2858

--=20
--=20
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.
---=20
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 e=
mail to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

                 reply	other threads:[~2015-05-06  5:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1049205672.108131430888425869.JavaMail.weblogic@epmlwas03c \
    --to=myungjoo.ham@samsung.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=ben-linux@fluff.org \
    --cc=dg77.kim@samsung.com \
    --cc=kgene@kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=rtc-linux@googlegroups.com \
    /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