public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alessandro Zummo <alessandro.zummo@towertech.it>
To: dsaxena@plexity.net
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, rmk@arm.linux.org.uk
Subject: Re: [PATCH] Add driver for ARM AMBA PL031 RTC
Date: Wed, 17 May 2006 01:02:59 +0200	[thread overview]
Message-ID: <20060517010259.5a035b20@inspiron> (raw)
In-Reply-To: <20060516214813.GA28414@plexity.net>

On Tue, 16 May 2006 14:48:13 -0700
Deepak Saxena <dsaxena@plexity.net> wrote:

> 
> This patch adds a driver for the ARM PL031 RTC found on some ARM SOCs.
> The driver is fairly trivial as the RTC only provides a read/write and
> alarm capability.
> 
> Signed-off-by: Deepak <dsaxena@plexity.net>

> Alessandro: What userland tool do I use to test alarm capability?

 There's the source code of a test program in Documentation/rtc.txt .
 I'm not so sure the alarm capability is used nowadays.


you can avoid including this one if it is a no-op:

> +static int pl031_read_callback(struct device *dev, int data)
> +{
> +	return data;
> +}

 

> +static int pl031_ioctl(struct device *dev, unsigned int cmd, unsigned long arg)
> +{
> +	struct pl031_local *ldata = dev_get_drvdata(dev);
> +
> +	switch (cmd) {
> +	case RTC_AIE_OFF:
> +		__raw_writel(1, ldata->base + RTC_MIS);
> +		return 0;
> +	case RTC_AIE_ON:
> +		__raw_writel(0, ldata->base + RTC_MIS);
> +		return 0;
> +	}
> +
> +	return -EINVAL;
> +}

 pleasew return -ENOIOCTLCMD instead of -EINVAL . I know, I will have
to fix the other drivers to do the same.


 no op:

> +static int pl031_proc(struct device *dev, struct seq_file *seq)
> +{
> +	return 0;
> +}
> +



-- 

 Best regards,

 Alessandro Zummo,
  Tower Technologies - Turin, Italy

  http://www.towertech.it


  reply	other threads:[~2006-05-16 23:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-16 21:48 [PATCH] Add driver for ARM AMBA PL031 RTC Deepak Saxena
2006-05-16 23:02 ` Alessandro Zummo [this message]
2006-05-17  0:01   ` Deepak Saxena
2006-05-17  0:08     ` Alessandro Zummo
2006-06-10  1:45     ` Andrew Morton
2006-05-18 21:14   ` Deepak Saxena
2006-05-19  7:00     ` Alessandro Zummo

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=20060517010259.5a035b20@inspiron \
    --to=alessandro.zummo@towertech.it \
    --cc=akpm@osdl.org \
    --cc=dsaxena@plexity.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    /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