From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDA2CC2BB55 for ; Thu, 16 Apr 2020 14:54:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BC2C92051A for ; Thu, 16 Apr 2020 14:54:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OeGkvw5Q"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="I1swcTqP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BC2C92051A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cu+Rgf5TJy1FBD1FZ2AiwdOsZ1fLnIomlJ/uX/N69QA=; b=OeGkvw5QUy7Xph /ppZV3GUSZAl8q2ZPkrgTnk50Ry2HHYRbbmz6oA2g/Y+EG1d2dFbNI/tRbyKBs8heZmehUvsb7pj7 YqEXW/Nt7IiqRd2gnniKa7nckG0GwfKR0SwYeomm58twMswqCgO6iA1V9VyBpgkfr392eb8iUnJNC BIbQQYgev/KDSY8Wt+rT1PQg8pDFJqOqZj0n9cqcopSSc4Gpgod1g9clTh8xQg1sMUAGDcWugCArh 2AVI24yTqRSrZD/jtuwQIC8Fx+pqdBH2aFpZNeMoBfABkr52Zoz8o7+cqVm6UJzyO/CiP2E2Vdt96 UQM0zWgtbwYnsolToXQg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jP5uB-0005XZ-2d; Thu, 16 Apr 2020 14:54:15 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jP5u8-0005Wk-5c for linux-arm-kernel@lists.infradead.org; Thu, 16 Apr 2020 14:54:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=+reo/VTJ0mbrAtwez0qUHllJui2LGmUqeZZaPT2jjgk=; b=I1swcTqPXReZ6oCvu5oUeU1y3 d/deFRuczBe4+pedkOkWyodhigLl1Ms/+hrs7CBSbxm0nOq5jrAAPHDlea8ojxzyLHGPBXC07hrLN c2j/N8sEMQ+E6d8dBg87isBtsUrfmjPVaHNJ3M3FdMrjbyR+Wt10umDBlUD+D0nXA9v9UxZLBy7ht jDQewrW/vTJSEcTpUQf0oImbJWtQWVqwko3oJSTcz7Ibh9sEcYts+np/iOJZpAfgOwBfJf8RDHqhY GjSCCOC4gh5436SCT1xl9gP/uGcbrIT348QH19BrYkcEOAZ1haMRyF/y56gXY00kuIZmrwPKQ6Dq9 EfYggOTkQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:50888) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jP5tq-0004lG-8i; Thu, 16 Apr 2020 15:53:54 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1jP5to-0001yN-8z; Thu, 16 Apr 2020 15:53:52 +0100 Date: Thu, 16 Apr 2020 15:53:52 +0100 From: Russell King - ARM Linux admin To: Linus Walleij Subject: Re: [PATCH RFC 0/6] PWM fan support on Clearfog gt8k Message-ID: <20200416145352.GJ25745@shell.armlinux.org.uk> References: <20200329104549.GX25745@shell.armlinux.org.uk> <20200416081412.GG25745@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200416_075412_213141_2AB1CC44 X-CRM114-Status: GOOD ( 16.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Andrew Lunn , Jason Cooper , linux-pwm@vger.kernel.org, Gregory Clement , Bartosz Golaszewski , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Rob Herring , Thierry Reding , "open list:GPIO SUBSYSTEM" , Uwe Kleine-Konig , Linux ARM , Sebastian Hesselbarth Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Apr 16, 2020 at 02:08:36PM +0200, Linus Walleij wrote: > On Thu, Apr 16, 2020 at 10:14 AM Russell King - ARM Linux admin > wrote: > > On Thu, Apr 16, 2020 at 09:51:37AM +0200, Linus Walleij wrote: > > > > The gpio changes all look fine to me +/- fixes for review comments. > > > > I think Uwe is incorrect for his GPIO comments; the clock is only > > optional on A8040. We know this because A8040 has worked fine > > without PWM support without the clock, whereas for Armada 370, > > the driver has hard-failed if the clock is not present. > > It's fine. You are running the hardware and it should work for you. > I usually go by the IETF motto "rough consensus and running code". > > > About the only change I would make is to move the check introduced > > in patch 2 into patch 3 instead, inside the MVEBU_PWM_SOC_VARIANT_A8K > > case, so that deferring for the clock works (which is necessary for > > the PWM driver to be useful.) > > OK let's go with this. Well, it turns out to not be particularly nice to do that. The best I can come up with is: mvchip->clk = devm_clk_get(&pdev->dev, NULL); if (soc_variant->pwm && IS_ENABLED(CONFIG_PWM) && mvchip->clk == ERR_PTR(-EPROBE_DEFER)) return -EPROBE_DEFER; Doing it in mvebu_pwm_probe() means that we have to deal with unwinding the very complex probing (tearing down all the interrupt functionality and GPIO stuff) which the driver currently does not do, even on failure. Is this a shoddy driver that doesn't clean up after itself... -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 10.2Mbps down 587kbps up _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel