Received: by 10.223.176.5 with SMTP id f5csp2763142wra; Thu, 1 Feb 2018 05:47:44 -0800 (PST) X-Google-Smtp-Source: AH8x226aA5AHJoUAlKTK5B6UqEPCWbtlbLO/k/RLWs8agWl7RBQdI+MW/sx/u7enB4KgdMrnrgzA X-Received: by 2002:a17:902:3363:: with SMTP id a90-v6mr31045409plc.159.1517492864087; Thu, 01 Feb 2018 05:47:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517492864; cv=none; d=google.com; s=arc-20160816; b=R+8fBn6mgbGiYWX//MXVMTBiS4AIBXMACd262BFf9zoXTq+j0D3YXOxkT2Sjc9gyXM mvj58YTusXitDzQRIdnE4EkTE+6dlly1TjTrjUwIP+84nqViyIveGLGh6xF4j4fCDGZp Hof5eNfjMYaTVuWJ/oVheuDMu9pdVytIe8q3n6Gznf5M8pOEF80CXTSLEKZVCUs3w2CQ ZtmwGCMNymmYUqMkHoD8QrkNqyKrRDHMufLL8pToQIzn+ksO0KHxHM1eG2jLGkw7PQ8C OFqcNaj8USUqHh8OWHS9iG+LY9zIpp1TzZhRm5jr2TbpJzfQ5yGUPuGYFfIOrrXuPWaL g7vA== 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=5N2gmCwqJO50pdC59a6ECZVeOSSeMSmBokP9wD10o2U=; b=RELs0iP3kCY01bHAP+tLHU0mmydNWbFz5vNFwQHex9UJyIMj+GjJXiECQPd/N05EOb DcupwX/OuR8ldbTcGABBKlHuNgl3l+CuqbGl0IJtzqCQTtfR/959Y8OSlVQP+iId7v0A ds45tUT9bFX6lpiBy6tLVGlrwYps5kqMjDhkswUm0gSsbmFCYUVqeCBdg3PDUEJW3X4t 9qMH2EaviAkYv3kE5RSyTHV+JVe5KM7PGsSHIhpIb8mexUnYRS5KeTPqMmi2/rSFhG9q +lYZEHA7qjnC/OoDw4ss2AvkmGPuYTMN56++Lh9TJtsCz4OKbRgaitP2P5D7KvBOeuD5 4Aig== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i135si1606087pgc.459.2018.02.01.05.47.28; Thu, 01 Feb 2018 05:47:44 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752269AbeBANqQ (ORCPT + 99 others); Thu, 1 Feb 2018 08:46:16 -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 Content-Type: text/plain 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(+) 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) -- 1.9.1