From patchwork Fri Jan 18 03:24:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryder Lee X-Patchwork-Id: 10769373 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 105821390 for ; Fri, 18 Jan 2019 03:25:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA7872ABE1 for ; Fri, 18 Jan 2019 03:24:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE85A2AEEF; Fri, 18 Jan 2019 03:24:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7374B2ABE1 for ; Fri, 18 Jan 2019 03:24:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=hwH7DoiGq4z2ZcBELw9AOqQMS6JmPwqtkYP4RZyzTvs=; b=ghUzqEgU1w4ETC cAW3k4wrJWMBPzlx2lp33Ggsw/U3kKdqkI3IKuDEkAhY7sL2+sf1zoudv5Rrk2z9z19tOejyGHalx UsIIULmxhp5V7uJnM1vOOonua6/9VRqRXbcZT4bHc5gTgb5NOxqBIVvb0A44FnhmI9dBK9du88J5i Spdf5wuiRL6a/lRbJd3eqnkWRRvCSW1PkJ3coXJGSjueBKAFF1pfeT+/BhtNK3RVN7mqB2OeDJkb5 /ANYXlK/swiKp1ht7V0HJOgexks8fgZ2kYO0AeVYwafuN48Gw5NW+YSnndWAov56p1EQyo8YFxyob 9YAyLHS30GetbdfKyw6w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkKmA-0001q9-T6; Fri, 18 Jan 2019 03:24:58 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkKm6-0001nu-E6; Fri, 18 Jan 2019 03:24:56 +0000 X-UUID: 62bef760d384434d8a55d888766391ed-20190117 X-UUID: 62bef760d384434d8a55d888766391ed-20190117 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 856093635; Thu, 17 Jan 2019 19:24:50 -0800 Received: from mtkmbs08n1.mediatek.inc (172.21.101.55) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 17 Jan 2019 19:24:48 -0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 18 Jan 2019 11:24:47 +0800 Received: from mtkslt306.mediatek.inc (10.21.14.136) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 18 Jan 2019 11:24:47 +0800 From: Ryder Lee To: Thierry Reding Subject: [PATCH v1 1/5] pwm: mediatek: add a property "mediatek,num-pwms" Date: Fri, 18 Jan 2019 11:24:41 +0800 Message-ID: X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190117_192454_490943_30D2B142 X-CRM114-Status: GOOD ( 13.58 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pwm@vger.kernel.org, Ryder Lee , devicetree@vger.kernel.org, Sean Wang , Weijie Gao , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Matthias Brugger , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This adds a property "mediatek,num-pwms" to avoid having an endless list of compatibles with no differences for the same driver. Thus, the driver should have backwards compatibility to older DTs. Signed-off-by: Ryder Lee --- Changes since v1: add some checks for backwards compatibility. --- drivers/pwm/pwm-mediatek.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/drivers/pwm/pwm-mediatek.c b/drivers/pwm/pwm-mediatek.c index eb6674c..81b7e5e 100644 --- a/drivers/pwm/pwm-mediatek.c +++ b/drivers/pwm/pwm-mediatek.c @@ -55,7 +55,7 @@ enum { }; struct mtk_pwm_platform_data { - unsigned int num_pwms; + unsigned int num_pwms; /* it should not be used in the future SoCs */ bool pwm45_fixup; bool has_clks; }; @@ -226,27 +226,36 @@ static void mtk_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) static int mtk_pwm_probe(struct platform_device *pdev) { - const struct mtk_pwm_platform_data *data; + struct device_node *np = pdev->dev.of_node; struct mtk_pwm_chip *pc; struct resource *res; - unsigned int i; + unsigned int i, num_pwms; int ret; pc = devm_kzalloc(&pdev->dev, sizeof(*pc), GFP_KERNEL); if (!pc) return -ENOMEM; - data = of_device_get_match_data(&pdev->dev); - if (data == NULL) - return -EINVAL; - pc->soc = data; + pc->soc = of_device_get_match_data(&pdev->dev); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); pc->regs = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(pc->regs)) return PTR_ERR(pc->regs); - for (i = 0; i < data->num_pwms + 2 && pc->soc->has_clks; i++) { + /* Check if we have set 'num-pwms' in DTs. */ + ret = of_property_read_u32(np, "mediatek,num-pwms", &num_pwms); + if (ret < 0) { + /* If no, fallback to use SoC data for backwards compatibility. */ + if (pc->soc->num_pwms) { + num_pwms = pc->soc->num_pwms; + } else { + dev_err(&pdev->dev, "failed to get pwm number: %d\n", ret); + return ret; + } + } + + for (i = 0; i < num_pwms + 2 && pc->soc->has_clks; i++) { pc->clks[i] = devm_clk_get(&pdev->dev, mtk_pwm_clk_name[i]); if (IS_ERR(pc->clks[i])) { dev_err(&pdev->dev, "clock: %s fail: %ld\n", @@ -260,7 +269,7 @@ static int mtk_pwm_probe(struct platform_device *pdev) pc->chip.dev = &pdev->dev; pc->chip.ops = &mtk_pwm_ops; pc->chip.base = -1; - pc->chip.npwm = data->num_pwms; + pc->chip.npwm = num_pwms; ret = pwmchip_add(&pc->chip); if (ret < 0) { From patchwork Fri Jan 18 03:24:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryder Lee X-Patchwork-Id: 10769383 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 42EE5139A for ; Fri, 18 Jan 2019 03:25:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E68C2E0C3 for ; Fri, 18 Jan 2019 03:25:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 223642E0C6; Fri, 18 Jan 2019 03:25:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CB90E2E0C3 for ; Fri, 18 Jan 2019 03:25:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=oAkqIshfJKkfcuhYmhnXy+vL8cAB3Zm3ks58gAfNDnU=; b=sVQzl1QvCH9Kz4 lxxPJ3/lgg0TFfdrwCL6p4iysLZly2BNRouBtP2Pwk3xUdgjfGZPgq9ZWGtCDzTshbUUdfXklgMWW qdhJwtZ05+ZTrnLldJnAMLKS00uUyQVxE650Q4C9RKF81LgrCEpBOKaCQpaRg6tD6jeDA6+8TDMu7 V9D1yzQsUGbSq/Fn5gTdWPGslqkNJ88zYrSUmBJQwg8IS9lHjnupA0e0/5aEzosh3SofxOyBuJpsE y9voIf1cAheMJK7sa8VvDVj4bZKUlflGU4DrTSYbemQgzFZ2PEdIwek0L2EYweKF1LsbIR+/FsGJv 8XknY35elLr7Q4VCA6gQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkKmp-0003kJ-UA; Fri, 18 Jan 2019 03:25:39 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkKmC-0001rt-9t; Fri, 18 Jan 2019 03:25:06 +0000 X-UUID: f5f50928ebd643669b9acac81661adb9-20190117 X-UUID: f5f50928ebd643669b9acac81661adb9-20190117 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 602920468; Thu, 17 Jan 2019 19:24:57 -0800 Received: from mtkmbs08n2.mediatek.inc (172.21.101.56) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 17 Jan 2019 19:24:55 -0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 18 Jan 2019 11:24:47 +0800 Received: from mtkslt306.mediatek.inc (10.21.14.136) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 18 Jan 2019 11:24:47 +0800 From: Ryder Lee To: Thierry Reding Subject: [PATCH v1 2/5] dt-bindings: pwm: add a property "mediatek,num-pwms" Date: Fri, 18 Jan 2019 11:24:42 +0800 Message-ID: <7e1de17a43f2cde73aecd2773e2b3a5fdfd294f3.1547781007.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: MIME-Version: 1.0 X-TM-SNTS-SMTP: 463A4C78904DD31D587D27874C10AD8925FC78F8923D0296AF059074655022012000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190117_192500_630923_E1657C34 X-CRM114-Status: UNSURE ( 9.20 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pwm@vger.kernel.org, Ryder Lee , devicetree@vger.kernel.org, Sean Wang , Weijie Gao , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Matthias Brugger , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This adds a property "mediatek,num-pwms" in example so that we could set the number of PWM channels via device tree. Signed-off-by: Ryder Lee Reviewed-by: Matthias Brugger --- Changes since v1: add a Reviewed-by tag. --- Documentation/devicetree/bindings/pwm/pwm-mediatek.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt b/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt index 991728c..f9e2d1f 100644 --- a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt +++ b/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt @@ -20,6 +20,7 @@ Required properties: - pinctrl-names: Must contain a "default" entry. - pinctrl-0: One property must exist for each entry in pinctrl-names. See pinctrl/pinctrl-bindings.txt for details of the property values. + - mediatek,num-pwms: the number of PWM channels. Example: pwm0: pwm@11006000 { @@ -37,4 +38,5 @@ Example: "pwm3", "pwm4", "pwm5"; pinctrl-names = "default"; pinctrl-0 = <&pwm0_pins>; + mediatek,num-pwms = <5>; }; From patchwork Fri Jan 18 03:24:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryder Lee X-Patchwork-Id: 10769371 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 058F6139A for ; Fri, 18 Jan 2019 03:25:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 702172AB2C for ; Fri, 18 Jan 2019 03:24:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 639582AC6B; Fri, 18 Jan 2019 03:24:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CE9B92AB2C for ; Fri, 18 Jan 2019 03:24:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AjO3TqkgGRSBfpH0Oo3KlGu5hpRaKY6jbFSKhQQ+YXM=; b=cKW4syKsQWrV20 DxaDA7CPU+p7ZYorxZyBwoQ5eRcno5FjLvAmfXFjn27AJnljp480ngK4lapj1dF8sagQJfGxu2Wsz 8JUfm5585qgkRupZgmCO/GPrGLI5ZbX3ZoJcFN4KA6sB0Yx1mB6J/nxv0IxbUb1Klczj5fqyF6mii UoZPqanRZ3NSIbjFt9WMbioPatAsiZ6bOQa59f6XJj2q9BR0aysl8tXAyKmJ1jRIvDzqeWH0fKkRU bbiuEbsZE3Qs2aFGpb9KBSrRpdkclgxt95YWMN5pxRrOYHit9ULOR52g4iT5UsqUgNbRO/VrKobpN YNdeGIk2vYBb/DPA245w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkKm8-0001oa-Hs; Fri, 18 Jan 2019 03:24:56 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkKm6-0001nv-E7; Fri, 18 Jan 2019 03:24:55 +0000 X-UUID: 04b0800d933b44d0a76b188b4ce3ba3f-20190117 X-UUID: 04b0800d933b44d0a76b188b4ce3ba3f-20190117 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 1408191301; Thu, 17 Jan 2019 19:24:50 -0800 Received: from mtkmbs08n1.mediatek.inc (172.21.101.55) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 17 Jan 2019 19:24:49 -0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 18 Jan 2019 11:24:48 +0800 Received: from mtkslt306.mediatek.inc (10.21.14.136) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 18 Jan 2019 11:24:48 +0800 From: Ryder Lee To: Thierry Reding Subject: [PATCH v1 3/5] arm64: dts: mt7622: add a property "mediatek, num-pwms" for PWM Date: Fri, 18 Jan 2019 11:24:43 +0800 Message-ID: <2c4938513672887dbb9f2571059a2cf7076a0266.1547781007.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190117_192454_492929_CCE988C5 X-CRM114-Status: UNSURE ( 8.64 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pwm@vger.kernel.org, Ryder Lee , devicetree@vger.kernel.org, Sean Wang , Weijie Gao , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Matthias Brugger , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This add a property "mediatek,num-pwms" for PWM controller. Signed-off-by: Ryder Lee --- arch/arm64/boot/dts/mediatek/mt7622.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi index 8fc4aa7..ab016cf 100644 --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi @@ -436,6 +436,7 @@ <&pericfg CLK_PERI_PWM6_PD>; clock-names = "top", "main", "pwm1", "pwm2", "pwm3", "pwm4", "pwm5", "pwm6"; + mediatek,num-pwms = <6>; status = "disabled"; }; From patchwork Fri Jan 18 03:24:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryder Lee X-Patchwork-Id: 10769379 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D8FB11390 for ; Fri, 18 Jan 2019 03:25:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C3FD72E0C3 for ; Fri, 18 Jan 2019 03:25:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B56A52E0CA; Fri, 18 Jan 2019 03:25:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 566A72E0C3 for ; Fri, 18 Jan 2019 03:25:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5fg3RKFAr70UvmXMpWjLP/ITcTr79Z9NsLP8uA3NGc0=; b=PLBA967JiSZ+QL ZMR9kwE/sPzXa8+t0Dz8cRtbeCbmh7V4FybLiAkBw98njLxLPJtD2QF7/qXI0BKhTkApmHjbnh1q/ stAHauwfVncuV5eRw/jdVXv18N7j5QxiRqcopEyqw1u/JJcKDkd9lTNFwJaGG0wzs3k24C+dJa9Cy SQb6GZqFCLpbtNKMbyCUVd0CCqvD9v6WHOi58UOZcScxHXuZ0JZaxLN3oLn/W1HUzVpbjzVoyV6eE T/U+p8fcQS8DKod2sgcUG85AXtxlZfQl353vz6z97haPZHcouCkw4fOUsMZNr6JowXWUHu56PkNMR DIN43gJsDW1gAetKhgIg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkKmi-0003cr-W1; Fri, 18 Jan 2019 03:25:33 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkKmB-0001qO-8I; Fri, 18 Jan 2019 03:25:01 +0000 X-UUID: c1cdc0fad2c748e68d1b0a8bfefc3146-20190117 X-UUID: c1cdc0fad2c748e68d1b0a8bfefc3146-20190117 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 93802315; Thu, 17 Jan 2019 19:24:57 -0800 Received: from mtkmbs08n2.mediatek.inc (172.21.101.56) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 17 Jan 2019 19:24:56 -0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 18 Jan 2019 11:24:48 +0800 Received: from mtkslt306.mediatek.inc (10.21.14.136) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 18 Jan 2019 11:24:48 +0800 From: Ryder Lee To: Thierry Reding Subject: [PATCH v1 4/5] arm: dts: mt7623: add a property "mediatek, num-pwms" for PWM Date: Fri, 18 Jan 2019 11:24:44 +0800 Message-ID: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: MIME-Version: 1.0 X-TM-SNTS-SMTP: B54C16F39D1DA7B5B3D45CA7BB8C136E301480AB08892F44B630DAA31D7563CC2000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190117_192459_554283_C5F1FF3B X-CRM114-Status: UNSURE ( 8.35 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pwm@vger.kernel.org, Ryder Lee , devicetree@vger.kernel.org, Sean Wang , Weijie Gao , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Matthias Brugger , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This add a property "mediatek,num-pwms" for PWM controller. Signed-off-by: Ryder Lee --- arch/arm/boot/dts/mt7623.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi index 0253691..9d59c28 100644 --- a/arch/arm/boot/dts/mt7623.dtsi +++ b/arch/arm/boot/dts/mt7623.dtsi @@ -443,6 +443,7 @@ <&pericfg CLK_PERI_PWM5>; clock-names = "top", "main", "pwm1", "pwm2", "pwm3", "pwm4", "pwm5"; + mediatek,num-pwms = <5>; status = "disabled"; }; From patchwork Fri Jan 18 03:24:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryder Lee X-Patchwork-Id: 10769381 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0ED45186E for ; Fri, 18 Jan 2019 03:25:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF7B32E0C3 for ; Fri, 18 Jan 2019 03:25:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E39DD2E0C6; Fri, 18 Jan 2019 03:25:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 736172E0C4 for ; Fri, 18 Jan 2019 03:25:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YwrXzYoj7xNwUHjBHojernksf/UE7SkBgbvDLvknhYg=; b=GzChB1cb7kNh0L QNAIl/85YY+8AY0nGNJZxZjMSeTar9iAa1orT1AELrzh4dujGWK5sfI1oSPt3ejluP2Mb7pLoW+9y XyBQqpNfUEBNBW1FMlWdwY2F4wc8H7am1nUuwRzHym6mAn9G9hZZDI6lBF0PAKo4soP0+QPQO/Vnk aQfjG7VYHE9qytTlUXit+vfBO5q5++4s7hgzcg3odcUQy9Dae+gpoVLmo3Ew7H377NSoO5R8bcQtM 652/423+TLCUeV4UNs1GkWZXmZ5fihJmdzU/lQn9Q1hf9p7KvE+akpM6cPiZ915WFSVp3SAPEF4Ul LVIY0vamXkkx31NoEW3Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkKmk-0003du-HM; Fri, 18 Jan 2019 03:25:34 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkKmC-0001qy-0x; Fri, 18 Jan 2019 03:25:04 +0000 X-UUID: cbd94242da0740acbb016501ccf4bdab-20190117 X-UUID: cbd94242da0740acbb016501ccf4bdab-20190117 Received: from mtkcas67.mediatek.inc [(172.29.193.45)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 1393557996; Thu, 17 Jan 2019 19:24:51 -0800 Received: from mtkmbs08n1.mediatek.inc (172.21.101.55) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 17 Jan 2019 19:24:50 -0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 18 Jan 2019 11:24:48 +0800 Received: from mtkslt306.mediatek.inc (10.21.14.136) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 18 Jan 2019 11:24:49 +0800 From: Ryder Lee To: Thierry Reding Subject: [PATCH v1 5/5] dt-bindings: pwm: update bindings for MT7629 SoC Date: Fri, 18 Jan 2019 11:24:45 +0800 Message-ID: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190117_192500_523574_3E88349E X-CRM114-Status: UNSURE ( 9.00 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pwm@vger.kernel.org, Ryder Lee , devicetree@vger.kernel.org, Sean Wang , Weijie Gao , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Matthias Brugger , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This updates bindings for MT7629 pwm controller. Signed-off-by: Ryder Lee Reviewed-by: Matthias Brugger Reviewed-by: Rob Herring --- Changes since v1: add a Reviewed-by tag. --- Documentation/devicetree/bindings/pwm/pwm-mediatek.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt b/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt index f9e2d1f..f7e7784 100644 --- a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt +++ b/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt @@ -6,6 +6,7 @@ Required properties: - "mediatek,mt7622-pwm": found on mt7622 SoC. - "mediatek,mt7623-pwm": found on mt7623 SoC. - "mediatek,mt7628-pwm": found on mt7628 SoC. + - "mediatek,mt7629-pwm", "mediatek,mt7622-pwm": found on mt7629 SoC. - reg: physical base address and length of the controller's registers. - #pwm-cells: must be 2. See pwm.txt in this directory for a description of the cell format.