From patchwork Mon Apr 24 12:34:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Shubin X-Patchwork-Id: 86965 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2640277vqo; Mon, 24 Apr 2023 03:29:04 -0700 (PDT) X-Google-Smtp-Source: AKy350a6NqpRd4+ehdobZ1LJulYakFzEBwGR6mFFuEdE8TvtKGI7iQKcXJL6Xpa4C8142u8sragO X-Received: by 2002:a17:90a:a381:b0:247:35f8:81d2 with SMTP id x1-20020a17090aa38100b0024735f881d2mr13615367pjp.29.1682332144420; Mon, 24 Apr 2023 03:29:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682332144; cv=none; d=google.com; s=arc-20160816; b=eXPNoZsgYiq3mSV+VkUFGioCqE+zFft+O/jvIUd93g+MzqA2zZFc17yREQWxru5nEM dfHaYJiyXWz583ZynPMg2mXXjGBlXG70IUiVJKaZiaD0l3htTm4oV9jmv5IRq1JiOrul 9mBfDcPiTaHuSyQZv5wuNIWVnB6eQNIjPwk8wJ+oTb6fkr6vyKASNKfbc5siuZSkbnV8 0rS4w5qPZx+gDmfC6nNzK265dtbLcdzhZeLX5dqwp5hchmjTzmJ3wqqCVMU/cPpCPKM6 aeVmYlwhoFMpUcMUs3Q9nxnjz1r/BkL87oLDzboA0wrXlRFdAlLA73yJaF0h8tEiF3+y n26A== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h7-20020a170902f54700b001a0544138b8si11938041plf.395.2023.04.24.03.28.50; Mon, 24 Apr 2023 03:29:04 -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 S231703AbjDXKU5 (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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764051853041431838?= X-GMAIL-MSGID: =?utf-8?q?1764053110800711107?= - 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, };