Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3596148yba; Tue, 7 May 2019 04:03:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqy0uvz4K+A7Y9E6kkG1gxFN68oxrOP+9vMWvmzW94ctvk82DRzKxXrlleWoKYAhD5295JvT X-Received: by 2002:a63:d10:: with SMTP id c16mr38128156pgl.156.1557227037425; Tue, 07 May 2019 04:03:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557227037; cv=none; d=google.com; s=arc-20160816; b=kj/9Dg7eMmsZm1IeMX25rU0IHGEADd3+t0WdlyVqtXRI1mvKB5O59jSjYqrmHAvcrK zzCDJVn1dgFboZTpxIs9Y9Ix5I5e+yKdzV+OJZ/bA2uCzIKG3z83gPRJobloyO1uK6Tj 9Qb0TWMNxKcQYUqUuf9bbBDESAnTuQG9avNFo5CAOxVmh4c987FcolaXCO/aX+W9ce5N N7HzPux91RHLXJhALoLEsmgkK14+lY1VG0tipIUzGTk0sbXGMSrC37CBzdu0jYMUMv75 MfXEly9Y6NK9aiKuTl/2r8Ets4iRb1f9LPtnRUWDqSoi9ntWsvASdb3YGGrZShPkS91V nxig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=2EUu6Mnu44He2lWLLhgCEFkjsFkbhrlsReIpHL53zlc=; b=EtCUdVESD3iZgCpL9VVLtcD57cfAWFFxBYOAAgU6yB1Ktw3PIpsMkzUsay4UrSHab3 0ajGJJNcwo4Vys80kLPsY1KeAL2WMoAH/x2qgufELoY/d4x22vodlVRl5qqVB6AE25ME JgVITO35htt/WHREgZPZ4Ib5lcU60sTtSXLK26T8KKVfKAtG32B3px9voXFeypN4vqx3 lBbnnhyASj3CdNLJt1vDnpUrckuWXkR0ZjSyvolb7jNsU1NRTF5sbOPmRTaeWsN6ArGA g4p6bRbVzp+xvvgDKoB7fGZK3A58TcgbOx/0lTNGV/x7OKrflAmxOs05mnXuomGsBFm2 yHVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=UEgMBfHk; 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 h72si18542637pfd.86.2019.05.07.04.03.40; Tue, 07 May 2019 04:03:57 -0700 (PDT) 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; dkim=pass header.i=@sifive.com header.s=google header.b=UEgMBfHk; 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 S1726721AbfEGLCh (ORCPT + 99 others); Tue, 7 May 2019 07:02:37 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:43521 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726413AbfEGLCh (ORCPT ); Tue, 7 May 2019 07:02:37 -0400 Received: by mail-lj1-f195.google.com with SMTP id z5so8801619lji.10 for ; Tue, 07 May 2019 04:02:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2EUu6Mnu44He2lWLLhgCEFkjsFkbhrlsReIpHL53zlc=; b=UEgMBfHkaLJK9vCowpe3BLuKl5J2UKHObPCuuSv/qaGx2Da93VxAe5Dj1SGZrQfwbY 8TUgGK1QUznMXwBPdOy7ZThVhp3ERP6K6FnYHQvH3l+U64+pZV9p/xQtv4cvvl3J9222 CGI0Zs2B8BIs1XC+fYBlOeUj+9PI/FMftXubnu8RBIpZC9vYg3MwCqZkTFD2a8ZhCxVY 5JSRcOl36cZbnq2eMBMkuXpZDNNGMudPyH8uSnA9H18fl3cKfhaeiM4zAbYbyMKCIDMv XhDysh1BugLRHZwI8MHUhR+AQ7akp/rr4mrpuc/MA6KvB160hkprdSRo/Ew9qRUyqouU VV1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2EUu6Mnu44He2lWLLhgCEFkjsFkbhrlsReIpHL53zlc=; b=tvXACv3I84adux2Jc04Vbj53aqSCbWKCmPdKaMIf58w6+LGg4wYOq5wWikX0Sc6TxF 0wtoQKXwcaN8QiFMNpVklP9oFBN7IUqmq8nUQ1EBganeD2k+Pbyw7vvTHNyCaWTa6tdD 4o751fjVQKAG874/jMsT6x1ZLZaUKgYl2nO6BSGT0TXGjKQxRD85V3kFgBbq+YcsDya2 SxLbR2y1IASG7kAP7rZzCvhSRcoBnfFtPH4Auxsp288m6cvn3ffdhpGv+WzGMTySsl6h RsLD4wcrWTiR3EVHUwKxbdPN3CiAhm9uwxMuH9u3CZrD+gQ4R5M2XFnfP3+iM+P3b8WV BbYg== X-Gm-Message-State: APjAAAWgembn9Wru6wiFsCqx1Kuf005HiuorSlosLn1PIKE7Qf9CIc8N z39J+6eFju+NNIfrquTfFEsny5NK+05r8QUULP3YPbM0htFPaBJkDpYdHf4bQ2L52gRm+AAADV2 GoZ1s48zZ1QSSjVX2h6VD7L3LY0LVQZxcVA== X-Received: by 2002:a2e:9d0a:: with SMTP id t10mr1967057lji.95.1557226955058; Tue, 07 May 2019 04:02:35 -0700 (PDT) MIME-Version: 1.0 References: <1553508779-9685-1-git-send-email-yash.shah@sifive.com> In-Reply-To: From: Yash Shah Date: Tue, 7 May 2019 16:31:58 +0530 Message-ID: Subject: Re: [PATCH v11 0/2] PWM support for HiFive Unleashed To: Andreas Schwab Cc: Palmer Dabbelt , linux-pwm@vger.kernel.org, linux-riscv@lists.infradead.org, Thierry Reding , robh+dt@kernel.org, mark.rutland@arm.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Sachin Ghadi , Paul Walmsley Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andreas, On Tue, May 7, 2019 at 3:09 PM Andreas Schwab wrote: > > On Mai 02 2019, Yash Shah wrote: > > > The PWM default output state is high (When duty cycle is 0), So I > > guess leds will remain on by default. > > So that's the bug that needs to be fixed. Sorry I didn't probably get you before. I now understood the scenario. Leds on HiFive Unleashed are wired to supply instead of ground. And as per ./Documentation/devicetree/bindings/leds/leds-pwm.txt, you need to provide additional property "active-low" in such case. - active-low : (optional) For PWMs where the LED is wired to supply rather than ground. The leds will remain off by default when you add the "active-low" property under the pwm-leds subnode in your DT file. So, this isn't a bug in the driver code. For DT file change, you may refer https://github.com/yashshah7/riscv-linux/commit/dd55057a26150e50525643a423b20e07b72617b5 Can you test this at your end and confirm? - Yash > > Andreas. > > -- > Andreas Schwab, SUSE Labs, schwab@suse.de > GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 > "And now for something completely different." -- The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you are not the intended recipient of this message please do not read, copy, use or disclose this communication and notify the sender immediately. It should be noted that any review, retransmission, dissemination or other use of, or taking action or reliance upon, this information by persons or entities other than the intended recipient is prohibited.