Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp259868rwd; Wed, 31 May 2023 23:03:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6p6yE6fEII/GcvVreGFnDaiIbv7yEM/KR6LElPhwQQ9r8BybjAKzqo3Qw/XZpkQTa3L1E3 X-Received: by 2002:a05:6808:a0a:b0:399:55c9:6f20 with SMTP id n10-20020a0568080a0a00b0039955c96f20mr6126489oij.52.1685599402598; Wed, 31 May 2023 23:03:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685599402; cv=none; d=google.com; s=arc-20160816; b=v4Ji0tv0fVEseDKs1FWq7fASqc9ADA49m0dfRX4nBlB2gV2sidkK7L8ZGfsEq2Vq6s kvwf6575DwIBf2m24JMU5bNxujGiEcWZtxMATRG9cCW+T2+24+bvk19wglomTnWEc7Od IkKg0QKd2MUz9mr/LSn5Ol7eYReykXvvKdJSqYkuGhieUF7lpDuMSgD7a2ipgf+KQjOz zzyPV0utNqAl3lPITIk5MinP3AQeRDHs/01srZlBTjNcVVHAvegrKgTkSn2nemRHJLUb qYkze/X8SjfFJp2IS4N8Jl2msIja5ycR5BLH2Yzrs4+1SFoiLXpKI4TRlQTOdHQCPY0I Hn4g== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q5-20020aa78425000000b00643a2b0c6c8si1778237pfn.106.2023.05.31.23.03.08; Wed, 31 May 2023 23:03: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 S231652AbjFAFrF (ORCPT + 99 others); Thu, 1 Jun 2023 01:47:05 -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 Content-Transfer-Encoding: 8bit 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 - get regs from device tree Signed-off-by: Nikita Shubin --- 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, }; -- 2.37.4