Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp808544ybf; Wed, 26 Feb 2020 23:48:11 -0800 (PST) X-Google-Smtp-Source: APXvYqyXigLLjLViXubbNw/0SpkJnLog+IJCmHhyk8qP0VfBMokX6115jEpZWlKHeOl99eouyTpv X-Received: by 2002:a05:6830:1492:: with SMTP id s18mr2297545otq.216.1582789690976; Wed, 26 Feb 2020 23:48:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582789690; cv=none; d=google.com; s=arc-20160816; b=hIQ4Pqago0WXKty2+jek90f/li41cUs55hUkqjlLiYeB6JtDVYmUidxxiII1+OlPFk 9nPsEV3XmjswOw4/sJfbFvrAx12H/o14AChN0yG0uD+ZzITgYp+BDHXhDJ2vn94K5ZvF 3uiZFKriy8qSHbY9/AeTlNRqLQmzIlLdW5lT9xtY8/ZiGFmKwxBOLegKXJRfxkJcjrUT uCI82uEQ5iLz9IUcbafLZVMEQOjXKdJlTkwz1i6xwdYUeuvPDSZwq3VbabYe0vjF+KjW l46b7kDsfMjhwhbl7KR/MkruEJj1ApbZkg0vUkyJF+UlaNXeNZUXrTVKURxniKKyxCwf yvsw== 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=63YRAaFL+lbXvbtjs/mfmNkzxs9oDsAdzcTK8UHwzWA=; b=AxSxNq7ytUbSd6GBDiyMJeAlHB8WH7u3HYyZSH614pRUlwh1JG+08r+TNCsQilX/TJ kewgSZChTsqB8vf6C+VvlrF6CwWtFaXxgODIqSNhJYK6e4ksJyh7XC0dTQwmmv3LmUi5 N/bXFdN66p3u4l7NJ5gX5AS/Efhhlf2whmXV6xOVt3Dm9Q78bcqlPIX8gcnIhwcEEEaY 7NcHqq5ElrmghQ9H/4f0Bu/P6+XnzE35isHn8DQzVfj3wT6dCk9wK0k/5DlOurPCLgBF 22JzurH3SL5q09zpBSEYDMKZtBzI/XDCQ5EjApZYwieeE20M6/KaIa2nVpSoI+hA6MdG Ws9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=pxSou091; 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 w18si1185364otl.54.2020.02.26.23.47.59; Wed, 26 Feb 2020 23:48:10 -0800 (PST) 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=pxSou091; 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 S1728457AbgB0Hrn (ORCPT + 99 others); Thu, 27 Feb 2020 02:47:43 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:48206 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728441AbgB0Hrn (ORCPT ); Thu, 27 Feb 2020 02:47:43 -0500 X-UUID: 90d4f71a89d54d7e8d5a493b1adcc2dc-20200227 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=63YRAaFL+lbXvbtjs/mfmNkzxs9oDsAdzcTK8UHwzWA=; b=pxSou091h368wkBQ+0ZcyTn/etaoOycO7YaDYlfRpqAXa9X9FTmPeetTc8/Q13kqkk2brDwgorfEEW11G67VM5tTaDnZQgTbgh97Bm8sxjgz/8k3jW6FRWNfgPsoVxMj1/BkmLHEu8IEIZqqriANNicrz4f4PB05dQG/lZLjglY=; X-UUID: 90d4f71a89d54d7e8d5a493b1adcc2dc-20200227 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 1143352225; Thu, 27 Feb 2020 15:47:39 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs05n2.mediatek.inc (172.21.101.140) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 27 Feb 2020 15:46:40 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 27 Feb 2020 15:47:42 +0800 From: Sam Shih To: Thierry Reding , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Matthias Brugger CC: John Crispin , , , , , Sam Shih Subject: [PATCH 1/1] pwm: mediatek: add longer period support Date: Thu, 27 Feb 2020 15:46:50 +0800 Message-ID: <1582789610-23133-2-git-send-email-sam.shih@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1582789610-23133-1-git-send-email-sam.shih@mediatek.com> References: <1582789610-23133-1-git-send-email-sam.shih@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 VGhlIHB3bSBjbG9jayBzb3VyY2UgY291bGQgYmUgZGl2aWRlZCBieSAxNjI1IHdpdGggUFdNX0NP Tg0KQklUKDMpIHNldHRpbmcgaW4gbWVkaWF0ZWsgaGFyZHdhcmUuDQoNClRoaXMgcGF0Y2ggYWRk IHN1cHBvcn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