Re: Sharing the same SPI between two devices.

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

 



On Thu, Nov 2, 2023 at 9:15 AM Patryk <pbiel7@xxxxxxxxx> wrote:
>
> Hi, I want to have two devices on the same SPI bus.
>
> These devices are:
>
> - SPI nor flash (QSPI compatible)
>
> - my custom device (SPI compatible).
>
> For SPI NOR flash I have the driver in the kernel, for my custom device I do not have such a driver.
>
> 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?
>
> How about different configurations for these devices - as I mentioned one is QSPI compatible whereas the other one is SPI compatible. Can I reconfigure the SPI bus driver before each "transaction"?
>
>
> Best regards
>
> Patryk
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@xxxxxxxxxxxxxxxxx
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

To share the SPI bus between two devices just put them difirent chip
select pins.
Can you use regmap for what you trying to do?

_______________________________________________
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