From patchwork Thu Jun 1 05:45:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Shubin X-Patchwork-Id: 101735 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp75142vqr; Wed, 31 May 2023 22:59:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Ktyz1Yo6+A2tThinBlRPTsj+LnefsWJA4sio5g6nor4LGjKrh3TY2r2JpuwihFoN1Afe2 X-Received: by 2002:a17:90b:249:b0:256:50ed:32cd with SMTP id fz9-20020a17090b024900b0025650ed32cdmr6248198pjb.5.1685599162703; Wed, 31 May 2023 22:59:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685599162; cv=none; d=google.com; s=arc-20160816; b=MLZ71/YGieAhvp1UTV263Yi7U/mxhugJs8ZKBZkq9ezpTEViLpDQgvxMFz61HZSvb4 VmTlIbFj+r/sJWDUul0yek2hOPfQlB2HwxR6dMPrDwAtifgZX2cQjUOVt6txgzUlH6NN PzTiWNo7C108ZutETCCtB9OJRsahbxencNh4IJObPG+z9FbvLAPfkoZtgVS4ANWvecFm FcRkWR8yB3CbA61ib3P/nxPyWXesknsvNZrNvGHC0sixXDI7kTBUmpUBI9xW2KZjyMVE bmK2/eMpeeRTIllgoiGteK62lFzkkP4YKsv5J5zyx52rHAIwpPcRatO/J9ozNqUQp14X VknQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2bx5eqTiy8MyKGVkYQobbEojNAt3qH2KtWz3TAeN9Vk=; b=KAUDH1qH85STsIg2grse7laW4D1Zy7H1jbxVJ6CA8xyipor9chl52SzP1fGKLYxJaN oaxaGYV/A6hESXmnYqS9sgDy8Wp0qZEf3qFfdecIP7kqljsYEnTUFl8W5C4H53AQL/jJ I2Gp+lv7PBOhDyMV8+vAJLzIe8hyVELyx9l9s/JSHsCCJJeZswQcv26aJ8VsHqwRZn5n IlXKvNk0CgwpvhcYgUIHIVR59waw9IIfXf5/Q0ViNalgBEaxpdrQwc32fYzd8ZQqh4Gb EjoqbgH39Q0jT3kad8xJ5HNnahrRM76x60sdmVD558GnE060tBiWDAxfJ+RNv4rdgdWx /rzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@maquefel.me header.s=mail header.b=EH2My4qS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d21-20020a17090ad99500b002535adfa0e4si579786pjv.65.2023.05.31.22.59.08; Wed, 31 May 2023 22:59:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@maquefel.me header.s=mail header.b=EH2My4qS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231478AbjFAFrG (ORCPT + 99 others); Thu, 1 Jun 2023 01:47:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231609AbjFAFqo (ORCPT ); Thu, 1 Jun 2023 01:46:44 -0400 Received: from forward103a.mail.yandex.net (forward103a.mail.yandex.net [178.154.239.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7262195; Wed, 31 May 2023 22:46:20 -0700 (PDT) Received: from mail-nwsmtp-smtp-production-main-51.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-51.vla.yp-c.yandex.net [IPv6:2a02:6b8:c1f:5e51:0:640:23ee:0]) by forward103a.mail.yandex.net (Yandex) with ESMTP id 3723E46CCB; Thu, 1 Jun 2023 08:46:19 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-51.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id pjGDMhnDduQ0-teO2xOLG; Thu, 01 Jun 2023 08:46:19 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1685598379; bh=2bx5eqTiy8MyKGVkYQobbEojNAt3qH2KtWz3TAeN9Vk=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=EH2My4qSEhN+mUOTxtIRrGBgfv2b/WlDn8GBy1OmEOjOVB2Dw0jNHOrFdxBD2fGcu WeZUJjAj9B9WziS0do8tDpdLJnxESs9jdnBH01UBy/m5AY3cT9IoaeLpJCxuMRBDd6 QAxlfN2rcho4Vt/jc0sH6u7cZq/ctOEv3wvVmB54= Authentication-Results: mail-nwsmtp-smtp-production-main-51.vla.yp-c.yandex.net; dkim=pass header.i=@maquefel.me From: Nikita Shubin To: Alexander Sverdlin , Arnd Bergmann , Linus Walleij , Alessandro Zummo , Alexandre Belloni Cc: Nikita Shubin , Michael Peters , Kris Bahnsen , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 30/43] rtc: m48t86: add DT support for m48t86 Date: Thu, 1 Jun 2023 08:45:35 +0300 Message-Id: <20230601054549.10843-12-nikita.shubin@maquefel.me> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20230424123522.18302-1-nikita.shubin@maquefel.me> References: <20230424123522.18302-1-nikita.shubin@maquefel.me> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764051853041431838?= X-GMAIL-MSGID: =?utf-8?q?1767478827337075083?= - get regs from device tree Signed-off-by: Nikita Shubin Reviewed-by: Linus Walleij --- Notes: v0 -> v1: - dropped CONFIG_OF, of_match_ptr - dropped coma in id table - changed compatible from "dallas,rtc-m48t86" to "st,m48t86" drivers/rtc/rtc-m48t86.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/rtc/rtc-m48t86.c b/drivers/rtc/rtc-m48t86.c index 481c9525b1dd..b114796d4326 100644 --- a/drivers/rtc/rtc-m48t86.c +++ b/drivers/rtc/rtc-m48t86.c @@ -15,6 +15,7 @@ #include #include #include +#include #define M48T86_SEC 0x00 #define M48T86_SECALRM 0x01 @@ -269,9 +270,16 @@ static int m48t86_rtc_probe(struct platform_device *pdev) return 0; } +static const struct of_device_id m48t86_rtc_of_ids[] = { + { .compatible = "st,m48t86" }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, m48t86_rtc_of_ids); + static struct platform_driver m48t86_rtc_platform_driver = { .driver = { .name = "rtc-m48t86", + .of_match_table = m48t86_rtc_of_ids, }, .probe = m48t86_rtc_probe, };