Re: Sharing the same SPI between two devices.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> My question is - how the access to this particular SPI peripheral can be serialized between these two drivers in order to prevent simultaneous access that would result in a mess on the SPI? Do I have to modify the existing driver for SPI NOR flash or not? 

Doesn't the serialization happen at the SPI "master" controller driver level, i.e. the device registered via devm_spi_register_master (or equivalent)?  The spi-nor driver is a layer making requests to the underlying controller driver, which come as requests via various callbacks (e.g. transfer_one, prepare_message, mem_ops).  It is that driver that should be serializing requests from higher layers.  Shouldn't your "other" driver be making similar requests of the underlying controller?

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux