<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/rtc/rtc-cros-ec.c, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2019-03-20T10:36:46Z</updated>
<entry>
<title>rtc: cros-ec: Fail suspend/resume if wake IRQ can't be configured</title>
<updated>2019-03-20T10:36:46Z</updated>
<author>
<name>Stephen Boyd</name>
<email>swboyd@chromium.org</email>
</author>
<published>2019-03-15T18:51:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d6752e185c3168771787a02dc6a55f32260943cc'/>
<id>urn:sha1:d6752e185c3168771787a02dc6a55f32260943cc</id>
<content type='text'>
If we encounter a failure during suspend where this RTC was programmed
to wakeup the system from suspend, but that wakeup couldn't be
configured because the system didn't support wakeup interrupts, we'll
run into the following warning:

	Unbalanced IRQ 166 wake disable
	WARNING: CPU: 7 PID: 3071 at kernel/irq/manage.c:669 irq_set_irq_wake+0x108/0x278

This happens because the suspend process isn't aborted when the RTC
fails to configure the wakeup IRQ. Instead, we continue suspending the
system and then another suspend callback fails the suspend process and
"unwinds" the previously suspended drivers by calling their resume
callbacks. When we get back to resuming this RTC driver, we'll call
disable_irq_wake() on an IRQ that hasn't been configured for wake.

Let's just fail suspend/resume here if we can't configure the system to
wake and the user has chosen to wakeup with this device. This fixes this
warning and makes the code more robust in case there are systems out
there that can't wakeup from suspend on this line but the user has
chosen to do so.

Cc: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Cc: Evan Green &lt;evgreen@chromium.org&gt;
Cc: Benson Leung &lt;bleung@chromium.org&gt;
Cc: Guenter Roeck &lt;groeck@chromium.org&gt;
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Acked-By: Benson Leung &lt;bleung@chromium.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: cros-ec: Switch to SPDX identifier.</title>
<updated>2018-06-07T18:09:49Z</updated>
<author>
<name>Enric Balletbo i Serra</name>
<email>enric.balletbo@collabora.com</email>
</author>
<published>2018-06-06T15:08:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8ee4aee5b504e515a986a1415e45c81efaae8df7'/>
<id>urn:sha1:8ee4aee5b504e515a986a1415e45c81efaae8df7</id>
<content type='text'>
Adopt the SPDX license identifier headers to ease license compliance
management.

Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: cros-ec: Make license text and module license match.</title>
<updated>2018-06-07T18:09:49Z</updated>
<author>
<name>Enric Balletbo i Serra</name>
<email>enric.balletbo@collabora.com</email>
</author>
<published>2018-06-06T15:08:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e6988d23484417b8859d1c56d8378d7d08394c72'/>
<id>urn:sha1:e6988d23484417b8859d1c56d8378d7d08394c72</id>
<content type='text'>
The license text is specifying "GPLv2" but the MODULE_LICENSE is set to
GPL which means GNU Public License v2 or later. When MODULE_LICENSE and
boiler plate does not match, go for boiler plate license.

Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: cros-ec: return -ETIME when refused to set alarms in the past</title>
<updated>2018-03-17T13:20:53Z</updated>
<author>
<name>Jeffy Chen</name>
<email>jeffy.chen@rock-chips.com</email>
</author>
<published>2018-02-27T02:50:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=72dd71f0dae47183efdf92279927ff26f0ed9f3f'/>
<id>urn:sha1:72dd71f0dae47183efdf92279927ff26f0ed9f3f</id>
<content type='text'>
Since accessing a Chrome OS EC based rtc is a slow operation, there is a
race window where if the alarm is set for the next second and the second
ticks over right before calculating the alarm offset.

In this case the current driver is setting a 0-second alarm, which would
be considered as disabling alarms by the EC(EC_RTC_ALARM_CLEAR).

This breaks, e.g., hwclock which relies on RTC_UIE_ON -&gt;
rtc_update_irq_enable(), which sets a 1-second alarm and expects it to
fire an interrupt.

So return -ETIME when the alarm is in the past, follow __rtc_set_alarm().

Signed-off-by: Jeffy Chen &lt;jeffy.chen@rock-chips.com&gt;
Reviewed-by: Brian Norris &lt;briannorris@chromium.org&gt;
Tested-by: Brian Norris &lt;briannorris@chromium.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: cros-ec: add cros-ec-rtc driver.</title>
<updated>2017-12-18T22:05:10Z</updated>
<author>
<name>Stephen Barber</name>
<email>smbarber@chromium.org</email>
</author>
<published>2017-11-10T21:55:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6f2a71a31afd738af446c802e1ed40365afa55b8'/>
<id>urn:sha1:6f2a71a31afd738af446c802e1ed40365afa55b8</id>
<content type='text'>
On platforms with a Chrome OS EC, the EC can function as a simple RTC.
Add a basic driver with this functionality.

Signed-off-by: Stephen Barber &lt;smbarber@chromium.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Acked-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Acked-by: Benson Leung &lt;bleung@chromium.org&gt;
Reviewed-by: Brian Norris &lt;briannorris@chromium.org&gt;
Tested-by: Brian Norris &lt;briannorris@chromium.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
</feed>
