Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp746441ybl; Fri, 16 Aug 2019 03:23:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqw5e9fDRFv7xYYbaPaTgxFxFoVsuRYeejDfXbEMnsRY9IeISk3GIh/EK/mylyMoW+PFTy+q X-Received: by 2002:a63:724f:: with SMTP id c15mr7259268pgn.257.1565951003560; Fri, 16 Aug 2019 03:23:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565951003; cv=none; d=google.com; s=arc-20160816; b=RzSWFCuiXzQ9DzsXmBwM+7aPTavaAx3cxCg3szjZm1vYf0/10AwXhcKPJQTm9XuQTU WIUh2kaRVh8Cx2l3p/Q7Uyo1B1m5NM0ysQ987xonkuUqG8kFE/RDeblVytrMgFLPb/YB ZdKAs1iRLjF5IO37TNP22uLdIuV+PIJuPhL0nhJH9OxNlzvTPBgxWKN3y80EAgWZr0K1 ae58ZYK/u3I5xa06qZjeSiT7VNbuOh1WIdU3N8sWHzVhLoaUe9uEZh5J57ukQGm5s3s6 a1NXygedpCDIFcl7h6XhA0RDO6TUAKj/P7sfIPf0L39wg/bQCPUyPxIuHkj0TJ4bUrvV dtsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:cc:references:to:subject :from; bh=i1pkQopLS0AOfpgr81ERjT9qhpQhFzMA/m1BXODfuNc=; b=Vywic/XOP1a6M4A0PleTyvxmPaasQV/x2ySiilk3Dt3OmXoMurmLsd+4qfDN/P9kOB X3llwzFU9/ddE/U2TJGudFI8GIgtuXzocbdNQvu9PD8Vbfe1sYU5apq8HO4xSD+mB62W 11CWjnIjwz+vIxsqoAIViS6VboyXCwLRQn38FgYR5oWuMChJcqvXI45qC8RwWxDKDsBw 8BSz3YAMLPhy3SQxLNrVXHetuNhWEL58aNVLvo2ZDO1KHbAK5W25Ppxc6zNyD6RoALvl vhtaE6GkO7ShU8meDmp+FCib66xZOoCGsXOIkazwPgeOSnPdQL0uihP78CIf5mC48BI6 DkoA== 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 k8si4131656pfp.255.2019.08.16.03.23.06; Fri, 16 Aug 2019 03:23:23 -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 S1727094AbfHPKUp (ORCPT + 99 others); Fri, 16 Aug 2019 06:20:45 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:4706 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726761AbfHPKUp (ORCPT ); Fri, 16 Aug 2019 06:20:45 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 29405BDAF1D26FCBC989; Fri, 16 Aug 2019 18:20:43 +0800 (CST) Received: from [127.0.0.1] (10.202.227.238) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Fri, 16 Aug 2019 18:20:35 +0800 From: John Garry Subject: Re: [PATCH] docs: mtd: Update spi nor reference driver To: Schrempf Frieder , "corbet@lwn.net" , "mchehab+samsung@kernel.org" , "linux-mtd@lists.infradead.org" References: <1565107583-68506-1-git-send-email-john.garry@huawei.com> <6c4bb892-6cf5-af46-3ace-b333fd47ef14@huawei.com> <9b074db7-b95d-a081-2fba-7b2b82997332@kontron.de> CC: "linux-kernel@vger.kernel.org" , "linux-doc@vger.kernel.org" , "marek.vasut@gmail.com" , "tudor.ambarus@microchip.com" , "broonie@kernel.org" , "miquel.raynal@bootlin.com" , "richard@nod.at" , "vigneshr@ti.com" , wanghuiqiang Message-ID: Date: Fri, 16 Aug 2019 11:20:28 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <9b074db7-b95d-a081-2fba-7b2b82997332@kontron.de> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.238] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/08/2019 17:40, Schrempf Frieder wrote: > Cc: +MTD/SPI-NOR/SPI maintainers > > Hi John, > > On 06.08.19 18:35, John Garry wrote: >> On 06/08/2019 17:06, John Garry wrote: >>> The reference driver no longer exists since commit 50f1242c6742 ("mtd: >>> fsl-quadspi: Remove the driver as it was replaced by spi-fsl-qspi.c"). >>> >>> Update reference to spi-fsl-qspi.c driver. >>> >>> Signed-off-by: John Garry >>> >>> diff --git a/Documentation/driver-api/mtd/spi-nor.rst >>> b/Documentation/driver-api/mtd/spi-nor.rst >>> index f5333e3bf486..1f0437676762 100644 >>> --- a/Documentation/driver-api/mtd/spi-nor.rst >>> +++ b/Documentation/driver-api/mtd/spi-nor.rst >> >> In fact this document has many references to Freescale QuadSPI - could >> someone kindly review this complete document for up-to-date accuracy? > > The new driver spi-fsl-qspi.c is not a SPI NOR controller driver > anymore. It is now a SPI controller driver that uses the SPI MEM API, so > referencing it here is obsolete. > > Actually it seems like the whole file is obsolete and needs to be > removed or replaced by proper documentation of the SPI MEM API. Hi, Could someone kindly advise on the following: I am looking at ACPI support only for an mtd spi nor driver we're targeting for mainline support. So for the host, I could use a proprietary HID in the DSDT for matching in the kernel driver. About the child spi flash devices, is the recommendation to just use PRP0001 HID and "jedec,spi-nor" compatible? thanks, John > > @Maintainers: > Maybe the docs under Documentation/driver-api/mtd should be officially > maintained by the MTD subsystem (and added to MAINTAINERS). And if there > will be some driver API docs for SPI MEM it should probably live in > Documentation/driver-api/spi instead of Documentation/driver-api/mtd, as > spi-mem.c itself is in drivers/spi. > > Regards, > Frieder > >> >> Thanks, >> John >> >>> @@ -59,7 +59,7 @@ Part III - How can drivers use the framework? >>> >>> The main API is spi_nor_scan(). Before you call the hook, a driver >>> should >>> initialize the necessary fields for spi_nor{}. Please see >>> -drivers/mtd/spi-nor/spi-nor.c for detail. Please also refer to >>> fsl-quadspi.c >>> +drivers/mtd/spi-nor/spi-nor.c for detail. Please also refer to >>> spi-fsl-qspi.c >>> when you want to write a new driver for a SPI NOR controller. >>> Another API is spi_nor_restore(), this is used to restore the status >>> of SPI >>> flash chip such as addressing mode. Call it whenever detach the >>> driver from >>> >> >> >> >> ______________________________________________________ >> Linux MTD discussion mailing list >> http://lists.infradead.org/mailman/listinfo/linux-mtd/