Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752727AbcDNTTY (ORCPT ); Thu, 14 Apr 2016 15:19:24 -0400 Received: from down.free-electrons.com ([37.187.137.238]:34143 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752577AbcDNTTA (ORCPT ); Thu, 14 Apr 2016 15:19:00 -0400 From: Boris Brezillon To: Thierry Reding , linux-pwm@vger.kernel.org Cc: Mike Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Mark Brown , Liam Girdwood , Kamil Debski , lm-sensors@lm-sensors.org, Jean Delvare , Guenter Roeck , Dmitry Torokhov , linux-input@vger.kernel.org, Bryan Wu , Richard Purdie , Jacek Anaszewski , linux-leds@vger.kernel.org, Maxime Ripard , Chen-Yu Tsai , linux-sunxi@googlegroups.com, Joachim Eastwood , Thomas Petazzoni , Heiko Stuebner , linux-rockchip@lists.infradead.org, Jingoo Han , Lee Jones , linux-fbdev@vger.kernel.org, Jean-Christophe Plagniol-Villard , Tomi Valkeinen , Robert Jarzmik , Alexandre Belloni , Kukjin Kim , Krzysztof Kozlowski , linux-samsung-soc@vger.kernel.org, intel-gfx@lists.freedesktop.org, Daniel Vetter , Jani Nikula , Jonathan Corbet , linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hartley Sweeten , Ryan Mallon , Alexander Shiyan , Milo Kim , Doug Anderson , Caesar Wang , Stephen Barber , Boris Brezillon Subject: [PATCH v5 24/24] pwm: add information about polarity, duty cycle and period to debugfs Date: Thu, 14 Apr 2016 21:17:44 +0200 Message-Id: <1460661464-11216-25-git-send-email-boris.brezillon@free-electrons.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1460661464-11216-1-git-send-email-boris.brezillon@free-electrons.com> References: <1460661464-11216-1-git-send-email-boris.brezillon@free-electrons.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 979 Lines: 31 From: Heiko Stübner The pwm-states make it possible to also output the polarity, duty cycle and period information in the debugfs pwm summary-outout. This makes it easier to gather overview information about pwms without needing to walk through the sysfs attributes of every pwm. Signed-off-by: Heiko Stuebner Signed-off-by: Boris Brezillon --- drivers/pwm/core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index aefffcf..9f4e97e 100644 --- a/drivers/pwm/core.c +++ b/drivers/pwm/core.c @@ -959,6 +959,11 @@ static void pwm_dbg_show(struct pwm_chip *chip, struct seq_file *s) if (state.enabled) seq_puts(s, " enabled"); + seq_printf(s, " period:%uns", state.period); + seq_printf(s, " duty:%uns", state.duty_cycle); + seq_printf(s, " polarity:%s", + state.polarity ? "inverse" : "normal"); + seq_puts(s, "\n"); } } -- 2.5.0