All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Dooks <ben-linux@fluff.org>
To: Kukjin Kim <kgene.kim@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, ben-linux@fluff.org,
	Taekgyun Ko <taeggyun.ko@samsung.com>,
	Sangbeom Kim <sbkim73@samsung.com>
Subject: Re: [PATCH 4/8] rtc: rtc-s3c: Add alarm_irq_enable RTC class operation
Date: Tue, 18 May 2010 08:05:37 +0100	[thread overview]
Message-ID: <20100518070537.GB26401@trinity.fluff.org> (raw)
In-Reply-To: <1274162363-1911-1-git-send-email-kgene.kim@samsung.com>

On Tue, May 18, 2010 at 02:59:23PM +0900, Kukjin Kim wrote:
> From: Taekgyun Ko <taeggyun.ko@samsung.com>
> 
> This patch updates rtc-s3c driver to support
> 'alarm_irq_enable' RTC class operation.

this could have gone on one line.
 
> Signed-off-by: Taekgyun Ko <taeggyun.ko@samsung.com>
> Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
> ---
>  drivers/rtc/rtc-s3c.c |   13 ++++++++-----
>  1 files changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
> index 4969b60..9364dc2 100644
> --- a/drivers/rtc/rtc-s3c.c
> +++ b/drivers/rtc/rtc-s3c.c
> @@ -59,18 +59,20 @@ static irqreturn_t s3c_rtc_tickirq(int irq, void *id)
>  }
>  
>  /* Update control registers */
> -static void s3c_rtc_setaie(int to)
> +static int s3c_rtc_setaie(struct device *dev, unsigned int enabled)
>  {
>  	unsigned int tmp;
>  
> -	pr_debug("%s: aie=%d\n", __func__, to);
> +	pr_debug("%s: aie=%d\n", __func__, enabled);
>  
>  	tmp = readb(s3c_rtc_base + S3C2410_RTCALM) & ~S3C2410_RTCALM_ALMEN;
>  
> -	if (to)
> +	if (enabled)
>  		tmp |= S3C2410_RTCALM_ALMEN;
>  
>  	writeb(tmp, s3c_rtc_base + S3C2410_RTCALM);
> +
> +	return 0;

Please stop changing names jsut because you feel like it.

>  }
>  
>  static int s3c_rtc_setpie(struct device *dev, int enabled)
> @@ -271,7 +273,7 @@ static int s3c_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)
>  
>  	writeb(alrm_en, base + S3C2410_RTCALM);
>  
> -	s3c_rtc_setaie(alrm->enabled);
> +	s3c_rtc_setaie(0, alrm->enabled);

if you've got a pointer to device, then please pass it.
  
>  	if (alrm->enabled)
>  		enable_irq_wake(s3c_rtc_alarmno);
> @@ -340,6 +342,7 @@ static const struct rtc_class_ops s3c_rtcops = {
>  	.set_alarm	= s3c_rtc_setalarm,
>  	.irq_set_freq	= s3c_rtc_setfreq,
>  	.irq_set_state	= s3c_rtc_setpie,
> +	.alarm_irq_enable = s3c_rtc_setaie,
>  	.proc	        = s3c_rtc_proc,
>  };
>  
> @@ -391,7 +394,7 @@ static int __devexit s3c_rtc_remove(struct platform_device *dev)
>  	rtc_device_unregister(rtc);
>  
>  	s3c_rtc_setpie(&dev->dev, 0);
> -	s3c_rtc_setaie(0);
> +	s3c_rtc_setaie(0, 0);

see previous comment about pointers to device.
  
>  	iounmap(s3c_rtc_base);
>  	release_resource(s3c_rtc_mem);
> -- 
> 1.6.2.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.

WARNING: multiple messages have this Message-ID (diff)
From: ben-linux@fluff.org (Ben Dooks)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/8] rtc: rtc-s3c: Add alarm_irq_enable RTC class operation
Date: Tue, 18 May 2010 08:05:37 +0100	[thread overview]
Message-ID: <20100518070537.GB26401@trinity.fluff.org> (raw)
In-Reply-To: <1274162363-1911-1-git-send-email-kgene.kim@samsung.com>

On Tue, May 18, 2010 at 02:59:23PM +0900, Kukjin Kim wrote:
> From: Taekgyun Ko <taeggyun.ko@samsung.com>
> 
> This patch updates rtc-s3c driver to support
> 'alarm_irq_enable' RTC class operation.

this could have gone on one line.
 
> Signed-off-by: Taekgyun Ko <taeggyun.ko@samsung.com>
> Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
> ---
>  drivers/rtc/rtc-s3c.c |   13 ++++++++-----
>  1 files changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
> index 4969b60..9364dc2 100644
> --- a/drivers/rtc/rtc-s3c.c
> +++ b/drivers/rtc/rtc-s3c.c
> @@ -59,18 +59,20 @@ static irqreturn_t s3c_rtc_tickirq(int irq, void *id)
>  }
>  
>  /* Update control registers */
> -static void s3c_rtc_setaie(int to)
> +static int s3c_rtc_setaie(struct device *dev, unsigned int enabled)
>  {
>  	unsigned int tmp;
>  
> -	pr_debug("%s: aie=%d\n", __func__, to);
> +	pr_debug("%s: aie=%d\n", __func__, enabled);
>  
>  	tmp = readb(s3c_rtc_base + S3C2410_RTCALM) & ~S3C2410_RTCALM_ALMEN;
>  
> -	if (to)
> +	if (enabled)
>  		tmp |= S3C2410_RTCALM_ALMEN;
>  
>  	writeb(tmp, s3c_rtc_base + S3C2410_RTCALM);
> +
> +	return 0;

Please stop changing names jsut because you feel like it.

>  }
>  
>  static int s3c_rtc_setpie(struct device *dev, int enabled)
> @@ -271,7 +273,7 @@ static int s3c_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)
>  
>  	writeb(alrm_en, base + S3C2410_RTCALM);
>  
> -	s3c_rtc_setaie(alrm->enabled);
> +	s3c_rtc_setaie(0, alrm->enabled);

if you've got a pointer to device, then please pass it.
  
>  	if (alrm->enabled)
>  		enable_irq_wake(s3c_rtc_alarmno);
> @@ -340,6 +342,7 @@ static const struct rtc_class_ops s3c_rtcops = {
>  	.set_alarm	= s3c_rtc_setalarm,
>  	.irq_set_freq	= s3c_rtc_setfreq,
>  	.irq_set_state	= s3c_rtc_setpie,
> +	.alarm_irq_enable = s3c_rtc_setaie,
>  	.proc	        = s3c_rtc_proc,
>  };
>  
> @@ -391,7 +394,7 @@ static int __devexit s3c_rtc_remove(struct platform_device *dev)
>  	rtc_device_unregister(rtc);
>  
>  	s3c_rtc_setpie(&dev->dev, 0);
> -	s3c_rtc_setaie(0);
> +	s3c_rtc_setaie(0, 0);

see previous comment about pointers to device.
  
>  	iounmap(s3c_rtc_base);
>  	release_resource(s3c_rtc_mem);
> -- 
> 1.6.2.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.

  reply	other threads:[~2010-05-18  7:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-18  5:59 [PATCH 4/8] rtc: rtc-s3c: Add alarm_irq_enable RTC class operation Kukjin Kim
2010-05-18  5:59 ` Kukjin Kim
2010-05-18  7:05 ` Ben Dooks [this message]
2010-05-18  7:05   ` Ben Dooks

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=20100518070537.GB26401@trinity.fluff.org \
    --to=ben-linux@fluff.org \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=sbkim73@samsung.com \
    --cc=taeggyun.ko@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.