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=-5.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 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 36685C433B4 for ; Tue, 18 May 2021 14:38:28 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 01C80611CC for ; Tue, 18 May 2021 14:38:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 01C80611CC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID: Subject:Cc: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=GokyZiYzcfgsR1dQdV452ySEdMjjQeC3zUn0JEU1aWw=; b=pleWNYn4jgrqn4Am9CChDQGOF B0SxYgdvHOO9IlUcxNVDr+OWzTz7UgSU+pV/+feor38SsXkftjrhOzqfSWDKm3hghugfPM2MHMp5q /lEK9gbBjXJi2dVBv+/UUT1xYbSIzkv05t7/siYOiNf02u8RKha6p5E2Jd+zn4wsdbOw/Ty6f8Ftr +eU4TF7unI728nxmpvOOu1ox5B/ezlcIVVNNrcOsLt/aMU7ewZcYVJF7hX5yTvdF5E1yaXanoWJG6 hjSekSgSmTH4gH1po/ey20aW3i4c3eCWiAETkH7AQdZZIMncgis+KY2+AaLizbHDnF+RCO5oyVWMf efBiKQ0KQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lj0qf-0014I3-2w; Tue, 18 May 2021 14:37:29 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lj0qQ-0014FZ-Oo; Tue, 18 May 2021 14:37:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Sender:Reply-To:Content-ID:Content-Description; bh=vUe5ghgawAWActSBIB6oOHRnlS3umJ/eDjUnUdw6AU8=; b=MvS0glM5LPL4nVeD0Zp/0dHf2d n7ZdOB7O/D8YXvVk1m08UzrT26+W8xTal/yvGGa7c5/m6JzGYY9U0u5Gyyr7HEZKe3J1aqDWm+NO/ QruCe5ixzjMvHYfN/ES7O9stgv28Bfv4WmUPwCIgPmzx0cfNDk6aLpF2mU3qv5YQZtKRex3BL2RmW eYqkz82QSrVZqdfUSC5vnncST0Qu6Cm2yxhYTKUZQzzkE1LjXZ/Yg8LEYpEAD+BNWWlAeupdQSXW5 Swip5qoARbs6Zf359XsmY9Wv8ed8+c1A+Iq5idj2YJbExSUEXRgYrJlpzRXTPpUr9HS8Fbh/upaxE 5NcB0h/g==; Received: from bhuna.collabora.co.uk ([46.235.227.227]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lj0qO-00EjbM-41; Tue, 18 May 2021 14:37:13 +0000 Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 8815F1F42F11; Tue, 18 May 2021 15:37:10 +0100 (BST) Date: Tue, 18 May 2021 16:37:07 +0200 From: Boris Brezillon To: Cc: Mark Brown , Miquel Raynal , Vignesh Raghavendra , , Alexandre Torgue , , , , , Subject: Re: [PATCH v4 3/3] spi: stm32-qspi: add automatic poll status feature Message-ID: <20210518163707.0e6bd120@collabora.com> In-Reply-To: <20210518134332.17826-4-patrice.chotard@foss.st.com> References: <20210518134332.17826-1-patrice.chotard@foss.st.com> <20210518134332.17826-4-patrice.chotard@foss.st.com> Organization: Collabora X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_073712_324631_2BB5CCBB X-CRM114-Status: GOOD ( 10.43 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org On Tue, 18 May 2021 15:43:32 +0200 wrote: > +static int stm32_qspi_poll_status(struct spi_mem *mem, const struct spi_mem_op *op, > + u16 mask, u16 match, > + unsigned long initial_delay_us, > + unsigned long polling_rate_us, > + unsigned long timeout_ms) > +{ > + struct stm32_qspi *qspi = spi_controller_get_devdata(mem->spi->master); > + int ret; > + The spi_mem_supports_op() call is still missing. > + ret = pm_runtime_get_sync(qspi->dev); > + if (ret < 0) { > + pm_runtime_put_noidle(qspi->dev); > + return ret; > + } > + > + mutex_lock(&qspi->lock); > + > + writel_relaxed(mask, qspi->io_base + QSPI_PSMKR); > + writel_relaxed(match, qspi->io_base + QSPI_PSMAR); > + qspi->fmode = CCR_FMODE_APM; > + qspi->status_timeout = timeout_ms; > + > + ret = stm32_qspi_send(mem, op); > + mutex_unlock(&qspi->lock); > + > + pm_runtime_mark_last_busy(qspi->dev); > + pm_runtime_put_autosuspend(qspi->dev); > + > + return ret; > +} ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/