From patchwork Thu Feb 1 13:44:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Gasnier X-Patchwork-Id: 126535 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1723761ljc; Thu, 1 Feb 2018 05:45:50 -0800 (PST) X-Google-Smtp-Source: AH8x226NNdv0aNJlvows/vn9s948hE93fHPsIEV07JMB5M2wFknIaq2pjufJ8I/mZlXTzqoAg27W X-Received: by 10.98.198.2 with SMTP id m2mr37058639pfg.113.1517492750688; Thu, 01 Feb 2018 05:45:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517492750; cv=none; d=google.com; s=arc-20160816; b=Oi+Iw2ivvieCenJKh4uGdWqB/VXVCprXr9v4t5lkxx3MBiIeU7pUh/5a/7CFs/eVgk 95iHYCRaKrA2W982ZhGfq7emxEOkKMO72E0ny1H0/IuWTKMJyfjkGUlDMBebXQNlW4nm QlMS0xwUXlN57rNDpH7JvOmN60k4KQkhwNt0CYIb9+HZjUgjztz5x/E1FYoKTtFN1XS+ mtr9KZCPHqc9TVhjfGgpcB197c+T7NcUrUXdvOy3G0ZUQBw+7tlwwbwpHs+9kCwbSeih Ib6PwGykA11TcX3zuAIecQf7ojIp6DeOd9tNiJTuvLrQMvmrsBl3ukKl96LiaqN6PZBj 6DBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=PYfpBupgQhhMNHdYPWTW+99R7kw3VyH/fmH/kUtDhHs=; b=SGXEo/oBGWSVTx9sy4NiTGfABWkIFqR4RPeBPAC0Ms/NDwThQg76f8jd/T2aH1FoKH sGmN81f9CihQ9KWqsflv9wy6O1kPDcEa4Fst9k87aMi/FNqz5x9OrQvsVM4LPamcV3IB GrM7CyTmiUhaY2n5p1hKjrHvLgI2moXdhAaoc7Bx2elg0VCDr/P1PvqLAsnElDwhsbOo 48e+a9cHJEWwwr/ZaBpVUnnHvnr8qriDAHEe/2BDZ/vJotdClcqns12j7GOKY4Wp4Sex L4pQB+28YhJtBPkNkIzFpMsyh+QesOTv6G2VyL46auJxNf10fMf8COt8ZXrujvzABCzA Cf1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q126si1709189pfc.334.2018.02.01.05.45.49; Thu, 01 Feb 2018 05:45:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752027AbeBANpq (ORCPT + 6 others); Thu, 1 Feb 2018 08:45:46 -0500 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:62987 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751508AbeBANpp (ORCPT ); Thu, 1 Feb 2018 08:45:45 -0500 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w11DhpkR020027; Thu, 1 Feb 2018 14:45:04 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2fubp005kd-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 01 Feb 2018 14:45:04 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id EBE353A; Thu, 1 Feb 2018 13:45:02 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag5node3.st.com [10.75.127.15]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 9DEEF2AFC; Thu, 1 Feb 2018 13:45:02 +0000 (GMT) Received: from localhost (10.75.127.48) by SFHDAG5NODE3.st.com (10.75.127.15) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Thu, 1 Feb 2018 14:45:02 +0100 From: Fabrice Gasnier To: , , CC: , , , , , , , Subject: [PATCH 1/3] dt-bindings: pwm-stm32-lp: add #pwm-cells Date: Thu, 1 Feb 2018 14:44:36 +0100 Message-ID: <1517492678-767-2-git-send-email-fabrice.gasnier@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1517492678-767-1-git-send-email-fabrice.gasnier@st.com> References: <1517492678-767-1-git-send-email-fabrice.gasnier@st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.48] X-ClientProxiedBy: SFHDAG6NODE3.st.com (10.75.127.18) To SFHDAG5NODE3.st.com (10.75.127.15) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-02-01_04:, , signatures=0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Gerald Baeza STM32 Low-Power Timer supports generic 3 cells pwm to encode PWM number, period and polarity. Signed-off-by: Gerald Baeza Signed-off-by: Fabrice Gasnier --- Documentation/devicetree/bindings/pwm/pwm-stm32-lp.txt | 3 +++ 1 file changed, 3 insertions(+) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/pwm/pwm-stm32-lp.txt b/Documentation/devicetree/bindings/pwm/pwm-stm32-lp.txt index f8338d1..bd23302 100644 --- a/Documentation/devicetree/bindings/pwm/pwm-stm32-lp.txt +++ b/Documentation/devicetree/bindings/pwm/pwm-stm32-lp.txt @@ -7,6 +7,8 @@ See ../mfd/stm32-lptimer.txt for details about the parent node. Required parameters: - compatible: Must be "st,stm32-pwm-lp". +- #pwm-cells: Should be set to 3. This PWM chip uses the default 3 cells + bindings defined in pwm.txt. Optional properties: - pinctrl-names: Set to "default". @@ -18,6 +20,7 @@ Example: ... pwm { compatible = "st,stm32-pwm-lp"; + #pwm-cells = <3>; pinctrl-names = "default"; pinctrl-0 = <&lppwm1_pins>; }; From patchwork Thu Feb 1 13:44:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Gasnier X-Patchwork-Id: 126536 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1724088ljc; Thu, 1 Feb 2018 05:46:16 -0800 (PST) X-Google-Smtp-Source: AH8x224BU6O6rEYczW3sLZs8U6vP4+6cIV8SxtUNJsSeM62HomYza2ZEWRTJ9AblKtiifNTzZzfK X-Received: by 2002:a17:902:6683:: with SMTP id e3-v6mr31497329plk.22.1517492776015; Thu, 01 Feb 2018 05:46:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517492776; cv=none; d=google.com; s=arc-20160816; b=adgSjp7NgAYCoXobzwRw8slDTDz4Si06P/yeQeonNEOtnBOJkxPM8iD5iq9VJc2/wV SFu2zkgy+Z93MqgTHDGB2y/5aFLZ9RCzzvgdDZhUrcOdf47YvYcLvnnybm9SS3y7D+nY 6RoFsa4t4wsP0xDnwcOc9peFF8A7Rj2EDEdP9AxjBdjQh9tc6GYXETz5+dAWNvjF/6ah MmNx5DeCFV9MTglVJxMIrKkeUCx8goNihprvTFomyXgBGqubmwiCVNGw3vACzdUCoUfg f6fMIZZEtjjxMJrsZ+DudDPTdr5hQcEBAs+sXXQvb4QnoUAptt1GG5GtrYTX26URulMv /WKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=d78RZlhuA62QY5Bw9ZYi7h2VmbeoP1S46itwiP59rhk=; b=d48OIegMkJPBtBTazhklZ4+XDcJ9vqqIotLLLPS1vWPA1bEf3pjZUXCPoK3s2AniXD P9/VjUXVRm3NzI1CNdMYlLuasvdlV2eDDASci97O9d9y5a5rUdwwvIVRmiHp3jErQ12G pk/SadKAqHXJ/630SV22aI/uyqjP0BZh1aUsJuF0uavfpu3LZInzaoUZzB4QZg4JZZIr PMFFYiMw4UHp8IjL0YlQIxIsUN/YdXloz4w5oCWRCHQkmNrSKgREEfDZ3WG545+gpVjO jkFE+eroFYtuNwNu2fBScdPHIc9l0zh+dH9Mmmt8//++JrkuJ8XovZiPF+XyV8+h7uO1 iQog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l6-v6si3875453pln.269.2018.02.01.05.46.15; Thu, 01 Feb 2018 05:46:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752219AbeBANqN (ORCPT + 6 others); Thu, 1 Feb 2018 08:46:13 -0500 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:47248 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751916AbeBANpr (ORCPT ); Thu, 1 Feb 2018 08:45:47 -0500 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w11DiRFq006848; Thu, 1 Feb 2018 14:45:04 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2frh6jsbbd-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 01 Feb 2018 14:45:04 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 8889F31; Thu, 1 Feb 2018 13:45:03 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag5node3.st.com [10.75.127.15]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 668F22AFC; Thu, 1 Feb 2018 13:45:03 +0000 (GMT) Received: from localhost (10.75.127.44) by SFHDAG5NODE3.st.com (10.75.127.15) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Thu, 1 Feb 2018 14:45:03 +0100 From: Fabrice Gasnier To: , , CC: , , , , , , , Subject: [PATCH 2/3] pwm: stm32: LPTimer: use 3 cells xlate Date: Thu, 1 Feb 2018 14:44:37 +0100 Message-ID: <1517492678-767-3-git-send-email-fabrice.gasnier@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1517492678-767-1-git-send-email-fabrice.gasnier@st.com> References: <1517492678-767-1-git-send-email-fabrice.gasnier@st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.44] X-ClientProxiedBy: SFHDAG1NODE1.st.com (10.75.127.1) To SFHDAG5NODE3.st.com (10.75.127.15) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-02-01_04:, , signatures=0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Gerald Baeza STM32 Low-Power Timer supports generic 3 cells pwm to encode PWM number, period and polarity. Signed-off-by: Gerald Baeza Signed-off-by: Fabrice Gasnier --- drivers/pwm/pwm-stm32-lp.c | 2 ++ 1 file changed, 2 insertions(+) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pwm/pwm-stm32-lp.c b/drivers/pwm/pwm-stm32-lp.c index 1ac9e43..346b7bd 100644 --- a/drivers/pwm/pwm-stm32-lp.c +++ b/drivers/pwm/pwm-stm32-lp.c @@ -203,6 +203,8 @@ static int stm32_pwm_lp_probe(struct platform_device *pdev) priv->chip.dev = &pdev->dev; priv->chip.ops = &stm32_pwm_lp_ops; priv->chip.npwm = 1; + priv->chip.of_xlate = of_pwm_xlate_with_flags; + priv->chip.of_pwm_n_cells = 3; ret = pwmchip_add(&priv->chip); if (ret < 0)