<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/rtc/rtc-stm32.c, branch v4.20</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: stm32: add stm32mp1 rtc support</title>
<updated>2018-05-22T18:10:54+00:00</updated>
<author>
<name>Amelie Delaunay</name>
<email>amelie.delaunay@st.com</email>
</author>
<published>2018-05-17T12:04:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b72252b6580c9c7ad74644642378e2a9a86b2283'/>
<id>b72252b6580c9c7ad74644642378e2a9a86b2283</id>
<content type='text'>
This patch adds support for stm32mp1 RTC.
Some common registers with previous RTC version have a different offset.
It is the case for Control Register (CR) and ALaRMA Register (ALRMAR).
There are also new registers regarding event flags: now, Alarm event flag
is in Status Register (SR) and write 1 in Status Clear Register (SCR) is
required to clear the event.

Signed-off-by: Amelie Delaunay &lt;amelie.delaunay@st.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds support for stm32mp1 RTC.
Some common registers with previous RTC version have a different offset.
It is the case for Control Register (CR) and ALaRMA Register (ALRMAR).
There are also new registers regarding event flags: now, Alarm event flag
is in Status Register (SR) and write 1 in Status Clear Register (SCR) is
required to clear the event.

Signed-off-by: Amelie Delaunay &lt;amelie.delaunay@st.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: stm32: rework register management to prepare other version of RTC</title>
<updated>2018-05-22T18:10:52+00:00</updated>
<author>
<name>Amelie Delaunay</name>
<email>amelie.delaunay@st.com</email>
</author>
<published>2018-05-17T12:04:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=02b0cc345c2a1b7f1c590796a02d84e49e51ded0'/>
<id>02b0cc345c2a1b7f1c590796a02d84e49e51ded0</id>
<content type='text'>
This patch reworks register/bits management because next version of RTC
uses the same way of working but with different register's offset or bits
moved in new registers.

Signed-off-by: Amelie Delaunay &lt;amelie.delaunay@st.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch reworks register/bits management because next version of RTC
uses the same way of working but with different register's offset or bits
moved in new registers.

Signed-off-by: Amelie Delaunay &lt;amelie.delaunay@st.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: stm32: fix misspelling and misalignment issues</title>
<updated>2018-05-22T18:10:50+00:00</updated>
<author>
<name>Amelie Delaunay</name>
<email>amelie.delaunay@st.com</email>
</author>
<published>2018-05-17T12:04:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=819cbde5218689d33e0405ebe71bed07bc21f28e'/>
<id>819cbde5218689d33e0405ebe71bed07bc21f28e</id>
<content type='text'>
This patch cleans the following checkpatch complaints:

CHECK: 'initalized' may be misspelled - perhaps 'initialized'?
#644: FILE: drivers/rtc/rtc-stm32.c:644:
+	 * the calendar has been initalized or not. INITS flag is reset by a

CHECK: Alignment should match open parenthesis
#669: FILE: drivers/rtc/rtc-stm32.c:669:
+	rtc-&gt;rtc_dev = devm_rtc_device_register(&amp;pdev-&gt;dev, pdev-&gt;name,
+			&amp;stm32_rtc_ops, THIS_MODULE);

Signed-off-by: Amelie Delaunay &lt;amelie.delaunay@st.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch cleans the following checkpatch complaints:

CHECK: 'initalized' may be misspelled - perhaps 'initialized'?
#644: FILE: drivers/rtc/rtc-stm32.c:644:
+	 * the calendar has been initalized or not. INITS flag is reset by a

CHECK: Alignment should match open parenthesis
#669: FILE: drivers/rtc/rtc-stm32.c:669:
+	rtc-&gt;rtc_dev = devm_rtc_device_register(&amp;pdev-&gt;dev, pdev-&gt;name,
+			&amp;stm32_rtc_ops, THIS_MODULE);

Signed-off-by: Amelie Delaunay &lt;amelie.delaunay@st.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: stm32: get DBP register and mask from DT st, syscfg property</title>
<updated>2018-05-06T20:22:43+00:00</updated>
<author>
<name>Amelie Delaunay</name>
<email>amelie.delaunay@st.com</email>
</author>
<published>2018-04-19T13:21:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=22cb47c1ea2040c0424073c9d67dd0e644334a7c'/>
<id>22cb47c1ea2040c0424073c9d67dd0e644334a7c</id>
<content type='text'>
RTC driver should not be aware of the PWR registers offset and bits
position. Furthermore, we can imagine that DBP relative register and bit
mask could change depending on the SoC.
So this patch introduces 2 parameters, dbp_reg and dbp_mask, allowing to
get PWR_CR and PWR_CR_DBP from device tree. And it prepares next RTC
version, backup domain write protection is disabled only if needed.

