Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp350291ybh; Wed, 11 Mar 2020 02:17:58 -0700 (PDT) X-Google-Smtp-Source: ADFU+vu7BV/JFxfQfaqtDsnysOTL2ZSE2SYkpI44p8zeyYogTFwY1zzi7NenWbZnuKLnW8eqkZpg X-Received: by 2002:a9d:7a47:: with SMTP id z7mr1635538otm.341.1583918278756; Wed, 11 Mar 2020 02:17:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583918278; cv=none; d=google.com; s=arc-20160816; b=NpqisPjHEFjNThEJQMHtwHGYfzsruYvtH6lpp78NLZqcziZzbLY2sQ7FrPHey1ibdW RN/SgqjX/peRu/An40js/3az9py1MPKH31zeUTKR1wkBC+nBmRdg9KApOrOgal2h1I5L h2ZRqarJv4EHa3cq+vfExdyxn3OhyE8ST43etNhvBOa/RKII4HgbrRQoafTB6BVaqjla yIrb6wAnZ8/ksqiv3ez57bg+/NlG48OKMg+52bYBExDPBOjJLre5Iu0KdmCWbJWzHlEx ecK3GA8kVc2aJDtYMhmQmE207nJUM/7HnsGx3LB2Mc9k0KTugF9qSy6dgwTl/ctl8kXK s0eg== 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=Mzsz3KCruejmaGRI59TsChdTHv2ZTb1K2CrUFLXr9fU=; b=gEEe6jgDDGXp0K/0WDQABMAF10MdImLvlq23++66mM1N2AslELChlgeobI8am0XgSa AjObq/+fC68MYfoUJPk/4R0jXeulLAXGs6qIdsTJgV9svbunHwx1EOQlTeoIpLrVd6JY Qp92j9+sp3Zmyirar/sAc+v0+AKArzJzAK+jtDZzRsY2xmDm2clkBFbifvFWykeQihX4 H4HUOcGNGwIZLUY37bMgP+n4/9U4OW9gLL0ia1tquQWIsjrCT0J/PqnvVtik/XNngkq+ EI5t10/e44Z5r4aGb8ZcTdn2Li309BmnxT+MzATofo3rlkJTnQHYG/Gwfm8Atg1I/r4+ HR+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=QTKOlE5O; 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 y2si871469oto.123.2020.03.11.02.17.46; Wed, 11 Mar 2020 02:17:58 -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=QTKOlE5O; 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 S1728915AbgCKJRV (ORCPT + 99 others); Wed, 11 Mar 2020 05:17:21 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:58454 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728726AbgCKJRS (ORCPT ); Wed, 11 Mar 2020 05:17:18 -0400 X-UUID: c3adb646dbde463cb6e5e3dd86dfbe1f-20200311 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=Mzsz3KCruejmaGRI59TsChdTHv2ZTb1K2CrUFLXr9fU=; b=QTKOlE5OXeXrPXwaukKH0Tv0lpTm2Ba53xAxucFFdsbDHU8b+egN3p2Dasf2y5qpAgNkNUvvoc6wYrYfUuGGr3bq462s7LfHu8wqySsqffRUMRSKg0qVOr20Z0Har6JjPnc5aDLELD66mqFLav6s2DWflRUBgQ/X8f8m+nwkkB0=; X-UUID: c3adb646dbde463cb6e5e3dd86dfbe1f-20200311 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 770383864; Wed, 11 Mar 2020 17:17:12 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 11 Mar 2020 17:15:38 +0800 Received: from mtksdaap41.mediatek.inc (172.21.77.4) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 11 Mar 2020 17:17:13 +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 v10 4/5] rtc: mt6397: Add support for the MediaTek MT6358 RTC Date: Wed, 11 Mar 2020 17:17:02 +0800 Message-ID: <1583918223-22506-5-git-send-email-hsin-hsiung.wang@mediatek.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1583918223-22506-1-git-send-email-hsin-hsiung.wang@mediatek.com> References: <1583918223-22506-1-git-send-email-hsin-hsiung.wang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain 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 RnJvbTogUmFuIEJpIDxyYW4uYmlAbWVkaWF0ZWsuY29tPg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J1Y3QgZGV2aWNlICAgICAgICAgICAqZGV2Ow0KIAlz dHJ1Y3QgcnRjX2RldmljZSAgICAgICAqcnRjX2RldjsNCkBAIC03NCw2ICs4MCw3IEBAIHN0cnVj dCBtdDYzOTdfcnRjIHsNCiAJc3RydWN0IHJlZ21hcCAgICAgICAgICAgKnJlZ21hcDsNCiAJaW50 ICAgICAgICAgICAgICAgICAgICAgaXJxOw0KIAl1MzIgICAgICAgICAgICAgICAgICAgICBhZGRy X2Jhc2U7DQorCWNvbnN0IHN0cnVjdCBtdGtfcnRjX2RhdGEgKmRhdGE7DQogfTsNCiANCiAjZW5k aWYgLyogX0xJTlVYX01GRF9NVDYzOTdfUlRDX0hfICovDQotLSANCjIuNi40DQo=