<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/rtc/rtc-s3c.c, branch v6.18.21</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-09-16T15:38:20+00:00</updated>
<entry>
<title>rtc: s3c: Drop support for S3C2410</title>
<updated>2025-09-16T15:38:20+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@linaro.org</email>
</author>
<published>2025-08-30T13:00:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9693342805748bcf0c02b16ac0a0aa852688dea9'/>
<id>urn:sha1:9693342805748bcf0c02b16ac0a0aa852688dea9</id>
<content type='text'>
Samsung S3C24xx family of SoCs was removed the Linux kernel in the
commit 61b7f8920b17 ("ARM: s3c: remove all s3c24xx support"), in January
2023.  There are no in-kernel users of remaining S3C24xx compatibles.

Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Link: https://lore.kernel.org/r/20250830130024.142815-5-krzysztof.kozlowski@linaro.org
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: s3c: Put 'const' just after 'static' keyword for data</title>
<updated>2025-07-22T22:45:21+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@linaro.org</email>
</author>
<published>2025-07-07T09:22:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8b52144f0e08e7640bdbaf7b6a2527b3e100a769'/>
<id>urn:sha1:8b52144f0e08e7640bdbaf7b6a2527b3e100a769</id>
<content type='text'>
Convention is to define static data as 'static const ...', not 'static
... const' because of readability, even if the code is functionally
equal.

Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Link: https://lore.kernel.org/r/20250707092200.48862-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: s3c: drop unused module alias</title>
<updated>2025-05-24T21:58:24+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan+linaro@kernel.org</email>
</author>
<published>2025-04-23T13:03:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=149834a414e1fc25411a2e0e913ba3127e5758c9'/>
<id>urn:sha1:149834a414e1fc25411a2e0e913ba3127e5758c9</id>
<content type='text'>
The driver only support OF probe so drop the unused platform module
alias.

Fixes: ae05c95074e0 ("rtc: s3c: add s3c_rtc_data structure to use variant data instead of s3c_cpu_type")
Signed-off-by: Johan Hovold &lt;johan+linaro@kernel.org&gt;
Fixes: 0d297df03890 ("ARM: s3c: simplify platform code")
Reviewed-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Link: https://lore.kernel.org/r/20250423130318.31244-7-johan+linaro@kernel.org
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: use boolean values with device_init_wakeup()</title>
<updated>2025-01-09T17:29:24+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2024-12-17T07:13:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8c28c4993f117e03130a51160229bde7ad388240'/>
<id>urn:sha1:8c28c4993f117e03130a51160229bde7ad388240</id>
<content type='text'>
device_init_wakeup() second argument is a bool type. Use proper boolean
values when calling it to match the type and to produce unambiguous code
which is easier to understand.

Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Reviewed-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Reviewed-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Link: https://lore.kernel.org/r/20241217071331.3607-2-wsa+renesas@sang-engineering.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: Switch back to struct platform_driver::remove()</title>
<updated>2024-11-10T21:58:28+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@baylibre.com</email>
</author>
<published>2024-10-07T20:58:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e5eab1aeae765c30bd2ef50156dc9698c239ad31'/>
<id>urn:sha1:e5eab1aeae765c30bd2ef50156dc9698c239ad31</id>
<content type='text'>
After commit 0edb555a65d1 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.

