<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/rtc/rtc-ds1685.c, branch v5.12</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>rtc: ds1685: use rtc_lock/rtc_unlock</title>
<updated>2021-01-25T22:46:17+00:00</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2021-01-19T22:06:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=811c79166028f732a571a32af2ee68195f6b0a04'/>
<id>811c79166028f732a571a32af2ee68195f6b0a04</id>
<content type='text'>
Avoid accessing directly rtc-&gt;ops_lock and use the RTC core helpers.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Acked-by: Joshua Kinard &lt;kumba@gentoo.org&gt;
Link: https://lore.kernel.org/r/20210119220653.677750-5-alexandre.belloni@bootlin.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Avoid accessing directly rtc-&gt;ops_lock and use the RTC core helpers.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Acked-by: Joshua Kinard &lt;kumba@gentoo.org&gt;
Link: https://lore.kernel.org/r/20210119220653.677750-5-alexandre.belloni@bootlin.com
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: rework rtc_register_device() resource management</title>
<updated>2020-11-19T11:50:12+00:00</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2020-11-09T16:34:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fdcfd854333be5b30377dc5daa9cd0fa1643a979'/>
<id>fdcfd854333be5b30377dc5daa9cd0fa1643a979</id>
<content type='text'>
rtc_register_device() is a managed interface but it doesn't use devres
by itself - instead it marks an rtc_device as "registered" and the devres
callback for devm_rtc_allocate_device() takes care of resource release.

This doesn't correspond with the design behind devres where managed
structures should not be aware of being managed. The correct solution
here is to register a separate devres callback for unregistering the
device.

While at it: rename rtc_register_device() to devm_rtc_register_device()
and add it to the list of managed interfaces in devres.rst. This way we
can avoid any potential confusion of driver developers who may expect
there to exist a corresponding unregister function.

Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20201109163409.24301-8-brgl@bgdev.pl
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
rtc_register_device() is a managed interface but it doesn't use devres
by itself - instead it marks an rtc_device as "registered" and the devres
callback for devm_rtc_allocate_device() takes care of resource release.

This doesn't correspond with the design behind devres where managed
structures should not be aware of being managed. The correct solution
here is to register a separate devres callback for unregistering the
device.

While at it: rename rtc_register_device() to devm_rtc_register_device()
and add it to the list of managed interfaces in devres.rst. This way we
can avoid any potential confusion of driver developers who may expect
there to exist a corresponding unregister function.

Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20201109163409.24301-8-brgl@bgdev.pl
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: add devm_ prefix to rtc_nvmem_register()</title>
<updated>2020-11-19T11:50:11+00:00</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2020-11-09T16:34:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3a905c2d9544a418953d6c18668f0f853fbd9be9'/>
<id>3a905c2d9544a418953d6c18668f0f853fbd9be9</id>
<content type='text'>
rtc_nvmem_register() is a managed interface. It doesn't require any
release function to be called at driver detach. To avoid confusing
driver authors, let's rename it to devm_rtc_nvmem_register() and add it
to the list of managed interfaces in Documentation/.

Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20201109163409.24301-6-brgl@bgdev.pl
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
rtc_nvmem_register() is a managed interface. It doesn't require any
release function to be called at driver detach. To avoid confusing
driver authors, let's rename it to devm_rtc_nvmem_register() and add it
to the list of managed interfaces in Documentation/.

Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20201109163409.24301-6-brgl@bgdev.pl
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: nvmem: remove nvram ABI</title>
<updated>2020-11-19T11:50:11+00:00</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2020-11-09T16:34:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=25ece30561d247b2931b0d11d92e9c976a668771'/>
<id>25ece30561d247b2931b0d11d92e9c976a668771</id>
<content type='text'>
The nvram sysfs attributes have been deprecated at least since v4.13, more
than 3 years ago and nobody ever complained about the deprecation warning.

Remove the sysfs attributes now.

[Bartosz: remove the declaration of rtc_nvmem_unregister()]

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Link: https://lore.kernel.org/r/20201109163409.24301-5-brgl@bgdev.pl
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The nvram sysfs attributes have been deprecated at least since v4.13, more
than 3 years ago and nobody ever complained about the deprecation warning.

Remove the sysfs attributes now.

