<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/rtc, branch v4.20</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.20</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.20'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-11-30T20:23:44Z</updated>
<entry>
<title>Merge tag 'staging-4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging</title>
<updated>2018-11-30T20:23:44Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2018-11-30T20:23:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cd9a0433238da43611179e44b1d71ad24998b107'/>
<id>urn:sha1:cd9a0433238da43611179e44b1d71ad24998b107</id>
<content type='text'>
Pull staging and IIO driver fixes from Greg KH:
 "Here are some small IIO and staging driver fixes for 4.20-rc5.

  Nothing major, the IIO fix ended up touching the HID drivers at the
  same time, but the HID maintainer acked it. The staging fixes are all
  minor patches for reported issues and regressions, full details are in
  the shortlog.

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'staging-4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  iio/hid-sensors: Fix IIO_CHAN_INFO_RAW returning wrong values for signed numbers
  staging: vchiq_arm: fix compat VCHIQ_IOC_AWAIT_COMPLETION
  staging: mt7621-pinctrl: fix uninitialized variable ngroups
  staging: rtl8723bs: Add missing return for cfg80211_rtw_get_station
  staging: most: use format specifier "%s" in snprintf
  staging: rtl8723bs: Fix incorrect sense of ether_addr_equal
  staging: mt7621-dma: fix potentially dereferencing uninitialized 'tx_desc'
  staging: comedi: clarify/unify macros for NI macro-defined terminals
  drivers: staging: cedrus: find ctx before dereferencing it ctx
  staging: rtl8723bs: Fix the return value in case of error in 'rtw_wx_read32()'
  staging: comedi: ni_mio_common: scale ao INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS
  iio:st_magn: Fix enable device after trigger
</content>
</entry>
<entry>
<title>iio/hid-sensors: Fix IIO_CHAN_INFO_RAW returning wrong values for signed numbers</title>
<updated>2018-11-16T11:42:12Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2018-10-31T14:20:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0145b50566e7de5637e80ecba96c7f0e6fff1aad'/>
<id>urn:sha1:0145b50566e7de5637e80ecba96c7f0e6fff1aad</id>
<content type='text'>
Before this commit sensor_hub_input_attr_get_raw_value() failed to take
the signedness of 16 and 8 bit values into account, returning e.g.
65436 instead of -100 for the z-axis reading of an accelerometer.

This commit adds a new is_signed parameter to the function and makes all
callers pass the appropriate value for this.

While at it, this commit also fixes up some neighboring lines where
statements were needlessly split over 2 lines to improve readability.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Acked-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>rtc: pcf2127: fix a kmemleak caused in pcf2127_i2c_gather_write</title>
<updated>2018-11-07T16:13:56Z</updated>
<author>
<name>Xulin Sun</name>
<email>xulin.sun@windriver.com</email>
</author>
<published>2018-11-06T08:42:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9bde0afb7a906f1dabdba37162551565740b862d'/>
<id>urn:sha1:9bde0afb7a906f1dabdba37162551565740b862d</id>
<content type='text'>
pcf2127_i2c_gather_write() allocates memory as local variable
for i2c_master_send(), after finishing the master transfer,
the allocated memory should be freed. The kmemleak is reported:

