Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp516158ybh; Tue, 10 Mar 2020 03:11:36 -0700 (PDT) X-Google-Smtp-Source: ADFU+vumO1Yr0dFpib5YFua0nLC3mbevrgIUu7NaVQ938+EwcTzPrEDWgFHWSSsjH0vkIKv4FjW+ X-Received: by 2002:aca:1a17:: with SMTP id a23mr545862oia.84.1583835096613; Tue, 10 Mar 2020 03:11:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583835096; cv=none; d=google.com; s=arc-20160816; b=nOF/ZrDoIogMeNwQ19pnUDPP7ZEDCJ49hR4bMQmDZZzxT1OcVMjidzysdeaCQYkbiG G9r/U18WB1kw6AuGHfF5yLHcnt1OE9I2TUUqAKYs93dq0Cnvz9xp9YEMe/KhNSJnE0ee byT8mKBX+xhkU1T9hJrFoZXhA7grhsarvBNWfAL1LlfP5pdV3QktYsfeLiVrIla3AaqZ RMGcuQ6ivmBpHd2to7OyLVKMmH+fh4GTwvi4izfhSSENAHp/nKQjtXMRkaMqNRkH4SS/ 8v8YeX1FqXSQyWDTflNQoBXo6iPMvKkbtJv0nE3OIB8/j3zU/tnchYm74lhS1HK6eC8W 1Ndw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=a9EBRq1NN/wbj7E+tzJXbC0ZXvmXx8HMCccIA8ONyLc=; b=k+TQTwEPQeMZDiF/iDmBncB+EfUfCNB36TB+Jnp/zkRsjI9Q0iMjl8Gs9qlBdvXAoR g5AzzkN4TTbSo9RR5miUf81erd8vAwxItKC+f5/HMxRzOq9YCtEcpYdr8qAGNWXjHe7K +lXbZUBqOnSKbFcY7oZQMBukb3D7oEkhcoMtBlhcK0RX6/A81Z8WDhFqCZSnp3YDsrpS 5DXdbcfIO9LqDfNqTsFRWTZlUOdIJDSmKMcjvbrUCCNZVlzxf5OJl+jfQFuX/bN9NK6c LFZlQGurwQN2hifYJOZaGOuCcyAfeMYwtBSx5W8OLME34tRFGPHIKJVkaNoYjfjlOMD4 uTSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=ksPszvzi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d75si3408884oib.22.2020.03.10.03.11.24; Tue, 10 Mar 2020 03:11:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=ksPszvzi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726558AbgCJKK5 (ORCPT + 99 others); Tue, 10 Mar 2020 06:10:57 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:42711 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726199AbgCJKKx (ORCPT ); Tue, 10 Mar 2020 06:10:53 -0400 X-UUID: 34719fa14c37412c9cc979f9dea59a1f-20200310 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=a9EBRq1NN/wbj7E+tzJXbC0ZXvmXx8HMCccIA8ONyLc=; b=ksPszvzikMIpUz/vunEAiKSC5Kzpc2bmpeq08pD3BuAF3j8jCtYbfR2Vfu2rp/3bBb6ciO3E7A83tgxxDLXP6JjJaXas7SmRAEL/HBxxCJWNt9yIcK0wsq7IiqqPTbFaSKXGJP83rQOG09gvEybkkl7Hp02ltTYeU+fiiso91OE=; X-UUID: 34719fa14c37412c9cc979f9dea59a1f-20200310 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 922481140; Tue, 10 Mar 2020 18:10:46 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 10 Mar 2020 18:06:19 +0800 Received: from mtksdaap41.mediatek.inc (172.21.77.4) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 10 Mar 2020 18:07:59 +0800 From: Hsin-Hsiung Wang To: Lee Jones , Rob Herring , Alexandre Belloni , Matthias Brugger CC: Mark Rutland , Sean Wang , Sebastian Reichel , Eddie Huang , Alessandro Zummo , Hsin-Hsiung Wang , Frank Wunderlich , Thomas Gleixner , Richard Fontana , Josef Friedl , Ran Bi , , , , , , , Nicolas Boichat , Subject: [PATCH v9 4/5] rtc: mt6397: Add support for the MediaTek MT6358 RTC Date: Tue, 10 Mar 2020 18:10:39 +0800 Message-ID: <1583835040-19157-5-git-send-email-hsin-hsiung.wang@mediatek.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1583835040-19157-1-git-send-email-hsin-hsiung.wang@mediatek.com> References: <1583835040-19157-1-git-send-email-hsin-hsiung.wang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: CB323D5109DFD0B68FB40BAC4FE3119C2060C7528207A66DFE4B545D726C57412000:8 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RnJvbTogUmFuIEJpIDxyYW4uYmlAbWVkaWF0ZWsuY29tPg0KDQpUaGlzIGFkZCBzdXBwb3J0IGZv ciB0aGUgTWVkaWFUZWsgTVQ2MzU4IFJUQy4gRHJpdmVyIHVzaW5nDQpjb21wYXRpYmxlIGRhdGEg dG8gc3RvcmUgZGlmZmVyZW50IFJUQ19XUlRHUiBhZGRyZXNzIG9mZnNldC4NClRoaXMgcmVwbGFj ZSBSVENfV1JUR1IgdG8gUlRDX1dSVEdSX01UNjMyMyBpbiBtdDYzMjMtcG93ZXJvZmYNCmRyaXZl ciB3aGljaCBvbmx5IG5lZWRlZCBieSBhcm12NyBDUFUgd2l0aG91dCBBVEYuDQoNClNpZ25lZC1v ZmYtYnk6IFJhbiBCaSA8cmFuLmJpQG1lZGlhdGVrLmNvbT4NClNpZ25lZC1vZmYtYnk6IEhzaW4t SHNpdW5nIFdhbmcgPGhzaW4taHNpdW5nLndhbmdAbWVkaWF0ZWsuY29tPg0KLS0tDQogZHJpdmVy cy9wb3dlci9yZXNldC9tdDYzMjMtcG93ZXJvZmYuYyB8ICAyICstDQogZHJpdmVycy9ydGMvcnRj LW10NjM5Ny5jICAgICAgICAgICAgICB8IDI0ICsrKysrKysrKysrKysrKystLS0tLS0tLQ0KIGlu Y2x1ZGUvbGludXgvbWZkL210NjM5Ny9ydGMuaCAgICAgICAgfCAxNyArKysrKysrKysrKysrKysr LQ0KIDMgZmlsZXMgY2hhbmdlZCwgMzMgaW5zZXJ0aW9ucygrKSwgMTAgZGVsZXRpb25zKC0pDQoN CmRpZmYgLS1naXQgYS9kcml2ZXJzL3Bvd2VyL3Jlc2V0L210NjMyMy1wb3dlcm9mZi5jIGIvZHJp dmVycy9wb3dlci9yZXNldC9tdDYzMjMtcG93ZXJvZmYuYw0KaW5kZXggMWNhZjQzZC4uMDUzMjgw MyAxMDA2NDQNCi0tLSBhL2RyaX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