Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5148C05027 for ; Tue, 7 Feb 2023 03:16:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229953AbjBGDQ4 (ORCPT ); Mon, 6 Feb 2023 22:16:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229625AbjBGDQr (ORCPT ); Mon, 6 Feb 2023 22:16:47 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5173366B8; Mon, 6 Feb 2023 19:16:20 -0800 (PST) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3170tsag011387; Tue, 7 Feb 2023 03:16:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=qup1RxrKOI+yWY2WpGSXvyiL3q8pqV6ud0mFkDQB6DU=; b=LIXA6IVKagk5VUKjhMakUPCPiCJohpzyWcXHGjyFmNYZAOP6n+O0Wnd/z6Yx5o59xwN/ vbNVpi/tWszjcbl980j/m0s8eG01KYLqf5sgafEqkWFY7IkRc0ZSauvrcet3nTiCgP18 YCHDp8IY5oJo681RUYVZd0XG6Ct9uoNsVxh4qcM9MjzK3Ag5/E9XuqMiwNUIUU9H3UZ0 7PSKkl+JvgoGwc/Lq4tUbpW+dvnvj0/Jn3/YBHkR2gH0ZAuyZwCfFwgSBmo/oGM2v7/2 DkV897tTgrzrB5QxvS2NfrZ8+MQ94TFUB8Tvb0I9Re8nYq2MHOGuZOL3sgJ6IDjjfNJo XA== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3nhepswday-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 Feb 2023 03:16:13 +0000 Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3173GChp007471 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 7 Feb 2023 03:16:12 GMT Received: from [10.47.206.1] (10.49.16.6) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Mon, 6 Feb 2023 19:16:11 -0800 Message-ID: <1adf58e8-3afa-856a-2e91-1a4b269edc8f@quicinc.com> Date: Mon, 6 Feb 2023 19:16:09 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v2 13/22] rtc: pm8xxx: refactor read_time() Content-Language: en-US To: Johan Hovold , Alexandre Belloni , Bjorn Andersson CC: Andy Gross , Konrad Dybcio , Alessandro Zummo , Rob Herring , Krzysztof Kozlowski , Maximilian Luz , , , , References: <20230202155448.6715-1-johan+linaro@kernel.org> <20230202155448.6715-14-johan+linaro@kernel.org> From: David Collins In-Reply-To: <20230202155448.6715-14-johan+linaro@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: -z3EN0ZZZg2dbGs3KLfdkCw1sE0Xys9C X-Proofpoint-ORIG-GUID: -z3EN0ZZZg2dbGs3KLfdkCw1sE0Xys9C X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-02-06_07,2023-02-06_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 suspectscore=0 spamscore=0 clxscore=1015 impostorscore=0 malwarescore=0 bulkscore=0 adultscore=0 mlxscore=0 phishscore=0 mlxlogscore=999 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302070028 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/2/23 07:54, Johan Hovold wrote: > In preparation for adding support for setting the time by means of an > externally stored offset, refactor read_time() by adding a new helper > that can be used to retrieve the raw time as stored in the RTC. > > Signed-off-by: Johan Hovold > --- > drivers/rtc/rtc-pm8xxx.c | 54 ++++++++++++++++++++++++---------------- > 1 file changed, 33 insertions(+), 21 deletions(-) > > diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c > index b1ce246c501a..2f96a178595c 100644 > --- a/drivers/rtc/rtc-pm8xxx.c > +++ b/drivers/rtc/rtc-pm8xxx.c > @@ -59,6 +59,37 @@ struct pm8xxx_rtc { > struct device *dev; > }; > > +static int pm8xxx_rtc_read_raw(struct pm8xxx_rtc *rtc_dd, u32 *secs) I think that pm8xxx_rtc_read_time_raw() might be a better name for this function to avoid any possible confusion if it is being used to read the RTC time or the alarm time. The patch looks good to me otherwise. Take care, David