Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5744650pxu; Thu, 22 Oct 2020 09:57:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgu7Wv+hHB/yuv3cgvMIhH03y8H6yr941be6MoOUjTm2ukMm300eph3gr8fTKuKI0CKeWh X-Received: by 2002:a17:906:4dc7:: with SMTP id f7mr3079906ejw.73.1603385868889; Thu, 22 Oct 2020 09:57:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603385868; cv=none; d=google.com; s=arc-20160816; b=JRIP7oYTqY/aRYLtDcl/RUOoytGlgCmrq5u93NqQXudxfn66J8MW0BW2jWdNW/+QJ+ rYxxEMo+3RgKr7km199bqilf8nCnAVb8Ks5Fpjx8QfQ7oWZ2hEPBJBBTdBBfzM9TykO/ zo9jY6Z1enLTBz0G24upPBpQH4VpQmiOSUhuEwlaUWbM+oYXtTfsKvTodG/yiQu7oSro 47Ryc556LEevG01/hot4p82jComhjH/5RRLXfGtZnCKk93aCz/O9b7oW/NkmRi7YjQDZ eHW0KlwGiNYCbs7+lKbbgfYdAJMU4o0c0rHgw8yl2ATcRA1+F/FAuitroCpw5ONeeAzt xWWQ== 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=Jha2F1QI7KSVraGo9Mnho2It6P0BwdjzTvDojZsu+f8=; b=qBnLc1LT8m8nUpp8i8aa82SfL29E7UIYoq+welNhnniRP+2c7Nb1wTpIWRiCvSoOAT kID4X5lxD8G0Q5bfi8Xt9DxZLU4HEsrPpixhzFOVH5TOcqVPJMcTBHnDAxjuWZDAzSO3 FKLUXqWU2xjrndZfOKMvq7J1Y/ewrx4qrGFQtc6dB2FjcEgRttv1mUiyS915e0B18Tz8 famb45UVuOSw/p11ICQwXNr6DUruGkfutK+wiPGSLL/ckTW+Nv21WM6aIwXzttclWoV9 BlkxBgA5tFt8RT2t+w6XJIGKh2oqqxuOJ2Bdo40mMYYKJcxXmhyfm9rb0xgtZB7tMntY Mkig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=IshULhF4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id n12si1323262edt.67.2020.10.22.09.57.26; Thu, 22 Oct 2020 09:57:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=IshULhF4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2898437AbgJVMjA (ORCPT + 99 others); Thu, 22 Oct 2020 08:39:00 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:33701 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2898402AbgJVMih (ORCPT ); Thu, 22 Oct 2020 08:38:37 -0400 X-UUID: 80a41e5001c44377a63e54b82804e781-20201022 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=Jha2F1QI7KSVraGo9Mnho2It6P0BwdjzTvDojZsu+f8=; b=IshULhF4GQQf3XpUDX7eGGJSwm3LRs5NAAS9Q55b0CvUaDwcJZYePKFHWxGRQvrx0dbF0pRML1v+45CdsiVAS5RdE5wevxQEh4ob/1G4HXqK0qyJWQgxAoPvnQrerAEtpEy2e1yHq1rpQAYjrJ+24roEm+U3ntl7AVQyXsv/zmw=; X-UUID: 80a41e5001c44377a63e54b82804e781-20201022 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1064626375; Thu, 22 Oct 2020 20:37:56 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 22 Oct 2020 20:37:55 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 22 Oct 2020 20:37:55 +0800 From: Weiyi Lu To: Matthias Brugger , Rob Herring , Stephen Boyd , Nicolas Boichat CC: , , , , , Weiyi Lu Subject: [PATCH v4 23/34] clk: mediatek: Add MT8192 imp i2c wrapper w clock support Date: Thu, 22 Oct 2020 20:37:16 +0800 Message-ID: <1603370247-30437-24-git-send-email-weiyi.lu@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1603370247-30437-1-git-send-email-weiyi.lu@mediatek.com> References: <1603370247-30437-1-git-send-email-weiyi.lu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org QWRkIE1UODE5MiBpbXAgaTJjIHdyYXBwZXIgdyBjbG9jayBwcm92aWRlcg0KDQpTaWduZWQtb2Zm LWJ5OiBXZWl5aSBMdSA8d2VpeWkubHVAbWVkaWF0ZWsuY29tPg0KLS0tDQogZHJpdmVycy9jbGsv bWVkaWF0ZWs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