Signed-off-by: Amelie Delaunay &lt;amelie.delaunay@st.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
RTC driver should not be aware of the PWR registers offset and bits
position. Furthermore, we can imagine that DBP relative register and bit
mask could change depending on the SoC.
So this patch introduces 2 parameters, dbp_reg and dbp_mask, allowing to
get PWR_CR and PWR_CR_DBP from device tree. And it prepares next RTC
version, backup domain write protection is disabled only if needed.

Signed-off-by: Amelie Delaunay &lt;amelie.delaunay@st.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: stm32: fix alarm interrupt flags by removing IRQF_TRIGGER_RISING</title>
<updated>2018-05-06T20:22:40+00:00</updated>
<author>
<name>Amelie Delaunay</name>
<email>amelie.delaunay@st.com</email>
</author>
<published>2018-04-19T13:21:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d213217d213e0e5648448fc2a5da977a74dc6ad9'/>
<id>d213217d213e0e5648448fc2a5da977a74dc6ad9</id>
<content type='text'>
RTC alarm interrupt is active high and already configured by device tree.
So remove IRQF_TRIGGER_RISING from driver.

Signed-off-by: Amelie Delaunay &lt;amelie.delaunay@st.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
RTC alarm interrupt is active high and already configured by device tree.
So remove IRQF_TRIGGER_RISING from driver.

Signed-off-by: Amelie Delaunay &lt;amelie.delaunay@st.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: stm32: fix copyright and adopt SPDX identifier</title>
<updated>2018-05-06T20:22:39+00:00</updated>
<author>
<name>Amelie Delaunay</name>
<email>amelie.delaunay@st.com</email>
</author>
<published>2018-04-19T13:21:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=248056457287afe742c5a81abd0bdd3ce002750d'/>
<id>248056457287afe742c5a81abd0bdd3ce002750d</id>
<content type='text'>
Fix copyright by removing "SA" and "for STMicroelectronics", not required.
Adopt SPDX identifier.

Signed-off-by: Amelie Delaunay &lt;amelie.delaunay@st.com&gt;
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 copyright by removing "SA" and "for STMicroelectronics", not required.
Adopt SPDX identifier.

Signed-off-by: Amelie Delaunay &lt;amelie.delaunay@st.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: stm32: Fix copyright</title>
<updated>2017-11-29T21:20:56+00:00</updated>
<author>
<name>Benjamin Gaignard</name>
<email>benjamin.gaignard@linaro.org</email>
</author>
<published>2017-11-29T14:26:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9f33399c90741196be71cc4637e623a7d33f8c7f'/>
<id>9f33399c90741196be71cc4637e623a7d33f8c7f</id>
<content type='text'>
Uniformize STMicroelectronics copyrights header

Signed-off-by: Benjamin Gaignard &lt;benjamin.gaignard@st.com&gt;
CC: Amelie Delaunay &lt;amelie.delaunay@st.com&gt;
Acked-by: Alexandre TORGUE &lt;alexandre.torgue@st.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Uniformize STMicroelectronics copyrights header

Signed-off-by: Benjamin Gaignard &lt;benjamin.gaignard@st.com&gt;
CC: Amelie Delaunay &lt;amelie.delaunay@st.com&gt;
Acked-by: Alexandre TORGUE &lt;alexandre.torgue@st.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: stm32: add STM32H7 RTC support</title>
<updated>2017-07-06T20:52:54+00:00</updated>
<author>
<name>Amelie Delaunay</name>
<email>amelie.delaunay@st.com</email>
</author>
<published>2017-07-06T08:47:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9a6757eadc14f01385fd41fe3906dc22dcdb919e'/>
<id>9a6757eadc14f01385fd41fe3906dc22dcdb919e</id>
<content type='text'>
This patch adds support for STM32H7 RTC. On STM32H7, the RTC bus interface
clock (APB clock) needs to be enabled.

Signed-off-by: Amelie Delaunay &lt;amelie.delaunay@st.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds support for STM32H7 RTC. On STM32H7, the RTC bus interface
clock (APB clock) needs to be enabled.

Signed-off-by: Amelie Delaunay &lt;amelie.delaunay@st.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: stm32: fix comparison warnings</title>
<updated>2017-01-22T23:47:15+00:00</updated>
<author>
<name>Amelie Delaunay</name>
<email>amelie.delaunay@st.com</email>
</author>
<published>2017-01-16T10:08:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1d70ba3bfb30cf8d151f18f5bf7d7a218ecede57'/>
<id>1d70ba3bfb30cf8d151f18f5bf7d7a218ecede57</id>
<content type='text'>
This patches fixes comparison between signed and unsigned values as it
could produce an incorrect result when the signed value is converted to
unsigned:

drivers/rtc/rtc-stm32.c: In function 'stm32_rtc_valid_alrm':
drivers/rtc/rtc-stm32.c:404:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if ((((tm-&gt;tm_year &gt; cur_year) &amp;&amp;
...

It also fixes comparison always true or false due to the fact that unsigned
value is compared against zero with &gt;= or &lt;:

drivers/rtc/rtc-stm32.c: In function 'stm32_rtc_init':
drivers/rtc/rtc-stm32.c:514:35: warning: comparison of unsigned expression &gt;= 0 is always true [-Wtype-limits]
  for (pred_a = pred_a_max; pred_a &gt;= 0; pred_a-- ) {

drivers/rtc/rtc-stm32.c:530:44: warning: comparison of unsigned expression &lt; 0 is always false [-Wtype-limits]
     (rate - ((pred_a + 1) * (pred_s + 1)) &lt; 0) ?

Fixes: 4e64350f42e2 ("rtc: add STM32 RTC driver")
Signed-off-by: Amelie Delaunay &lt;amelie.delaunay@st.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patches fixes comparison between signed and unsigned values as it
could produce an incorrect result when the signed value is converted to
unsigned:

drivers/rtc/rtc-stm32.c: In function 'stm32_rtc_valid_alrm':
drivers/rtc/rtc-stm32.c:404:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if ((((tm-&gt;tm_year &gt; cur_year) &amp;&amp;
...

It also fixes comparison always true or false due to the fact that unsigned
value is compared against zero with &gt;= or &lt;:

drivers/rtc/rtc-stm32.c: In function 'stm32_rtc_init':
drivers/rtc/rtc-stm32.c:514:35: warning: comparison of unsigned expression &gt;= 0 is always true [-Wtype-limits]
  for (pred_a = pred_a_max; pred_a &gt;= 0; pred_a-- ) {

drivers/rtc/rtc-stm32.c:530:44: warning: comparison of unsigned expression &lt; 0 is always false [-Wtype-limits]
     (rate - ((pred_a + 1) * (pred_s + 1)) &lt; 0) ?

Fixes: 4e64350f42e2 ("rtc: add STM32 RTC driver")
Signed-off-by: Amelie Delaunay &lt;amelie.delaunay@st.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: stm32: use 0 instead of ~PWR_CR_DBP in regmap_update_bits</title>
<updated>2017-01-22T23:47:15+00:00</updated>
<author>
<name>Amelie Delaunay</name>
<email>amelie.delaunay@st.com</email>
</author>
<published>2017-01-16T08:57:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a560c527638d78bc05d06585fef2d94b22b727b8'/>
<id>a560c527638d78bc05d06585fef2d94b22b727b8</id>
<content type='text'>
Using the ~ operator on a BIT() constant results in a large 'unsigned long'
constant that won't fit into an 'unsigned int' function argument on 64-bit
architectures, resulting in a harmless build warning in x86 allmodconfig:

drivers/rtc/rtc-stm32.c: In function 'stm32_rtc_probe':
drivers/rtc/rtc-stm32.c:651:51: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
  regmap_update_bits(rtc-&gt;dbp, PWR_CR, PWR_CR_DBP, ~PWR_CR_DBP);

As PWR_CR_DBP mask prevents other bits to be cleared, replace all
~PWR_CR_DBP by 0.

Fixes: 4e64350f42e2 ("rtc: add STM32 RTC driver")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Amelie Delaunay &lt;amelie.delaunay@st.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using the ~ operator on a BIT() constant results in a large 'unsigned long'
constant that won't fit into an 'unsigned int' function argument on 64-bit
architectures, resulting in a harmless build warning in x86 allmodconfig:

drivers/rtc/rtc-stm32.c: In function 'stm32_rtc_probe':
drivers/rtc/rtc-stm32.c:651:51: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
  regmap_update_bits(rtc-&gt;dbp, PWR_CR, PWR_CR_DBP, ~PWR_CR_DBP);

As PWR_CR_DBP mask prevents other bits to be cleared, replace all
~PWR_CR_DBP by 0.

Fixes: 4e64350f42e2 ("rtc: add STM32 RTC driver")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Amelie Delaunay &lt;amelie.delaunay@st.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
