Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932582AbcJGSrY (ORCPT ); Fri, 7 Oct 2016 14:47:24 -0400 Received: from mail-db5eur01on0091.outbound.protection.outlook.com ([104.47.2.91]:63761 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932520AbcJGSrH (ORCPT ); Fri, 7 Oct 2016 14:47:07 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=bhuvanchandra.dv@toradex.com; From: Bhuvanchandra DV To: , CC: , , , , , , , , , , Bhuvanchandra DV Subject: [PATCH v3 0/6] Support PWM polarity control Date: Fri, 7 Oct 2016 20:41:23 +0530 Message-ID: <20161007151129.6043-1-bhuvanchandra.dv@toradex.com> X-Mailer: git-send-email 2.10.0 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [115.115.243.34] X-ClientProxiedBy: BM1PR01CA0062.INDPRD01.PROD.OUTLOOK.COM (10.163.199.34) To VI1PR05MB1407.eurprd05.prod.outlook.com (10.162.125.156) X-MS-Office365-Filtering-Correlation-Id: 715d7bb5-96d4-49da-996b-08d3eec495bd X-Microsoft-Exchange-Diagnostics: 1;VI1PR05MB1407;2:alFjjEBdui7BKUxgZvESPGns0nV1fzoPuXIbp9rg4q++8Ws5d1/aDjcD5lhJn+z6do2j24Ld9Ry3L2GQewECa920HDtEWsGqlAu4SANUVFq+gGt1X+7Sp+wQ3TyV7JfH+0sf+KZ4M9iA7T6k9WDtowC/YDgVsJ2TB5bLHwT0LK9czDaE43xD+LpcvsU0eQVSeXXEpO1IarZDVDg+dKRzcw==;3:ADjcQREpjGNuD0VIzcKkG8vXRJ+fVxvdwGe8G4+pR5c1MtOx4S8Mx32bugNjefAzlgH+PB/yxfaA4b5VyuoKndsG4p4weMN5hNr/wYEYjYiOuwZREIvp0fyp5EUn/K5pE11h1cY+GyczVBqN4Ag/6g==;25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rGTXM3CHxkyTJqs5Rh7IHMAuagWcMw9jd4WQ5BQ4yTMD2CVHU00boay+mjzqF2zPL8BHqDBqgy3SK94f1pgg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001);SRVR:VI1PR05MB1407;BCL:0;PCL:0;RULEID:;SRVR:VI1PR05MB1407; X-Microsoft-Exchange-Diagnostics: 1;VI1PR05MB1407;4:XxEdfwnHu1J7f/iru8erEko/+bKWRkFZ875avv2iwtpfD8LYORMLJnv2Ai12uY7RHSCZ65QMOiOCAB4uLC5ymuY1Hu98ybrAsZe8exyCudef4lUwXgwb9qzOyuxj19gJCQIAovh9gJO/2EaU2PUbJNzqt/Wjqz/wYBhnHNpf57WnwyD4V9Cq+Ug2Ji/FDb6nWHbOTomvYKrlhFqxZzUWGbxzLIYZXTiInBRh0S95Hzvct2o5BUYpm13bQZinCNzN7KZrC64GsP3gzVSXWUODhrwuiI9AVaeWO+ztn4mX7Hzxr/Ya6y3FOTCrHlTNwP14bj+beJW8a74hNytS7kE+2R4dYLM/2bEvTbYrCpj5U0tY9R4qQvAqE9Jm/tVpDU6AehGacgJY5e2aCCFKyQT2cg== X-Forefront-PRVS: 0088C92887 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(7916002)(199003)(189002)(4001430100002)(5001770100001)(97736004)(77096005)(68736007)(107886002)(86362001)(189998001)(4326007)(81166006)(81156014)(15975445007)(8676002)(36756003)(92566002)(2906002)(6116002)(50226002)(2870700001)(5820100001)(50466002)(69596002)(586003)(1076002)(3846002)(33646002)(50986999)(101416001)(6666003)(47776003)(42186005)(66066001)(7416002)(8666005)(7736002)(305945005)(5660300001)(19580395003)(7846002)(53416004)(105586002)(229853001)(23676002)(106356001)(7059030);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR05MB1407;H:t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enant-OriginalArrivalTime: 07 Oct 2016 15:14:06.1296 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB1407 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1395 Lines: 40 Changes since v3: - Set pwm->args.polarity, before using pwm_set_polarity() function as suggested by Lukasz. - Squash Lukasz patch( https://lkml.org/lkml/2016/10/6/32 ) Tested on Toradex Colibri iMX6S module. Changes since v2: - Picked the stalled patchset[1] from Lothar Wassmann which adds the basic support for polarity control on imx-pwm driver and adds backward compatibility support for devices which does not have polarity control feature. Changes since Lothars v6: - Squash Lukasz patch[2]. [1] http://thread.gmane.org/gmane.linux.pwm/1621 [2] https://www.spinics.net/lists/arm-kernel/msg530818.html Bhuvanchandra DV (3): arm: dts: imx7: Update #pwm-cells for PWM polarity control arm: dts: imx7-colibri: Use pwm polarity control arm: dts: imx7-colibri: Use enable-gpios for BL_ON Lothar Wassmann (3): pwm: print error messages with pr_err() instead of pr_debug() pwm: core: make the PWM_POLARITY flag in DTB optional pwm: imx: support output polarity inversion Documentation/devicetree/bindings/pwm/imx-pwm.txt | 6 +-- arch/arm/boot/dts/imx7-colibri.dtsi | 12 +++++- arch/arm/boot/dts/imx7s.dtsi | 8 ++-- drivers/pwm/core.c | 26 ++++++------ drivers/pwm/pwm-imx.c | 51 +++++++++++++++++++++-- 5 files changed, 79 insertions(+), 24 deletions(-) -- 2.10.0