Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1681862 > unrolled thread

Re: [PATCH 2/2] rtc: stm32: add STM32H7 RTC support

Started byAlexandre Belloni <alexandre.belloni@free-electrons.com>
First post2017-07-05 23:40 +0200
Last post2017-07-06 09:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 2/2] rtc: stm32: add STM32H7 RTC support Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-07-05 23:40 +0200
    Re: [PATCH 2/2] rtc: stm32: add STM32H7 RTC support Amelie DELAUNAY <amelie.delaunay@st.com> - 2017-07-06 09:40 +0200

#1681862 — Re: [PATCH 2/2] rtc: stm32: add STM32H7 RTC support

FromAlexandre Belloni <alexandre.belloni@free-electrons.com>
Date2017-07-05 23:40 +0200
SubjectRe: [PATCH 2/2] rtc: stm32: add STM32H7 RTC support
Message-ID<u00bF-3nZ-41@gated-at.bofh.it>
Hi,

This is mostly fine, even if I'm not too happy with the
s/ck_rtc/rtc_ck/.

On 26/06/2017 at 11:51:29 +0200, Amelie Delaunay wrote:
> -	rtc->ck_rtc = devm_clk_get(&pdev->dev, NULL);
> -	if (IS_ERR(rtc->ck_rtc)) {
> -		dev_err(&pdev->dev, "no ck_rtc clock");
> -		return PTR_ERR(rtc->ck_rtc);
> +	match = of_match_device(stm32_rtc_of_match, &pdev->dev);
> +	if (match && match->data)
> +		rtc->data = (struct stm32_rtc_data *)match->data;
> +	else
> +		return -EINVAL;

This will never happen, you can remove that test.


-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[toc] | [next] | [standalone]


#1682128

FromAmelie DELAUNAY <amelie.delaunay@st.com>
Date2017-07-06 09:40 +0200
Message-ID<u09yh-1lP-5@gated-at.bofh.it>
In reply to#1681862
Hi,

On 07/05/2017 11:37 PM, Alexandre Belloni wrote:
> Hi,
> 
> This is mostly fine, even if I'm not too happy with the
> s/ck_rtc/rtc_ck/.
> 
This clock name has changed in datasheet between STM32F4/STM32F7 and 
STM32H7, so, I'm not really happy too... But, as there is only one clock 
on F4/F7, its name is not important for the end user. Now that pclk 
appears, we need to distinguish the two clocks, and for the end user, it 
is better if the clock names match the datasheet.

> On 26/06/2017 at 11:51:29 +0200, Amelie Delaunay wrote:
>> -	rtc->ck_rtc = devm_clk_get(&pdev->dev, NULL);
>> -	if (IS_ERR(rtc->ck_rtc)) {
>> -		dev_err(&pdev->dev, "no ck_rtc clock");
>> -		return PTR_ERR(rtc->ck_rtc);
>> +	match = of_match_device(stm32_rtc_of_match, &pdev->dev);
>> +	if (match && match->data)
>> +		rtc->data = (struct stm32_rtc_data *)match->data;
>> +	else
>> +		return -EINVAL;
> 
> This will never happen, you can remove that test.
> 
> 
OK, will be done in V2.

Thanks for the review,
Amelie

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web