Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp146162pxj; Thu, 3 Jun 2021 03:09:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwobf9dFUcWkCgxkUHIeAjZ8cGx5Suz7DfmVId/zURb4yhf28zuieuPp8qsvv7UN+/wqnHU X-Received: by 2002:a17:906:c1d0:: with SMTP id bw16mr38052322ejb.146.1622714983823; Thu, 03 Jun 2021 03:09:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622714983; cv=none; d=google.com; s=arc-20160816; b=U1004L5c+PR/IhYtqAJCtCc996L80G5lIwBt2SafSz1/5nA8SI3/ONnCbUBKKNRot0 Nx3I4ON3HMI9WDIc7+/NaJRt30X/VGT+6QGachbjISLprSilwZ4kQsd0buYWsYHNy5TA FNdkb+eMT7YBZtXDm0q80YPp7o9ycFixtZ/Vr1e1W3o1IwpqPTo8FS4kCzu+6Ralx1vR A7V3CD2V179JzYwwkLq2hPUmbg02efw4dDhCVVxUPoUtcqYC2UGRlILa5V+3vEQlWAeP TpF4vil817UNIkugQ36qQetWCcBss1iqUVJhLiGu+GW+ykkERijaGDuWCUtJgTEgcGIF TiJQ== 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=YNbAAjwe3Tas+/FGMxKXSmSdGqigi5knEDo/2a/57Dg=; b=xgQb0y1iuw7qKcnpvUPdItDH9uExnmdWa245XDIy1oKwdPUjA61aoCPIeCKC0GWzBp cDnT1Qah6Zlim/ncjhg/xLzGUBCo7UvohJYaHndmMEDxpuXhEo+THDgLdC5dObEcsmPY q2kwxSIXEvnoYP4idLwPReuz/sRGGUsvv9YXvfnDwW10p+5u5k88grJLViUoK2QAKa/C Ok4LLbtcaQV9ptC4Clc6uL3LPVFCbpCs3GmsoTsQdF/rRjJvmeSWRwyj428Mc/HVA8Yz YM/L/rYRf62Cb4Ss4fOYw9RPDnNAWKY7z53Tl/JqDXOulcUzCChhdBgCUsHFIJJ2U3h0 XUZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=XlFBHZTh; 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 bt12si1950315ejb.669.2021.06.03.03.09.21; Thu, 03 Jun 2021 03:09:43 -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=XlFBHZTh; 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 S229917AbhFCKHd (ORCPT + 99 others); Thu, 3 Jun 2021 06:07:33 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:48372 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S229754AbhFCKHb (ORCPT ); Thu, 3 Jun 2021 06:07:31 -0400 X-UUID: b38c36ed5416423fb35fc1430ab33309-20210603 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=YNbAAjwe3Tas+/FGMxKXSmSdGqigi5knEDo/2a/57Dg=; b=XlFBHZThZlkLGYVy4Pk6bEuAcDRAFz2MMQXU7RGag+xMN21cYynpi8hPNfrqFxlgREWKrb1gOF8C87TVZbnCJAnoFbbb5OtLTcZ2VA7wNL+LrZgwCHwHNWaRg7R19MQySutS/wm9ASE6B6gGwTQ3iwU3gVZd4UhnZCJcgG/494I=; X-UUID: b38c36ed5416423fb35fc1430ab33309-20210603 Received: from mtkcas34.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1527824207; Thu, 03 Jun 2021 18:05:38 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS33N2.mediatek.inc (172.27.4.76) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 3 Jun 2021 18:05:36 +0800 Received: from mszsdclx1018.gcn.mediatek.inc (10.16.6.18) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 3 Jun 2021 18:05:35 +0800 From: Jitao Shi To: Thierry Reding , Matthias Brugger CC: , , , , , , , , , , , , Jitao Shi Subject: [PATCH v4 1/3] pwm: mtk-disp: adjust the clocks to avoid them mismatch Date: Thu, 3 Jun 2021 18:05:29 +0800 Message-ID: <20210603100531.161901-2-jitao.shi@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210603100531.161901-1-jitao.shi@mediatek.com> References: <20210603100531.161901-1-jitao.shi@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 3246ED2CBDC04E5775C7CF41B260AE6F4A0EF525BDB6E497B03331E47BD24CAD2000:8 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org VGhlIGNsa19tYWluIGFuZCBjbGtfbW0gY2xvY2tzIGFyZSBzdGlsbCBvbiB3aGVuIHN5c3RlbSBl bnRlcg0Kc3VzcGVuZC4gVGhhdCB3aWxsIGNhc3VlIHRoZSBwb3dlciBjb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