From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752888AbdGFHdw (ORCPT ); Thu, 6 Jul 2017 03:33:52 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:6813 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752497AbdGFHdu (ORCPT ); Thu, 6 Jul 2017 03:33:50 -0400 Subject: Re: [PATCH 2/2] rtc: stm32: add STM32H7 RTC support To: Alexandre Belloni CC: Alessandro Zummo , Rob Herring , Mark Rutland , Maxime Coquelin , Alexandre Torgue , , , , References: <1498470689-26829-1-git-send-email-amelie.delaunay@st.com> <1498470689-26829-3-git-send-email-amelie.delaunay@st.com> <20170705213746.6hf5af57ty6wsfgs@piout.net> From: Amelie DELAUNAY Message-ID: Date: Thu, 6 Jul 2017 09:33:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170705213746.6hf5af57ty6wsfgs@piout.net> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.47] X-ClientProxiedBy: SFHDAG5NODE3.st.com (10.75.127.15) To SFHDAG3NODE2.st.com (10.75.127.8) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-06_04:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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