Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4111725yba; Wed, 17 Apr 2019 05:01:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqyAQPx76zn9QYtDsfHjBGRQt+NFVQUQ2hKEnp6c285bajZEI9QtpPZIi8kOhWeHXCB2BacO X-Received: by 2002:a17:902:a9c7:: with SMTP id b7mr84822023plr.145.1555502474638; Wed, 17 Apr 2019 05:01:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555502474; cv=none; d=google.com; s=arc-20160816; b=VlvTxtG1aKhIayfJvs3ztucz79kKp/1cOXwfYEN3T2Adg8GsAptyXV0FZTtzWloI3k kVvIWZkq24S9MrRFBFqzeT7Z58IhCKUguSotwn0flhxcdPPzciVIxop4giddZxni42Yz yZYozEiNpFiNW1KwmTA514B4zDdMFeGLtW2mkySR8ntgunWsnX8xTJ3cMcbKx29do36i CDlsUftuhAlAq+mPXDZb+OrMGo9iEyAubJcOVSwGlJEv7O5wjl8NF2c9rda1OaGjWTvw dapBgpGe9rTiqJklYtxAv9/0pii0dWVt3DNb4oDQuVX10D6/h1iK9o85Eqa0pnu410pw I85A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=AfUgeyBOCopChWeQPpRjrO7dCSZwU3gVniqoJQ4x5IE=; b=fzaAKVsDuJl3jk4tWtfaHKrO5mUSUMt/8/pBtihB7kAKWqQjpN9014DrDcQv84Jo+F 8d202N1aAqLlmRENWk+K7Xt7FSkV+/Iob+huS5MsGHFjXovv6PvoDJZmkKAmtfyUdaZ7 bHiWZZNhB4t7bCajSfalyKcsYclJw5bAeTO1Fc5IozNr6VfX2AW58p6QSJ6VUoHRoRil VUZngP/WkxFFZ7l8XcFmgcC2/IGif8tH1Eu+d35OORNNgvua5+MpQmcuYNgNYDoCzdOU /TUf23ZAFJWMe54cQ8xKywNNpntgJBUmOBtWtsmCjYQsHItBpKGhmEd71aBXTA2XCME8 fNDA== ARC-Authentication-Results: i=1; mx.google.com; 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 l191si38631811pfc.213.2019.04.17.05.00.58; Wed, 17 Apr 2019 05:01:14 -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; 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 S1731717AbfDQMAG (ORCPT + 99 others); Wed, 17 Apr 2019 08:00:06 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:55949 "EHLO relay9-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729522AbfDQMAG (ORCPT ); Wed, 17 Apr 2019 08:00:06 -0400 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 CA278FF80D; Wed, 17 Apr 2019 12:00:02 +0000 (UTC) Date: Wed, 17 Apr 2019 14:00:02 +0200 From: Alexandre Belloni To: Romain Izard Cc: Daniel Lezcano , Arnd Bergmann , Alexander Dahl , Sebastian Andrzej Siewior , linux-kernel@vger.kernel.org, Thomas Gleixner , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 9/9] misc: atmel_tclib: do not probe already used TCBs Message-ID: <20190417120002.GB12992@piout.net> References: <20190415150856.9384-1-alexandre.belloni@bootlin.com> <20190415150856.9384-10-alexandre.belloni@bootlin.com> <20190417114934.GA28520@5WDYG62> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190417114934.GA28520@5WDYG62> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17/04/2019 13:50:25+0200, Romain Izard wrote: > On Mon, Apr 15, 2019 at 05:08:56PM +0200, Alexandre Belloni wrote: > > The TCBs that have children are using the proper DT bindings and don't need > > to be handled by tclib. > > > > Cc: Arnd Bergmann > > Signed-off-by: Alexandre Belloni > > --- > > drivers/misc/atmel_tclib.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/drivers/misc/atmel_tclib.c b/drivers/misc/atmel_tclib.c > > index 194f774ab3a1..c1f5aba1c6f2 100644 > > --- a/drivers/misc/atmel_tclib.c > > +++ b/drivers/misc/atmel_tclib.c > > @@ -111,6 +111,9 @@ static int __init tc_probe(struct platform_device *pdev) > > struct resource *r; > > unsigned int i; > > > > + if (of_get_child_count(pdev->dev.of_node)) > > + return 0; > > + > > irq = platform_get_irq(pdev, 0); > > if (irq < 0) > > return -EINVAL; > > This lead to a panic during shutdown, as tc_shutdown is called on the > device that has not been initialized and it has not been designed for > this. > Yes, I saw that yesterday, the solution is to return -EBUSY instead of 0. That's what I had in my original series and I changed it before submitting to avoid the error message at boot but this was not a good idea. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com