<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/rtc/rtc-sysfs.c, branch v3.12.10</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/rtc/rtc-sysfs.c?h=v3.12.10</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/rtc/rtc-sysfs.c?h=v3.12.10'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-07-29T20:10:58Z</updated>
<entry>
<title>rtc: convert class code to use dev_groups</title>
<updated>2013-07-29T20:10:58Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-07-24T22:05:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f21e683508ead3ad8db7ffef3d8b5802c3b43e9a'/>
<id>urn:sha1:f21e683508ead3ad8db7ffef3d8b5802c3b43e9a</id>
<content type='text'>
The dev_attrs field of struct class is going away soon, dev_groups
should be used instead.  This converts the rtc class code to use the
correct field.

Acked-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rtc: add ability to push out an existing wakealarm using sysfs</title>
<updated>2013-07-03T23:07:54Z</updated>
<author>
<name>Bernie Thompson</name>
<email>bhthompson@chromium.org</email>
</author>
<published>2013-07-03T22:07:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1df0a4711f6e93c1073dd82f6e7905748842e2b3'/>
<id>urn:sha1:1df0a4711f6e93c1073dd82f6e7905748842e2b3</id>
<content type='text'>
This adds the ability for the rtc sysfs code to handle += characters at
the beginning of a wakealarm setting string.  This will allow the user
to attempt to push out an existing wakealarm by a provided amount.

In the case that the += characters are provided but the alarm is not
active -EINVAL is returned.

his is useful, at least for my purposes in suspend/resume testing.  The
basic test goes something like:

1. Set a wake alarm from userspace 5 seconds in the future

2. Start the suspend process (echo mem &gt; /sys/power/state)

3. After ~2.5 seconds if userspace is still running (using another
   thread to check this), move the wake alarm 5 more seconds

If the "move" involves an unset of the wakealarm then there's a period
   of time where the system is midway through suspending but has no wake
   alarm.  It will get stuck.

We'd rather not remove the "move" since the idea is to avoid a cancelled
suspend when the alarm fires _during_ suspend.  It is difficult for the
test to tell the difference between a suspend that was cancelled because
the alarm fired too early and a suspend that was

Signed-off-by: Bernie Thompson &lt;bhthompson@chromium.org&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Doug Anderson &lt;dianders@chromium.org&gt;
Cc: "Rafael J. Wysocki" &lt;rjw@sisk.pl&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>rtc_sysfs_show_hctosys(): display 0 if resume failed</title>
<updated>2012-10-05T18:05:04Z</updated>
<author>
<name>David Fries</name>
<email>david@fries.net</email>
</author>
<published>2012-10-05T00:14:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4c24e29e65843ed912c14cdc293ed922e33efdcc'/>
<id>urn:sha1:4c24e29e65843ed912c14cdc293ed922e33efdcc</id>
<content type='text'>
Without this patch /sys/class/rtc/$CONFIG_RTC_HCTOSYS_DEVICE/hctosys
contains a 1 (meaning "This rtc was used to initialize the system
clock") even if setting the time by do_settimeofday() at bootup failed.
The RTC can also be used to set the clock on resume, if it did 1,
otherwise 0.  Previously there was no indication if the RTC was used
to set the clock in resume.

This uses only CONFIG_RTC_HCTOSYS_DEVICE for conditional compilation
instead of it and CONFIG_RTC_HCTOSYS to be more consistent.
rtc_hctosys_ret was moved to class.c so class.c no longer depends on
hctosys.c.

[sfr@canb.auug.org.au: fix build]
Signed-off-by: David Fries &lt;David@Fries.net&gt;
Cc: Matthew Garrett &lt;mjg@redhat.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>rtc/hctosys: only claim the RTC provided the system time if it did</title>
<updated>2010-03-12T23:52:28Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2010-03-10T23:20:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d0ab4a4d5094e5d17b103dc5073529a04f00a469'/>
<id>urn:sha1:d0ab4a4d5094e5d17b103dc5073529a04f00a469</id>
<content type='text'>
Without this patch /sys/class/rtc/$CONFIG_RTC_HCTOSYS_DEVICE/hctosys
contains a 1 (meaning "This rtc was used to initialize the system clock")
even if reading the time at bootup failed.

Moreover change error handling in rtc_hctosys() to use goto and so reduce
the indention level.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Cc: Paul Gortmaker &lt;p_gortmaker@yahoo.com&gt;
Acked-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>rtc: add boot_timesource sysfs attribute</title>
<updated>2009-09-23T14:39:46Z</updated>
<author>
<name>Matthew Garrett</name>
<email>mjg59@srcf.ucam.org</email>
</author>
<published>2009-09-22T23:46:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d8c1acb1664d17dd995e34507533321e986d9215'/>
<id>urn:sha1:d8c1acb1664d17dd995e34507533321e986d9215</id>
<content type='text'>
CONFIG_RTC_HCTOSYS allows the kernel to read the system time from the RTC
at boot and resume, avoiding the need for userspace to do so.
Unfortunately userspace currently has no way to know whether this
configuration option is enabled and thus cannot sensibly choose whether to
run hwclock itself or not.  Add a hctosys sysfs attribute which indicates
whether a given RTC set the system clock.

Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
Acked-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>rtc: add the support for alarm time relative to current time in sysfs</title>
<updated>2008-04-28T15:58:17Z</updated>
<author>
<name>Zhao Yakui</name>
<email>yakui.zhao@intel.com</email>
</author>
<published>2008-04-28T09:11:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c116bc2ae516e9949d645bc75b1ee294ff15db23'/>
<id>urn:sha1:c116bc2ae516e9949d645bc75b1ee294ff15db23</id>
<content type='text'>
In current kernel if we want to set the alarm time, the absolute time the
seconds relative to 1970-01-01 00:00:00) should be written into
/sys/class/rtc/rtc0/wakealarm.  It is not convenient.

