Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp733185ybm; Fri, 29 May 2020 10:49:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZV6AFI+rL0Bg6/mDI7afz/B5qn8mqgj/a9Wlk7ZNi+dDS1b46vItX+NCJtjTxloliRT4/ X-Received: by 2002:a05:6402:b91:: with SMTP id cf17mr9332047edb.148.1590774591483; Fri, 29 May 2020 10:49:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590774591; cv=none; d=google.com; s=arc-20160816; b=XWsTmiGWwk8KKr2IA3uycSP4jxXGDqJNfYN+ayclF1pklxdmGMFiNTNr1l9xNBbhe6 kvVTMRvwk/h34ncWk9nQni5TiC7ULuYYfFmon7fv4IoiRLckmt7B7XPABEdGuJvQXL1Y h7Fm/ostUK+rcmviTa6xXN8Nv+G0mIMJvjKcK/1PVVspSdUW9eRFuK/Lk14oGOzT0hTq o7qgODF+7di9zC1tfXcM5u7ZMs0Op2xvYkAbNhDQMTnJjiqc+6HmDERC4zxaRL7e9S9r rxlYS+tuvcBZDPkN7Aw8D15k+g+YV7SAs2ZSKE+MGSasj2GCVNr+QXU1kwYI2pVQd7pS njmQ== 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=YEPv2zoK6RDQog2mvDu96Tli2rSNdOd2ZIHDudtIfbk=; b=n5H7Nlwl+NnlTu8o2zTxkGv8m6aLcz1U1qtHUIUp1LpMgBgszo3vqZzB3O8hVAki96 EmkWwRn+D/qivkC4Tu4tKaHU4NtGMHEmpZ8SH1Qk0FRAo2vIohlD1/Ed0bM3/CbVEiii G/kYPe6erW7LM0AwQlVDTCl244EbmxwhwqKhLN1KpPBCTZsSHF9OghIpHCZtO9uBELXC eqeuox3gv5K5KCIzjc/xsO8OaWszOd3+mSD5yuQkWIsLerIRULHRIi+rKkBkMP5fo/Lq zN5zxtAmxR2QQDjiJuQEwyMOPcjOJlLGj7gLL0rpK+M+Oqlfu8YJN69NdoyRDtbks4c0 x/WA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p22si2633780edy.126.2020.05.29.10.49.28; Fri, 29 May 2020 10:49:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727936AbgE2RrX (ORCPT + 99 others); Fri, 29 May 2020 13:47:23 -0400 Received: from bmailout3.hostsharing.net ([176.9.242.62]:42463 "EHLO bmailout3.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725601AbgE2RrW (ORCPT ); Fri, 29 May 2020 13:47:22 -0400 Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout3.hostsharing.net (Postfix) with ESMTPS id 10E47102F54BE; Fri, 29 May 2020 19:47:20 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 906A018297B; Fri, 29 May 2020 19:47:19 +0200 (CEST) Date: Fri, 29 May 2020 19:47:19 +0200 From: Lukas Wunner To: Florian Fainelli Cc: linux-kernel@vger.kernel.org, Mark Brown , Ray Jui , Scott Branden , "maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE..." , Nicolas Saenz Julienne , "open list:SPI SUBSYSTEM" , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" Subject: Re: [PATCH] spi: bcm2835: Implement shutdown callback Message-ID: <20200529174719.5tvchnoov747fm2x@wunner.de> References: <20200528190605.24850-1-f.fainelli@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200528190605.24850-1-f.fainelli@gmail.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 28, 2020 at 12:06:05PM -0700, Florian Fainelli wrote: > Make sure we clear the FIFOs, stop the block, disable the clock and > release the DMA channel. To what end? Why is this change necessary? Sorry but this seems like an awfully terse commit message. Thanks, Lukas > > Signed-off-by: Florian Fainelli > --- > drivers/spi/spi-bcm2835.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c > index 20d8581fdf88..237bd306c268 100644 > --- a/drivers/spi/spi-bcm2835.c > +++ b/drivers/spi/spi-bcm2835.c > @@ -1391,6 +1391,15 @@ static int bcm2835_spi_remove(struct platform_device *pdev) > return 0; > } > > +static void bcm2835_spi_shutdown(struct platform_device *pdev) > +{ > + int ret; > + > + ret = bcm2835_spi_remove(pdev); > + if (ret) > + dev_err(&pdev->dev, "failed to shutdown\n"); > +} > + > static const struct of_device_id bcm2835_spi_match[] = { > { .compatible = "brcm,bcm2835-spi", }, > {} > @@ -1404,6 +1413,7 @@ static struct platform_driver bcm2835_spi_driver = { > }, > .probe = bcm2835_spi_probe, > .remove = bcm2835_spi_remove, > + .shutdown = bcm2835_spi_shutdown, > }; > module_platform_driver(bcm2835_spi_driver); > > -- > 2.17.1 >