From: Alessandro Zummo <alessandro.zummo@towertech.it>
To: rtc-linux@googlegroups.com
Cc: "linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>
Subject: Re: [rtc-linux] [PATCH] Add the support of ST M48T59 RTC chip in rtc-class driver subsystem
Date: Mon, 11 Jun 2007 13:25:08 +0200 [thread overview]
Message-ID: <20070611132508.0993a0f7@inspiron> (raw)
In-Reply-To: <1181548600.5217.16.camel@mark>
On Mon, 11 Jun 2007 15:56:40 +0800
Mark Zhan <rongkai.zhan@windriver.com> wrote:
>
> Add the support of ST M48T59 RTC chip driver in RTC class subsystem for
> Wind River SBC PowerQUICCII 82xx board
Hello Mark, thanks for you contribution. Code looks
good, I only have some minor comments:
>
> +config RTC_DRV_M48T59
> + tristate "ST M48T59"
> + depends on RTC_CLASS
> + help
> + If you say Y here you will get support for the
> + ST M48T59 RTC chip.
> +
> + This driver can also be built as a module, if so, the module
> + will be called "rtc-m48t59".
Please add some infos about the Wind River board in the help.
> +
> +#ifdef DEBUG_M48T59
> +#define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: "fmt,
> __FUNCTION__, ##args)
> +#else
> +#define DPRINTK(fmt, args...)
> +#endif
please use standard device debugging/reporting functions
> +
> +static unsigned char * m48t59_vbase = NULL;
> +static unsigned int m48t59_irq = -1;
those shouldn't be globals. please see other drivers for suggestions
on encapsulation.
> +static int m48t59_rtc_proc(struct device *dev, struct seq_file *seq)
> +{
> + unsigned char val;
> +
> + val = M48T59_READ(M48T59_FLAGS);
> + seq_printf(seq, "battery\t\t: %s\n",
> + (val & M48T59_FLAGS_BF) ? "low" : "normal");
> +
> + return 0;
> +}
this is going to be deprecated, you can use it but it will fade away
sooner or later. you might want to add a sysfs attribute
with the battery info.
thanks.
--
Best regards,
Alessandro Zummo,
Tower Technologies - Torino, Italy
http://www.towertech.it
next prev parent reply other threads:[~2007-06-11 11:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-11 7:56 [PATCH] Add the support of ST M48T59 RTC chip in rtc-class driver subsystem Mark Zhan
2007-06-11 11:25 ` Alessandro Zummo [this message]
2007-06-11 12:11 ` Gabriel Paubert
2007-06-12 13:59 ` Mark Zhan
2007-06-12 14:12 ` Mark Zhan
2007-06-19 12:29 ` Alessandro Zummo
2007-06-14 10:32 ` Gabriel Paubert
2007-06-11 14:35 ` Milton Miller
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=20070611132508.0993a0f7@inspiron \
--to=alessandro.zummo@towertech.it \
--cc=linuxppc-dev@ozlabs.org \
--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;
as well as URLs for NNTP newsgroup(s).