<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/rtc/rtc-sysfs.c, branch v4.19.225</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.19.225</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.19.225'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2019-11-20T17:45:25Z</updated>
<entry>
<title>rtc: sysfs: fix NULL check in rtc_add_groups()</title>
<updated>2019-11-20T17:45:25Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2018-08-27T09:22:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5a408693b414afcea1e0c31ed4b2e36fe3a64458'/>
<id>urn:sha1:5a408693b414afcea1e0c31ed4b2e36fe3a64458</id>
<content type='text'>
[ Upstream commit 777d8ae56da18fb6440acd941edb3597c1b02bf0 ]

devm_kcalloc() returns NULL, it never returns error pointers.  In the
current code we would return PTR_ERR(NULL) which is success, instead of
returning the -ENOMEM error code.

Fixes: a0a1a1ba3032 ("rtc: sysfs: facilitate attribute add to rtc device")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>rtc: sysfs: facilitate attribute add to rtc device</title>
<updated>2018-08-14T20:56:27Z</updated>
<author>
<name>Denis Osterland</name>
<email>Denis.Osterland@diehl.com</email>
</author>
<published>2018-07-24T11:31:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a0a1a1ba303261d25814d11a05008d2931a69a8b'/>
<id>urn:sha1:a0a1a1ba303261d25814d11a05008d2931a69a8b</id>
<content type='text'>
This patches addresses following problem:
rtc_allocate_device
devm_device_add_group  &lt;-- kernel oops / null pointer, because
			sysfs entry does not yet exist
rtc_register_device
rc = devm_device_add_group
if (rc)
	return rc;     &lt;-- forbidden to return error code
			after device register

This patch adds rtc_add_group(s) functions.
The functions store the sum of attribute groups as device resource.

Signed-off-by: Denis Osterland &lt;Denis.Osterland@diehl.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: Add RTC range</title>
<updated>2018-03-17T13:20:54Z</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2018-02-17T13:58:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=71db049e7355f31604e2c04b6cabb71d02bd487d'/>
<id>urn:sha1:71db049e7355f31604e2c04b6cabb71d02bd487d</id>
<content type='text'>
Add a way for drivers to inform the core of the supported date/time range.
The core can then check whether the date/time or alarm is in the range
before calling -&gt;set_time, -&gt;set_mmss or -&gt;set_alarm. It returns -ERANGE
when the time is out of range.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: sysfs: Use time64_t variables to set time/alarm</title>
<updated>2017-11-10T08:57:38Z</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2017-11-09T07:09:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9a06da2ecc92a81e969bd8c3768f63b63cb02e80'/>
<id>urn:sha1:9a06da2ecc92a81e969bd8c3768f63b63cb02e80</id>
<content type='text'>
Use time64_t variables and related APIs for sysfs interfaces to
support setting time or alarm after the year 2038 on 32-bit system.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: sysfs: make name uniform</title>
<updated>2017-06-03T08:52:04Z</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@free-electrons.com</email>
</author>
<published>2017-06-02T11:57:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=77a73f3caece06d1d17268f43ec39c5779e6ce24'/>
<id>urn:sha1:77a73f3caece06d1d17268f43ec39c5779e6ce24</id>
<content type='text'>
The name sysfs attribute is not useful in its current form because of all
the drivers:
 - 3 are using the feature correctly
 - 2 are clearly misusing it
 - 60 are using driver.name, either directly or indirectly
 - 46 are using pdev-&gt;name
 - 8 are using client-&gt;name
 - 31 are using a variation of driver.name (addition or removal of rtc-,
   -rtc, _rtc, rtc_)

Make it uniform and use the driver name and the device name.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: sysfs: fix a cast removing the const attribute</title>
<updated>2016-08-31T16:21:35Z</updated>
<author>
<name>LABBE Corentin</name>
<email>clabbe.montjoie@gmail.com</email>
</author>
<published>2016-08-12T12:46:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=84281c2d72a70456a3ba8d1e49548dd469f2e9d8'/>
<id>urn:sha1:84281c2d72a70456a3ba8d1e49548dd469f2e9d8</id>
<content type='text'>
The char pointer buf_ptr is assigned an address from a const char
pointer buf (parameter of wakealarm_store).
The data pointer by buf_ptr is never modified.
So casting it to a (char *) is useless.

This patch remove this cast, and transform buf_ptr to a const char pointer.

Signed-off-by: LABBE Corentin &lt;clabbe.montjoie@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: implement a sysfs interface for clock offset</title>
<updated>2016-03-14T16:08:16Z</updated>
<author>
<name>Joshua Clayton</name>
<email>stillcompiling@gmail.com</email>
</author>
<published>2016-02-05T20:41:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5495a4159f7413f0367e8c9727ba9facd40ade7f'/>
<id>urn:sha1:5495a4159f7413f0367e8c9727ba9facd40ade7f</id>
<content type='text'>
clock offset may be set and read in decimal parts per billion
attribute is /sys/class/rtc/rtcN/offset
The attribute is only visible for rtcs that have set_offset implemented.

Signed-off-by: Joshua Clayton &lt;stillcompiling@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: Replace simple_strtoul by kstrtoul</title>
<updated>2016-01-11T19:20:02Z</updated>
<author>
<name>LABBE Corentin</name>
<email>clabbe.montjoie@gmail.com</email>
</author>
<published>2015-12-17T13:11:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f571287bda5390751ab4e4d5e3f54fa2d1788667'/>
<id>urn:sha1:f571287bda5390751ab4e4d5e3f54fa2d1788667</id>
<content type='text'>
The simple_strtoul function is obsolete.
This patch replace it by kstrtoul.

Since kstrtoul is more strict, it permits to filter some invalid input that
simple_strtoul accept. For example:
echo '1022xxx' &gt; /sys/devices/pnp0/00:03/rtc/rtc0/max_user_freq
cat /sys/devices/pnp0/00:03/rtc/rtc0/max_user_freq
1022

Signed-off-by: LABBE Corentin &lt;clabbe.montjoie@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: switch to using is_visible() to control sysfs attributes</title>
<updated>2015-09-05T11:19:07Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2015-07-23T23:01:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3ee2c40b7ac2bf121aaa1176d8ac25b6a26e3a94'/>
<id>urn:sha1:3ee2c40b7ac2bf121aaa1176d8ac25b6a26e3a94</id>
<content type='text'>
Instead of creating wakealarm attribute manually, after the device has been
registered, let's rely on facilities provided by the attribute groups to
control which attributes are visible and which are not. This allows to
create all needed attributes at once, at the same time that we register RTC
class device.

Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Reviewed-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: switch wakealarm attribute to DEVICE_ATTR_RW</title>
<updated>2015-09-05T11:19:07Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2015-07-23T23:01:07Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a17ccd1c6a327e5b468358e8352a6af004261473'/>
<id>urn:sha1:a17ccd1c6a327e5b468358e8352a6af004261473</id>
<content type='text'>
Instead of using older style DEVICE_ATTR for wakealarm attribute let's
switch to using DEVICE_ATTR_RW that ensures consistent across the kernel
permissions on the attribute.

Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Reviewed-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
</feed>
