Hi, On 16/08/19 3:50 PM, John Garry wrote: > On 06/08/2019 17:40, Schrempf Frieder wrote: [...] > > 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. > If its a new driver, please add it under drivers/spi implementing SPI MEM framework. There are few drivers under drivers/spi that can be used as example. (Search for "spi_mem_ops") > 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? > I am not quite familiar with ACPI systems, but child flash device should use "jedec,spi-nor" as compatible. Regards Vignesh > 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/ > > -- Regards Vignesh