Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4198918rdh; Tue, 28 Nov 2023 15:01:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IEfnbtN7mPbX9N/lhbxm6B3iqRY05JXfBtRUMUb6ti2oZHuwYlcKWWk907cNeve4G2VIrB/ X-Received: by 2002:a05:6808:140f:b0:3af:63ad:a610 with SMTP id w15-20020a056808140f00b003af63ada610mr23548907oiv.14.1701212507985; Tue, 28 Nov 2023 15:01:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701212507; cv=none; d=google.com; s=arc-20160816; b=iuDcaqtJvfa+VdxVK/Urj/GVCKDE95Ekys5Z5JNOExcwhLdPTFZ5oJi8sWmwvP1vcc p17gQ1ML90VjgpuL9MhFA2W+lAj1VVrTs97MaVBadFG+aQzmtRf8EC5X2GMqjm1U7gyE HMsVvnCeujBqRAJ78PrnnCcpUL9M1/KTmjLe2bD8bAn6HwnO2jqc/uKVAm0kBULgcxBW d9LEu/mbR93G82+LEoDjm2GFMinhGKXPBsQsmxScJJwhWn5OjDj+HI6WCLgMkohLxk28 Jr7tVz7knCaIFH4Me+ofeYkzcUvPNcT5vjiF3La7tCjw9AYI6vR4wRhCPPJ8C2mLRmBg vUYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Gy5+wWjXgmLyDYNQ/I3zqQTEWmaeVqhCkQPBCljqylA=; fh=We/Lk13uCk+RN6kl68PTkmQiYVlq9XTq59A61pRIAXE=; b=SJa1j9IgtHaIWejxjxwXqREclZfuf0tkA5xQeyVCOQk8UwItqhJeNOvJXLMum6Lqrl SQ25C9nWGSX56L59/IId02J+OU6Sgo+rZXG2heEPWtpvRP/+cb0uZM+Ow7MBLum3HtIm Mx03eSV8UF2/UORBJ7tQHLe+NOSEd+6j9A3q4VcuxEo8AMctbd6d/OVn45bcPURjmEEf CaIRo2t4TsyQnef+OMf0FOZJi6U0DMCd7bEtJduhenSBxurMvBRV4AA3rR1FfMaeZEtR 8EuGL5zZniXQMeVxQkkfyayYjg/PyItnram+qEVu8XiCZydbZlK6UGklYhQLl3JQTDdL avog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=bRCYPx8M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id b19-20020aca2213000000b003b6cfa0af8fsi4692348oic.210.2023.11.28.15.01.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 15:01:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=bRCYPx8M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 2996F80A4ADF; Tue, 28 Nov 2023 15:01:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230148AbjK1XB2 (ORCPT + 99 others); Tue, 28 Nov 2023 18:01:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229918AbjK1XB1 (ORCPT ); Tue, 28 Nov 2023 18:01:27 -0500 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1757E1A5; Tue, 28 Nov 2023 15:01:32 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 350AA60004; Tue, 28 Nov 2023 23:01:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1701212491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Gy5+wWjXgmLyDYNQ/I3zqQTEWmaeVqhCkQPBCljqylA=; b=bRCYPx8Mi+oYupXYeBmI4FBZvfn8XP6SsqWl77lfy8Bro9xS35o7Qn+66vtTzfr+U5bjUJ 2gLpnONC/Pn15PtdledA/m6VsZ6rX3A+NC9064+1499LgI9ICIs2L+iQ/SxQGuvFo3GePI XgCSH/EyCzrHrqrGSrg7ANhw9vzwbq1UgGkywJTK0M9VbpDpkuR6O7MFupHp8Q+3nWX+mo /v25DaY9tQ+hbn3i1Qgt+4Zndi7oiz961R3bcSrHnRG/Jw9eDH5IGlJII7x0ucXBNZX4Eo P9gHuDeWO+r9x3U3/uJwwRGpX2UT1uN+oeNlOoF2CpUPQr4ZGiUoJMYVCmzyjA== Date: Wed, 29 Nov 2023 00:01:28 +0100 From: Alexandre Belloni To: jingbao qiu Cc: Krzysztof Kozlowski , a.zummo@towertech.it, krzysztof.kozlowski+dt@linaro.org, chao.wei@sophgo.com, unicorn_wang@outlook.com, conor+dt@kernel.org, robh+dt@kernel.org, conor@kernel.org, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] rtc: add rtc controller support for Sophgo CV1800B SoC Message-ID: <202311282301288a92d806@mail.local> References: <20231121094642.2973795-1-qiujingbao.dlmu@gmail.com> <20231121094642.2973795-3-qiujingbao.dlmu@gmail.com> <09b29f1f-a42b-49f7-afca-f82357acd4c8@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-GND-Sasl: alexandre.belloni@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 28 Nov 2023 15:01:42 -0800 (PST) On 28/11/2023 21:22:52+0800, jingbao qiu wrote: > > > > > + ret = cv1800b_rtc_softinit(rtc); > > > + if (ret) > > > + goto err; > > > + cv1800b_rtc_alarm_irq_enable(&pdev->dev, 1); > > > + rtc->rtc_dev = devm_rtc_allocate_device(&pdev->dev); > > > + if (IS_ERR(rtc->rtc_dev)) { > > > + ret = PTR_ERR(rtc->rtc_dev); > > > + goto err; > > > + } > > > + rtc->rtc_dev->range_max = U32_MAX; > > > + rtc->rtc_dev->ops = &cv800b_rtc_ops; > > > + > > > + return rtc_register_device(rtc->rtc_dev); > > I find the commet of devm_rtc_device_register wirte > “This function is deprecated, use devm_rtc_allocate_device and > rtc_register_device instead” > but all of code about this, they all use devm_rtc_device_register They don't, they use devm_rtc_register_device > function. So which one do you suggest I use? > > > > +err: > > > + return dev_err_probe(&pdev->dev, ret, "Failed to init cv1800b rtc\n"); > > > > Drop, just return. > > ok > > > > > Best regards, > > Krzysztof > > > > Best regards, > Jingbao Qiu -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com