Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp844963imm; Wed, 20 Jun 2018 07:32:46 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKF/0JOWKt8YQAnfFdLBahDPvHHHMStIPatjMVZwA1n7tlvBvjs4A/Y43OIf3GhehL7dP5J X-Received: by 2002:a62:190d:: with SMTP id 13-v6mr23097623pfz.103.1529505166162; Wed, 20 Jun 2018 07:32:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529505166; cv=none; d=google.com; s=arc-20160816; b=D4N/OuMzk1CttDzdLsim18w5hTxrPCx7sxMkmSigG4s4YXbqOB/xNLCQ0vybXFwrv0 1R0z+G8DJI8ULGKTMrTGGd+bucQTCUDx9UWOT9fh+7i8zIxgobTOOGg3CCeLP/KwHmPI l4xVYvN9JFaPyhi9SY6zYGylgYCUkUnW8pJmL7YkMwGAyPCfvyIVWVKtNU6PrusMJpea CAVhxZIjXnFTTUyh9cSCBmJuJlFfWhMeCE1ttMhZ68dkgNBKCKw6w36nc0BCRbT9CbHc AeXakhI6Fkod+zkznkht6fUt4k+yd8HZ7ckC+aEW9z7TcJyuGYPWCRDu6+ZQow+NSY0q nhLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:date:from:dkim-signature :arc-authentication-results; bh=yUfIboMcb/EOHM8RJL6UJ1RJCNBdzF9E5sAesf9di0c=; b=ZoL6vqJv076GEz2d1TAE9e14uJZDW1OHiwIu8E4TH33fXyaDHCyxiLR0sdAglz405B JBomV7lLpwPS05WIc+yWSx/qsTV4wh31Sgtt1eVZBUzuixozjibBxNsVSZnVZLmPhvtN hsyM9cyCXLKvi4voEPE/hBzl1T5s8/96toGTz3dT2nqLqBCoGleBF8tg2Jus0nKWJQ64 Q89/w936rQXl6hexS6/Bx3WcL0tUryuQYUjP5ukmFjmsOe/8LeaEKA89iheRz0mHEecQ KyrKfG7R8gbjSQOlAaOm29p8bju/JIcH8ePYmbnwuJ7wxxkUIvvUSbI3Irk2yPk9uxXo P4hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dQ0yzZRb; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s72-v6si2375886pfa.367.2018.06.20.07.32.32; Wed, 20 Jun 2018 07:32:46 -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=@gmail.com header.s=20161025 header.b=dQ0yzZRb; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754230AbeFTObY (ORCPT + 99 others); Wed, 20 Jun 2018 10:31:24 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:45198 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752951AbeFTObV (ORCPT ); Wed, 20 Jun 2018 10:31:21 -0400 Received: by mail-lf0-f68.google.com with SMTP id a13-v6so5281897lfk.12; Wed, 20 Jun 2018 07:31:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=yUfIboMcb/EOHM8RJL6UJ1RJCNBdzF9E5sAesf9di0c=; b=dQ0yzZRboO6/CZNtMGeCwFhr4LwkypbFUORh/0XBvc5c4izxStedsSvuA0h+LulO+b zoFS298JtUOKcJaj6BEe1qvw1VTq4rGj+zT2o/nCuoPBLkduu8AMu1MNQ3RRXWuyLuiO LFJOPIya/IjcoMl//YXwFkhb7dk1ncNLa9xQiYDye+CRcr5ezzoXRYDl45wK2XUGX53K mjO30NZlqBv49f7SMsDMTQvJd93qEa52XchGmJ4XS8CjF8ipqYEjzfZ4bzsDSkEG+waw N5yNY5lAxp9k4K1uLKMvxovRs3GVTgVAj8ixKMs0GawEybqV/I8IhY9CpONZsXBWbgeg OGgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=yUfIboMcb/EOHM8RJL6UJ1RJCNBdzF9E5sAesf9di0c=; b=T3/ROYbICxktCcLDBhA4wy/Bf2m0hg9hsss4Id7Ay9Jr4IEMeQaQWm4UnN88W0JDnM +sowrocaaTJpVdpEZW3ssreVbkV3YS2hn7zXq9XrGig35aiAbL7/fj1Gef4hWbIFNg0F MDlKwS2UT1X6nq/PEeqrrhGfaWPKx1FhS+L4K6DpymnwDJh2+dyVHGf0ptjL7gtv5fGo YzS2I3wLlZ1cs/CmqEBV4j9hZjue2rzDRgNxSXAanoAfz2xbHgHWS4YWwgOm/7QckujU boTdRQmdN9+1SCBiuzii3DaCekFSavjMzbHITOdvEY8cJlzDyAySQtSVrukPUcnXVuF7 uaEA== X-Gm-Message-State: APt69E1jxCDCDe9eotaOXhYfadk9+89PBCrrhK9FXbNZchMQV2eWvNiR BgSCpSnsEdVuKeHsgvbdjy422xw= X-Received: by 2002:a19:1a52:: with SMTP id a79-v6mr13772657lfa.43.1529505080136; Wed, 20 Jun 2018 07:31:20 -0700 (PDT) Received: from [192.168.0.4] (89-64-25-103.dynamic.chello.pl. [89.64.25.103]) by smtp.gmail.com with ESMTPSA id x15-v6sm449069lfe.39.2018.06.20.07.31.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Jun 2018 07:31:19 -0700 (PDT) From: Piotr Bugalski X-Google-Original-From: Piotr Bugalski Date: Wed, 20 Jun 2018 16:31:13 +0200 (CEST) To: Mark Brown cc: Piotr Bugalski , linux-spi@vger.kernel.org, David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Rob Herring , Mark Rutland , Nicolas Ferre , Alexandre Belloni , Cyrille Pitchen , Tudor Ambarus , Piotr Bugalski Subject: Re: [RFC PATCH 1/2] spi: Add QuadSPI driver for Atmel SAMA5D2 In-Reply-To: <20180619151506.GG11230@sirena.org.uk> Message-ID: References: <20180618162124.21749-1-bugalski.piotr@gmail.com> <20180618162124.21749-2-bugalski.piotr@gmail.com> <20180619151506.GG11230@sirena.org.uk> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mark, Thank you very much for quick answer. On Tue, 19 Jun 2018, Mark Brown wrote: > On Mon, Jun 18, 2018 at 06:21:23PM +0200, Piotr Bugalski wrote: > >> +static int atmel_qspi_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op) >> +{ >> + return 0; >> +} > > If this can be empty should we adjust the callers to allow it to just be > omitted? > If I remember well some commits ago spi-mem required even empty adjust_op_size. Now it seems unnecessary, but I forgot to remove the code. I will fix it in next version. >> +static int atmel_qspi_remove(struct platform_device *pdev) >> +{ >> + struct spi_controller *ctrl = platform_get_drvdata(pdev); >> + struct atmel_qspi *aq = spi_controller_get_devdata(ctrl); >> + >> + qspi_writel(aq, QSPI_CR, QSPI_CR_QSPIDIS); >> + clk_disable_unprepare(aq->clk); >> + >> + spi_unregister_controller(ctrl); >> + >> + return 0; >> +} > > You should unregister the controller before disabling the hardware, > otherwise something could come in and try to start an operation on the > controller (or already be running one) while the hardware is disabled > which might blow up. > Sure, deinit should be done in reverse order of init, you are perfectly right, just my mistake. I'll fix it in next version. Best Regards, Piotr