[Bartosz: remove the declaration of rtc_nvmem_unregister()]

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Link: https://lore.kernel.org/r/20201109163409.24301-5-brgl@bgdev.pl
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: ds1685: Fix bank switching to avoid endless loop</title>
<updated>2020-09-15T09:24:29+00:00</updated>
<author>
<name>Thomas Bogendoerfer</name>
<email>tsbogend@alpha.franken.de</email>
</author>
<published>2020-09-10T08:41:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9f8010e71f091b0609452742cfed4650ee633c44'/>
<id>9f8010e71f091b0609452742cfed4650ee633c44</id>
<content type='text'>
ds1685_rtc_begin_data_access() tried to access an extended register before
enabling access to it by switching to bank 1. Depending on content in NVRAM
this could lead to an endless loop. While at it fix also switch back to
bank 0 in ds1685_rtc_end_data_access().

Signed-off-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Acked-by: Joshua Kinard &lt;kumba@gentoo.org&gt;
Link: https://lore.kernel.org/r/20200910084124.138560-1-tsbogend@alpha.franken.de
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ds1685_rtc_begin_data_access() tried to access an extended register before
enabling access to it by switching to bank 1. Depending on content in NVRAM
this could lead to an endless loop. While at it fix also switch back to
bank 0 in ds1685_rtc_end_data_access().

Signed-off-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Acked-by: Joshua Kinard &lt;kumba@gentoo.org&gt;
Link: https://lore.kernel.org/r/20200910084124.138560-1-tsbogend@alpha.franken.de
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: ds1685: fix build error with make W=1</title>
<updated>2019-11-27T08:31:13+00:00</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2019-11-22T10:22:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4ed3f1b8c4b7d5e75b22300351e103d9ddc0bb3d'/>
<id>4ed3f1b8c4b7d5e75b22300351e103d9ddc0bb3d</id>
<content type='text'>
Fix the following parsing errors when building with W=1:
drivers/rtc/rtc-ds1685.c:1053: error: Cannot parse struct or union!
drivers/rtc/rtc-ds1685.c:1062: error: Cannot parse struct or union!
drivers/rtc/rtc-ds1685.c:1363: warning: cannot understand function prototype: 'struct platform_driver ds1685_rtc_driver = '

Cc: Joshua Kinard &lt;kumba@gentoo.org&gt;
Link: https://lore.kernel.org/r/20191122102212.400158-5-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix the following parsing errors when building with W=1:
drivers/rtc/rtc-ds1685.c:1053: error: Cannot parse struct or union!
drivers/rtc/rtc-ds1685.c:1062: error: Cannot parse struct or union!
drivers/rtc/rtc-ds1685.c:1363: warning: cannot understand function prototype: 'struct platform_driver ds1685_rtc_driver = '

Cc: Joshua Kinard &lt;kumba@gentoo.org&gt;
Link: https://lore.kernel.org/r/20191122102212.400158-5-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: ds1685: remove set but unused variables</title>
<updated>2019-11-27T08:31:13+00:00</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2019-11-22T10:22:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=47401580449c1de65350bd17324f778c7e937ea1'/>
<id>47401580449c1de65350bd17324f778c7e937ea1</id>
<content type='text'>
Fix the following warnings:
drivers/rtc/rtc-ds1685.c: In function ‘ds1685_rtc_read_time’:
drivers/rtc/rtc-ds1685.c:264:5: warning: variable ‘ctrlb’ set but not used [-Wunused-but-set-variable]
  264 |  u8 ctrlb, century;
      |     ^~~~~
drivers/rtc/rtc-ds1685.c: In function ‘ds1685_rtc_proc’:
drivers/rtc/rtc-ds1685.c:758:19: warning: variable ‘ctrlc’ set but not used [-Wunused-but-set-variable]
  758 |  u8 ctrla, ctrlb, ctrlc, ctrld, ctrl4a, ctrl4b, ssn[8];
      |                   ^~~~~
Cc: Joshua Kinard &lt;kumba@gentoo.org&gt;
Acked-By: Joshua Kinard &lt;kumba@gentoo.org&gt;
Link: https://lore.kernel.org/r/20191122102212.400158-4-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix the following warnings:
drivers/rtc/rtc-ds1685.c: In function ‘ds1685_rtc_read_time’:
drivers/rtc/rtc-ds1685.c:264:5: warning: variable ‘ctrlb’ set but not used [-Wunused-but-set-variable]
  264 |  u8 ctrlb, century;
      |     ^~~~~
drivers/rtc/rtc-ds1685.c: In function ‘ds1685_rtc_proc’:
drivers/rtc/rtc-ds1685.c:758:19: warning: variable ‘ctrlc’ set but not used [-Wunused-but-set-variable]
  758 |  u8 ctrla, ctrlb, ctrlc, ctrld, ctrl4a, ctrl4b, ssn[8];
      |                   ^~~~~
