From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com,
Alessandro Zummo <a.zummo@towertech.it>,
Samuel Ortiz <sameo@linux.intel.com>,
kyungmin.park@samsung.com, myungjoo.ham@gmail.com
Subject: Re: [rtc-linux] [PATCH 2/2] MAX8997/8966 RTC Driver Initial Release
Date: Sat, 5 Mar 2011 12:07:13 +0000 [thread overview]
Message-ID: <20110305120713.GD30187@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1299224924-11230-1-git-send-email-myungjoo.ham@samsung.com>
On Fri, Mar 04, 2011 at 04:48:44PM +0900, MyungJoo Ham wrote:
> +static void tm_to_data(struct rtc_time *tm, u8 *data)
> +{
> + data[RTC_SEC] = bin2bcd(tm->tm_sec) & 0x7f;
> + data[RTC_MIN] = bin2bcd(tm->tm_min) & 0x7f;
> + data[RTC_HOUR] = bin2bcd(tm->tm_hour) & 0x3f;
> + data[RTC_WEEKDAY] = wday_kernel_to_8997(tm->tm_wday) & 0x7f;
> + data[RTC_MONTH] = bin2bcd(tm->tm_mon) & 0x1f;
> + data[RTC_YEAR] = bin2bcd((tm->tm_year > 100) ? (tm->tm_year - 100) : 0)
> + & 0x7f;
> + data[RTC_MONTHDAY] = bin2bcd(tm->tm_mday) & 0x3f;
> +
> + if (tm->tm_year < 100) /* Prior 2000 */
> + pr_warn("MAX8997 RTC cannot handle the year %d. "
> + "Assume it's 2000.\n", 1900 + tm->tm_year);
It seems like an attempt to set an unsupported year should return an
error rather than just displaying a warning (though the warning is
useful so the user can figure out what went wrong).
> +MODULE_DESCRIPTION("MAXIM 8997/8966 RTC Driver");
> +MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>");
> +MODULE_LICENSE("GPL");
A MODULE_ALIAS() would allow the driver to be automatically loaded when
built as a module.
next prev parent reply other threads:[~2011-03-05 12:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-04 6:50 [PATCH v2 0/2] MAX8997/8966 MFD (includig PMIC) " MyungJoo Ham
2011-03-04 6:50 ` [PATCH v2 1/2] MAX8997/8966 MFD Driver Initial Release (PMIC+RTC+MUIC+Haptic+...) MyungJoo Ham
2011-03-05 11:31 ` Mark Brown
2011-03-04 6:50 ` [PATCH v2 2/2] MAX8997/8966 PMIC Regulator Driver Initial Release MyungJoo Ham
2011-03-04 7:16 ` [PATCH] MAX8997/8966 PMIC: compiler warning removed (incompatible pointer) MyungJoo Ham
2011-03-05 12:03 ` [PATCH v2 2/2] MAX8997/8966 PMIC Regulator Driver Initial Release Mark Brown
2011-03-08 1:50 ` MyungJoo Ham
2011-03-08 12:41 ` Mark Brown
2011-03-04 7:45 ` [PATCH 1/2] MAX8997/8966 MFD: Add IRQ control feature MyungJoo Ham
2011-03-04 8:58 ` Joe Perches
2011-03-14 10:11 ` Samuel Ortiz
2011-03-14 10:37 ` MyungJoo Ham
2011-03-04 7:48 ` [PATCH 2/2] MAX8997/8966 RTC Driver Initial Release MyungJoo Ham
2011-03-04 8:58 ` Joe Perches
2011-03-05 12:07 ` Mark Brown [this message]
2011-03-14 9:49 ` [PATCH v2 0/2] MAX8997/8966 MFD (includig PMIC) " Samuel Ortiz
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=20110305120713.GD30187@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=a.zummo@towertech.it \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@gmail.com \
--cc=myungjoo.ham@samsung.com \
--cc=rtc-linux@googlegroups.com \
--cc=sameo@linux.intel.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
Powered by JetHome