It is more reasonable to add the support for the alarm time relative to
current RTC time.(the unit is second)

For example:
If the RTC is required to generate alarm after 2 minutes, the following
will be OK.
	echo +120 &gt; /sys/class/rtc/rtc0/wakealarm
or      echo +0x78 &gt; /sys/class/rtc/rtc0/wakealarm

Signed-off-by: Zhao Yakui &lt;yakui.zhao@intel.com&gt;
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>rtc-cmos alarm acts as oneshot</title>
<updated>2008-02-06T18:41:13Z</updated>
<author>
<name>David Brownell</name>
<email>david-b@pacbell.net</email>
</author>
<published>2008-02-06T09:38:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8a0bdfd7a05f5bb0486fbe7146a2cf775957e95e'/>
<id>urn:sha1:8a0bdfd7a05f5bb0486fbe7146a2cf775957e95e</id>
<content type='text'>
Start making the rtc-cmos alarm act more like a oneshot alarm by disabling
that alarm after its IRQ fires.  (ACPI hooks are also needed.)

The Linux RTC framework has previously been a bit vague in this area, but
any other behavior is problematic and not very portable.  RTCs with full
YYYY-MM-DD HH:MM[:SS] alarms won't have a problem here.  Only ones with
partial match criteria, with the most visible example being the PC RTC, get
confused.  (Because the criteria will match repeatedly.)

Update comments relating to that oneshot behavior and timezone handling.
(Timezones are another issue that's mostly visible with rtc-cmos.  That's
because PCs often dual-boot MS-Windows, which likes its RTC to match local
wall-clock time instead of UTC.)

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Add missing newlines to some uses of dev_&lt;level&gt; messages</title>
<updated>2007-10-18T21:37:28Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2007-10-18T10:06:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=898eb71cb17644964c5895fb190e79e3d0c49679'/>
<id>urn:sha1:898eb71cb17644964c5895fb190e79e3d0c49679</id>
<content type='text'>
Found these while looking at printk uses.

Add missing newlines to dev_&lt;level&gt; uses
Add missing KERN_&lt;level&gt; prefixes to multiline dev_&lt;level&gt;s
Fixed a wierd-&gt;weird spelling typo
Added a newline to a printk

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: "Luck, Tony" &lt;tony.luck@intel.com&gt;
Cc: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Cc: Mark M. Hoffman &lt;mhoffman@lightlink.com&gt;
Cc: Roland Dreier &lt;rolandd@cisco.com&gt;
Cc: Tilman Schmidt &lt;tilman@imap.cc&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Jeff Garzik &lt;jeff@garzik.org&gt;
Cc: Stephen Hemminger &lt;shemminger@linux-foundation.org&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Cc: Jeremy Fitzhardinge &lt;jeremy@goop.org&gt;
Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Cc: James Smart &lt;James.Smart@Emulex.Com&gt;
Cc: Andrew Vasquez &lt;andrew.vasquez@qlogic.com&gt;
Cc: "Antonino A. Daplas" &lt;adaplas@pol.net&gt;
Cc: Evgeniy Polyakov &lt;johnpol@2ka.mipt.ru&gt;
Cc: Russell King &lt;rmk@arm.linux.org.uk&gt;
Cc: Jaroslav Kysela &lt;perex@suse.cz&gt;
Cc: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>rtc: add max_user_freq to sysfs</title>
<updated>2007-10-16T16:43:13Z</updated>
<author>
<name>Bryan Kadzban</name>
<email>bryan@kdzbn.homelinux.net</email>
</author>
<published>2007-10-16T08:28:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=06c65eb45578c52d1bc69d044239646d4c90e7ea'/>
<id>urn:sha1:06c65eb45578c52d1bc69d044239646d4c90e7ea</id>
<content type='text'>
drivers/char/rtc.c exposed a sysctl to change the maximum frequency at
which a non-root user could ask the RTC to generate interrupts (via the
RTC_IRQP_SET ioctl).  This value is no longer available under the new RTC
subsystem, so add it to sysfs for each RTC device.

Works for me on x86_64 (both reads and writes), using rtc-cmos.

Signed-off-by: Bryan Kadzban &lt;bryan@kdzbn.homelinux.net&gt;
Acked-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>rtc: remove rest of class_device</title>
<updated>2007-05-08T18:15:18Z</updated>
<author>
<name>David Brownell</name>
<email>david-b@pacbell.net</email>
</author>
<published>2007-05-08T07:33:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cd9662094edf4173e87f0452e57e4eacc228f8ff'/>
<id>urn:sha1:cd9662094edf4173e87f0452e57e4eacc228f8ff</id>
<content type='text'>
Finish converting the RTC framework so it no longer uses class_device.

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Acked-By: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