Cc: Joshua Kinard &lt;kumba@gentoo.org&gt;
Acked-By: Joshua Kinard &lt;kumba@gentoo.org&gt;
Link: https://lore.kernel.org/r/20191122102212.400158-4-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: ds1685: add indirect access method and remove plat_read/plat_write</title>
<updated>2019-10-16T08:39:00+00:00</updated>
<author>
<name>Thomas Bogendoerfer</name>
<email>tbogendoerfer@suse.de</email>
</author>
<published>2019-10-14T21:46:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=299b610117a4145dfe15963f0ea037ab319ce531'/>
<id>299b610117a4145dfe15963f0ea037ab319ce531</id>
<content type='text'>
SGI Octane (IP30) doesn't have RTC register directly mapped into CPU
address space, but accesses RTC registers with an address and data
register.  This is now supported by additional access functions, which
are selected by a new field in platform data. Removed plat_read/plat_write
since there is no user and their usage could introduce lifetime issue,
when functions are placed in different modules.

Signed-off-by: Thomas Bogendoerfer &lt;tbogendoerfer@suse.de&gt;
Acked-by: Joshua Kinard &lt;kumba@gentoo.org&gt;
Reviewed-by: Joshua Kinard &lt;kumba@gentoo.org&gt;
Link: https://lore.kernel.org/r/20191014214621.25257-1-tbogendoerfer@suse.de
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
SGI Octane (IP30) doesn't have RTC register directly mapped into CPU
address space, but accesses RTC registers with an address and data
register.  This is now supported by additional access functions, which
are selected by a new field in platform data. Removed plat_read/plat_write
since there is no user and their usage could introduce lifetime issue,
when functions are placed in different modules.

Signed-off-by: Thomas Bogendoerfer &lt;tbogendoerfer@suse.de&gt;
Acked-by: Joshua Kinard &lt;kumba@gentoo.org&gt;
Reviewed-by: Joshua Kinard &lt;kumba@gentoo.org&gt;
Link: https://lore.kernel.org/r/20191014214621.25257-1-tbogendoerfer@suse.de
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: ds1685: use devm_platform_ioremap_resource helper</title>
<updated>2019-10-14T15:49:22+00:00</updated>
<author>
<name>Thomas Bogendoerfer</name>
<email>tbogendoerfer@suse.de</email>
</author>
<published>2019-10-11T15:05:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=af818031f4637b0e8d106fcc9023f1c22c44e13a'/>
<id>af818031f4637b0e8d106fcc9023f1c22c44e13a</id>
<content type='text'>
Simplify ioremapping of registers by using devm_platform_ioremap_resource.

Signed-off-by: Thomas Bogendoerfer &lt;tbogendoerfer@suse.de&gt;
Acked-by: Joshua Kinard &lt;kumba@gentoo.org&gt;
Link: https://lore.kernel.org/r/20191011150546.9186-2-tbogendoerfer@suse.de
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Simplify ioremapping of registers by using devm_platform_ioremap_resource.

Signed-off-by: Thomas Bogendoerfer &lt;tbogendoerfer@suse.de&gt;
Acked-by: Joshua Kinard &lt;kumba@gentoo.org&gt;
Link: https://lore.kernel.org/r/20191011150546.9186-2-tbogendoerfer@suse.de
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rts: ds1685: remove not needed fields from private struct</title>
<updated>2019-10-14T15:49:21+00:00</updated>
<author>
<name>Thomas Bogendoerfer</name>
<email>tbogendoerfer@suse.de</email>
</author>
<published>2019-10-11T15:05:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9e420d7f125f51ab1eda37497b08c4fad9efe4a8'/>
<id>9e420d7f125f51ab1eda37497b08c4fad9efe4a8</id>
<content type='text'>
A few of the fields in struct ds1685_priv aren't needed at all,
so we can remove it.

Signed-off-by: Thomas Bogendoerfer &lt;tbogendoerfer@suse.de&gt;
Acked-by: Joshua Kinard &lt;kumba@gentoo.org&gt;
Link: https://lore.kernel.org/r/20191011150546.9186-1-tbogendoerfer@suse.de
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A few of the fields in struct ds1685_priv aren't needed at all,
so we can remove it.

Signed-off-by: Thomas Bogendoerfer &lt;tbogendoerfer@suse.de&gt;
Acked-by: Joshua Kinard &lt;kumba@gentoo.org&gt;
Link: https://lore.kernel.org/r/20191011150546.9186-1-tbogendoerfer@suse.de
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
