Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5381320rwr; Mon, 24 Apr 2023 03:22:22 -0700 (PDT) X-Google-Smtp-Source: AKy350aFn6COA6DLZROyaBKRsydfyCpMmGNSZ1wLopRkHwNwFYWR6FOzimnhRKmmL+CzIdWOrSjo X-Received: by 2002:a17:90a:ca09:b0:247:6a31:d59d with SMTP id x9-20020a17090aca0900b002476a31d59dmr13087159pjt.1.1682331741814; Mon, 24 Apr 2023 03:22:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682331741; cv=none; d=google.com; s=arc-20160816; b=Gm26TlJ//HkJJPe7uaePpLL4t7VWfot2eZZuHCf1Ohl2TR3Nvmtr9vsuBMYOu2fEjv uCOJCWMrLBc0RONYeASkz5/VnKnPEP+US6ZB78rwGJxZ2nWTWv3qgCerEj9z9vaTWDVE 8SSmPzcMUv6suv0F6XWo4thbjqE/sCaYEBebsw9uoMh1nO6pKM54v0nVocX1+BP+/nke toZ4P4AgvAbDOkqKsw3PrDvOmx+jEBW9+N0YM7Ot1tvNHkE/PgjGdNzTaDs/aS4X/f7o nDd5Q9dyoS47DvZ1Ljhc90n3BRdSJEig8LhEUdggtHqBobI4LFCDZyn3IsT+OYyVKM3D lPXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=dvHbRWEIIPXMemHUevxLrNBPqJlxXPnkd3R644ugivQ=; b=Ic25fapTI6kfMItiU2sqYYs5ltPFRCKil4zpDagtJV8DvGKX2yRfq8sD7vDhQxEJAL 8kUY4ivD50+bAk/8HdIREpxFc5JDuLEr4AC/CBMnrWaMK+wqa0Hcc89mSTbKX9cxKiw/ NX+BEzRmA6b0LsyMNTbdbu2TiUNNAAhH4UhEakSCzAS13R3toNGNDHV+vn/xspjk9Ef1 AgMzMFFijPi2zAVPPQAZ88fJZ65sY8utPN5s0uqrf7suH7iURmo41JmPvV46lik1AMKZ DcCp8Hp23vzvEjxahJF/69RIYg3A04/gfXzPUZTqJTioJC7XBl2IIi9TStSUbHSsBbn3 6oBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@maquefel.me header.s=mail header.b=n+rtBGxI; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d63-20020a17090a6f4500b00247304b4a27si10817960pjk.173.2023.04.24.03.22.10; Mon, 24 Apr 2023 03:22:21 -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=fail header.i=@maquefel.me header.s=mail header.b=n+rtBGxI; 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 S231702AbjDXKU5 (ORCPT + 99 others); Mon, 24 Apr 2023 06:20:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231415AbjDXKUl (ORCPT ); Mon, 24 Apr 2023 06:20:41 -0400 Received: from forward501c.mail.yandex.net (forward501c.mail.yandex.net [IPv6:2a02:6b8:c03:500:1:45:d181:d501]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BF2D1FE2 for ; Mon, 24 Apr 2023 03:20:39 -0700 (PDT) Received: from mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:261e:0:640:2e3d:0]) by forward501c.mail.yandex.net (Yandex) with ESMTP id 0235D5EEC3; Mon, 24 Apr 2023 12:36:03 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id JZBb1pbWwKo0-5B6DOfTV; Mon, 24 Apr 2023 12:36:02 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1682328962; bh=dvHbRWEIIPXMemHUevxLrNBPqJlxXPnkd3R644ugivQ=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=n+rtBGxIG41mLHbLhfdtmpsbVLo8Dt1ufiEtSoVEm32SWm/R6+Sd9IL/K4N67bx0V dvUpDQ6NoqfDN2d59qaYRn6l15lHXV2Fo3xlrVerlzr29Tn0VwMrWLmHxjroxV4bDM t2EKGFiaApUgtJTXLyvlFAlyypH/9zBn7ZbeA15Y= Authentication-Results: mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net; dkim=pass header.i=@maquefel.me From: Nikita Shubin Cc: Arnd Bergmann , Linus Walleij , Alexander Sverdlin , Alessandro Zummo , Alexandre Belloni , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 29/43] rtc: m48t86: add DT support for m48t86 Date: Mon, 24 Apr 2023 15:34:45 +0300 Message-Id: <20230424123522.18302-30-nikita.shubin@maquefel.me> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424123522.18302-1-nikita.shubin@maquefel.me> References: <20230424123522.18302-1-nikita.shubin@maquefel.me> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org - get regs from device tree Signed-off-by: Nikita Shubin --- drivers/rtc/rtc-m48t86.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/rtc/rtc-m48t86.c b/drivers/rtc/rtc-m48t86.c index 481c9525b1dd..d65727ac283a 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,18 @@ static int m48t86_rtc_probe(struct platform_device *pdev) return 0; } +#ifdef CONFIG_OF +static const struct of_device_id m48t86_rtc_of_ids[] = { + { .compatible = "dallas,rtc-m48t86" }, + { /* end of table */ }, +}; +MODULE_DEVICE_TABLE(of, m48t86_rtc_of_ids); +#endif + static struct platform_driver m48t86_rtc_platform_driver = { .driver = { .name = "rtc-m48t86", + .of_match_table = of_match_ptr(m48t86_rtc_of_ids), }, .probe = m48t86_rtc_probe, }; -- 2.39.2