unreferenced object 0xffff80231e7dba80 (size 64):
  comm "hwclock", pid 27762, jiffies 4296880075 (age 356.944s)
  hex dump (first 32 bytes):
    03 00 12 03 19 02 11 13 00 80 98 18 00 00 ff ff ................
    00 50 00 00 00 00 00 00 02 00 00 00 00 00 00 00 .P..............
  backtrace:
    [&lt;ffff000008221398&gt;] create_object+0xf8/0x278
    [&lt;ffff000008a96264&gt;] kmemleak_alloc+0x74/0xa0
    [&lt;ffff00000821070c&gt;] __kmalloc+0x1ac/0x348
    [&lt;ffff0000087ed1dc&gt;] pcf2127_i2c_gather_write+0x54/0xf8
    [&lt;ffff0000085fd9d4&gt;] _regmap_raw_write+0x464/0x850
    [&lt;ffff0000085fe3f4&gt;] regmap_bulk_write+0x1a4/0x348
    [&lt;ffff0000087ed32c&gt;] pcf2127_rtc_set_time+0xac/0xe8
    [&lt;ffff0000087eaad8&gt;] rtc_set_time+0x80/0x138
    [&lt;ffff0000087ebfb0&gt;] rtc_dev_ioctl+0x398/0x610
    [&lt;ffff00000823f2c0&gt;] do_vfs_ioctl+0xb0/0x848
    [&lt;ffff00000823fae4&gt;] SyS_ioctl+0x8c/0xa8
    [&lt;ffff000008083ac0&gt;] el0_svc_naked+0x34/0x38
    [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

Signed-off-by: Xulin Sun &lt;xulin.sun@windriver.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: hctosys: Add missing range error reporting</title>
<updated>2018-11-07T16:13:55Z</updated>
<author>
<name>Maciej W. Rozycki</name>
<email>macro@linux-mips.org</email>
</author>
<published>2018-11-05T03:48:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7ce9a992ffde8ce93d5ae5767362a5c7389ae895'/>
<id>urn:sha1:7ce9a992ffde8ce93d5ae5767362a5c7389ae895</id>
<content type='text'>
Fix an issue with the 32-bit range error path in `rtc_hctosys' where no
error code is set and consequently the successful preceding call result
from `rtc_read_time' is propagated to `rtc_hctosys_ret'.  This in turn
makes any subsequent call to `hctosys_show' incorrectly report in sysfs
that the system time has been set from this RTC while it has not.

Set the error to ERANGE then if we can't express the result due to an
overflow.

Signed-off-by: Maciej W. Rozycki &lt;macro@linux-mips.org&gt;
Fixes: b3a5ac42ab18 ("rtc: hctosys: Ensure system time doesn't overflow time_t")
Cc: stable@vger.kernel.org # 4.17+
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: cmos: Do not export alarm rtc_ops when we do not support alarms</title>
<updated>2018-11-07T16:13:55Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2018-09-04T14:51:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fbb974ba693bbfb4e24a62181ef16d4e45febc37'/>
<id>urn:sha1:fbb974ba693bbfb4e24a62181ef16d4e45febc37</id>
<content type='text'>
When there is no IRQ configured for the RTC, the rtc-cmos code does not
support alarms, all alarm rtc_ops fail with -EIO / -EINVAL.

The rtc-core expects a rtc driver which does not support rtc alarms to
not have alarm ops at all. Otherwise the wakealarm sysfs attr will read
as empty rather then returning an error, making it impossible for
userspace to find out beforehand if alarms are supported.

A system without an IRQ for the RTC before this patch:
[root@localhost ~]# cat /sys/class/rtc/rtc0/wakealarm
[root@localhost ~]#

After this patch:
[root@localhost ~]# cat /sys/class/rtc/rtc0/wakealarm
cat: /sys/class/rtc/rtc0/wakealarm: No such file or directory
[root@localhost ~]#

This fixes gnome-session + systemd trying to use suspend-then-hibernate,
which causes systemd to abort the suspend when writing the RTC alarm fails.

BugLink: https://github.com/systemd/systemd/issues/9988
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: sc27xx: Always read normal alarm when registering RTC device</title>
<updated>2018-10-25T00:35:42Z</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2018-10-18T08:52:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3822d1bb0df18aa28930f19bc46e0704aea1be0f'/>
<id>urn:sha1:3822d1bb0df18aa28930f19bc46e0704aea1be0f</id>
<content type='text'>
When registering one RTC device, it will check to see if there is an
alarm already set in RTC hardware by reading RTC alarm, at this time
we should always read the normal alarm put in always-on region by
checking the rtc-&gt;registered flag.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: sc27xx: Add check to see if need to enable the alarm interrupt</title>
<updated>2018-10-25T00:35:40Z</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2018-10-18T08:52:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bf2c532b67fc077051e17de4a1304a83e5ca5b15'/>
<id>urn:sha1:bf2c532b67fc077051e17de4a1304a83e5ca5b15</id>
<content type='text'>
The RTC interrupt enable register is not put in always-power-on region
supplied by VDDRTC, so we should check if we need enable the alarm
interrupt when system booting.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: sc27xx: Remove interrupts disable and clear in probe()</title>
<updated>2018-10-25T00:35:39Z</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2018-10-18T08:52:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b2ddc48582efa157635f7ef815c9d4a657e2cabd'/>
<id>urn:sha1:b2ddc48582efa157635f7ef815c9d4a657e2cabd</id>
<content type='text'>
When registering one rtc device, it will check to see if there is an
alarm already set in rtc hardware by issuing __rtc_read_alarm(). So
we should not disable the RTC interrupts and clear the interrupts
status in probe() function.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: sc27xx: Clear SPG value update interrupt status</title>
<updated>2018-10-25T00:35:38Z</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2018-10-18T08:52:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7db5adfa63167dac548022c973e00da7f56ffb72'/>
<id>urn:sha1:7db5adfa63167dac548022c973e00da7f56ffb72</id>
<content type='text'>
We should clear the SPG value update interrupt status once the SPG value
is updated successfully, in case incorrect status validation for next time.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: sc27xx: Set wakeup capability before registering rtc device</title>
<updated>2018-10-25T00:35:36Z</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2018-10-18T08:52:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a86d6b23ed9729d47b2818857d8fa5d8e3f8284a'/>
<id>urn:sha1:a86d6b23ed9729d47b2818857d8fa5d8e3f8284a</id>
<content type='text'>
Set wakeup capability before registering rtc device, in case the alarmtimer
can find one available rtc device.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
</feed>