Convert all platform drivers below drivers/rtc to use .remove(), with
the eventual goal to drop struct platform_driver::remove_new(). As
.remove() and .remove_new() have the same prototypes, conversion is done
by just changing the structure member name in the driver initializer.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@baylibre.com&gt;
Link: https://lore.kernel.org/r/20241007205803.444994-6-u.kleine-koenig@baylibre.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: Explicitly include correct DT includes</title>
<updated>2023-07-27T21:31:29+00:00</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2023-07-24T20:54:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=48144c2890503b919bc8ee128b63e37008d69250'/>
<id>urn:sha1:48144c2890503b919bc8ee128b63e37008d69250</id>
<content type='text'>
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Link: https://lore.kernel.org/r/20230724205456.767430-1-robh@kernel.org
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: s3c: Convert to platform remove callback returning void</title>
<updated>2023-03-17T22:03:18+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-03-04T13:30:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9e6a2ad120fa3f785f013e70ae7d872abafb8318'/>
<id>urn:sha1:9e6a2ad120fa3f785f013e70ae7d872abafb8318</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20230304133028.2135435-30-u.kleine-koenig@pengutronix.de
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: s3c: Switch to use dev_err_probe() helper</title>
<updated>2022-11-15T20:01:51+00:00</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2022-09-19T08:38:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eb633de6abcb3003a8a2c03377d39a91a8d57d20'/>
<id>urn:sha1:eb633de6abcb3003a8a2c03377d39a91a8d57d20</id>
<content type='text'>
In the probe path, dev_err() can be replace with dev_err_probe()
which will check if error code is -EPROBE_DEFER and prints the
error name.

Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Link: https://lore.kernel.org/r/20220919083812.755082-1-yangyingliang@huawei.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: s3c: Add time range</title>
<updated>2021-10-23T21:57:23+00:00</updated>
<author>
<name>Sam Protsenko</name>
<email>semen.protsenko@linaro.org</email>
</author>
<published>2021-10-21T20:22:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a5feda3b361e11b291786d5c4ff86d4b9a55498f'/>
<id>urn:sha1:a5feda3b361e11b291786d5c4ff86d4b9a55498f</id>
<content type='text'>
This RTC driver starts counting from 2000 to avoid Y2K problem. Also it
only supports 100 years range for all RTCs.  Provide that info to RTC
framework. Also remove check for 100 years range in s3c_rtc_settime(),
as RTC core won't pass any invalid values to the driver, now that
correct range is set.

Here is the rationale on 100 years range limitation. Info on different
Samsung RTCs (credit goes to Krzysztof Kozlowski):
  - All S3C chips have only 8-bit wide year register (can store 100
    years range in BCD format)
  - S5Pv210 and Exynos chips have 12-bit year register (can store 1000
    years range in BCD format)

But in reality we usually can't make use of those 12 bits either:
  - RTCs might think that both 2000 and 2100 years are leap years. So
    when the YEAR register is 0, RTC goes from 28 Feb to 29 Feb, and
    when the YEAR register is 100, RTC also goes from 28 Feb to 29 Feb.
    This is of course incorrect: RTC breaks leap year criteria, which
    breaks the time contiguity, which leads to inability to use the RTC
    after year of 2099. It was found for example on Exynos850 SoC.
  - Despite having 12 bits for holding the year value, RTC might
    overflow the year value internally much earlier. For example, on
    Exynos850 the RTC overflows when YEAR=159, making the next YEAR=0.
    This way RTC actually has range of 160 years, not 1000 as one may
    think.

All that said, there is no sense in trying to increase the time range
for more than 100 years on RTCs that seem capable of that. It also
doesn't have too much practical value -- current hardware will be
probably obsolete by 2100.

Tested manually on Exynos850 RTC:

    $ date -s "1999-12-31 23:59:50"
    $ hwclock -w -f /dev/rtc0
    $ date -s "2100-01-01 00:00:00"
    $ hwclock -w -f /dev/rtc0
    $ date -s "2000-01-01 00:00:00"
    $ hwclock -w -f /dev/rtc0
    $ hwclock -r -f /dev/rtc0
    $ date -s "2099-12-31 23:59:50"
    $ hwclock -w -f /dev/rtc0
    $ hwclock -r -f /dev/rtc0

Signed-off-by: Sam Protsenko &lt;semen.protsenko@linaro.org&gt;
Reviewed-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@canonical.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20211021202256.28517-4-semen.protsenko@linaro.org
</content>
</entry>
<entry>
<title>rtc: s3c: Extract read/write IO into separate functions</title>
<updated>2021-10-23T21:57:23+00:00</updated>
<author>
<name>Sam Protsenko</name>
<email>semen.protsenko@linaro.org</email>
</author>
<published>2021-10-21T20:22:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e4a1444e10cbda2892a4ea7325ef5efa47c75cfb'/>
<id>urn:sha1:e4a1444e10cbda2892a4ea7325ef5efa47c75cfb</id>
<content type='text'>
Create dedicated functions for I/O operations and BCD conversion. It can
be useful to separate those from representation conversion and other
stuff found in RTC callbacks.

This patch does not introduce any functional changes, it's merely
refactoring change.

Signed-off-by: Sam Protsenko &lt;semen.protsenko@linaro.org&gt;
Reviewed-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@canonical.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20211021202256.28517-3-semen.protsenko@linaro.org
</content>
</entry>
</feed>
