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.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham 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 A3F52C10F0E for ; Mon, 15 Apr 2019 14:15:27 +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 7464820825 for ; Mon, 15 Apr 2019 14:15:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="kLpj0U+x" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7464820825 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com 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=mPoalt/ivHryAd9jRevppbTahtVzMgpBPsCENG4X6cg=; b=kLpj0U+xNgOM5E 8C2HHaqN8wCiWZX7WYDA9wJX0+hZEjbV0cKVTVfHYdT+xPDAN9UME36YZ8QyovV7qK7H44XgMqV8Q dwC/SvnO2vyIAHjNJYUlS9Jo3OeKiBSvWCPHPnPb+Uo+Kd47mclhJc++FzRsQaEpg04u3mR06/H/M jvHpZRHse+y6HeSY+wYFOlJxmGJSocDfhC4YuPPUgohLlJ2l3vR4zyI9uoXawzquVZKo1NnpfT+Mf qx9mSA721xReuebGzwG1yLkCwwnxoBOPXa40Hhn7WhYY/h4z3Zc1J1udlEpjnJLlQrz/GN50tH55l 2buLKVI0KKHRc5Za9pbQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hG2OG-0008MC-FO; Mon, 15 Apr 2019 14:15:20 +0000 Received: from relay9-d.mail.gandi.net ([217.70.183.199]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hG2Nf-0006Yx-4Q for linux-arm-kernel@lists.infradead.org; Mon, 15 Apr 2019 14:14:57 +0000 X-Originating-IP: 109.212.207.226 Received: from localhost (alyon-652-1-176-226.w109-212.abo.wanadoo.fr [109.212.207.226]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id B2F95FF81F; Mon, 15 Apr 2019 14:14:28 +0000 (UTC) Date: Mon, 15 Apr 2019 16:14:28 +0200 From: Alexandre Belloni To: Daniel Lezcano Subject: Re: [PATCH 04/12] clocksource/drivers/tcb_clksrc: stop depending on atmel_tclib Message-ID: <20190415141428.GE3578@piout.net> References: <20190403141120.32754-1-alexandre.belloni@bootlin.com> <20190403141120.32754-5-alexandre.belloni@bootlin.com> <7ce7342d-7fa2-d2b0-621d-2c47a0e5cdba@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <7ce7342d-7fa2-d2b0-621d-2c47a0e5cdba@linaro.org> User-Agent: Mutt/1.11.3 (2019-02-01) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190415_071443_978585_898C7E5F X-CRM114-Status: GOOD ( 10.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pwm@vger.kernel.org, Arnd Bergmann , Alexander Dahl , Greg Kroah-Hartman , Sebastian Andrzej Siewior , linux-kernel@vger.kernel.org, Thomas Gleixner , linux-arm-kernel@lists.infradead.org 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 11/04/2019 18:19:34+0200, Daniel Lezcano wrote: > > + tc.clk[0] = t0_clk; > > + tc.clk[1] = of_clk_get_by_name(node->parent, "t1_clk"); > > + if (IS_ERR(tc.clk[1])) > > + tc.clk[1] = t0_clk; > > + tc.clk[2] = of_clk_get_by_name(node->parent, "t2_clk"); > > + if (IS_ERR(tc.clk[2])) > > + tc.clk[2] = t0_clk; > > + tc.irq[0] = irq; > > + tc.irq[1] = of_irq_get(node->parent, 1); > > + if (tc.irq[1] <= 0) > > + tc.irq[1] = irq; > > + tc.irq[2] = of_irq_get(node->parent, 2); > > + if (tc.irq[2] <= 0) > > + tc.irq[2] = irq; > > Why are clk[1/2] and irq[1/2] defaulting back to t0 in case of error? > This is how the DT binding is madewhen the same IRQ/clk is used for all the channels of the TCB, then it is only specified once. Unfortunately, this has to be kept to keep backward DT compatibility. Still, I'm reworking the irq paring as the driver only needs the irq for channel 2. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel