Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite driver device path management #33

Merged
merged 19 commits into from
Jul 18, 2024

Conversation

CoffeeLexer
Copy link
Contributor

@CoffeeLexer CoffeeLexer commented May 15, 2024

  • Fixed udev-rules being not applied
  • Renamed litepcie to limelitepcie
  • Changed all devices to use generic names
  • Grouped device specific communication files into directories
  • Added version data to Linux PCIe Device driver

Device Hierarchy after changes:

  • Old
    /dev/limex30_control
    /dev/limex30_trx0
  • New
    /dev/limelitepcie0/control0
    /dev/limelitepcie0/trx0
    /dev/limelitepcie0/trx1

@9600
Copy link
Member

9600 commented May 15, 2024

Why "limelitepcie? Have we forked and modified LitePCIe? How do we benefit even from an SDR Linux device entry having "litepcie" in the naming? It feels needlessly long, but I'm probably missing something.

@rjonaitis
Copy link
Member

the name "limelitepcie" can be changed to anything, it just needs to be unique, suggestions are welcome. This choice was just a straigthforward "lime" prefix addition to the original "litepcie" name, as it is a modified version of it.
I'm not sure about the hardware side, but I think it is using the original litepcie as it is. On the software side, the driver code has been modified to our needs and forked from the original, to provide functionality specific to our devices that the original 'litepcie' does not have (like: device specific DMA channels count, and buffer sizes, other device VIDs/PIDs, specific device naming).

There are couple of reasons for the rename:

  1. The kernel module name itself. The name has to be unique, to not clash with the original "litepcie" driver if it were already installed in the system, and both could be present at the same time.
  2. The system device names in the /dev directory. Human readable and obvious names like "LimeSDR****" are convenient, but unwieldy. As that would require driver code update (just adding additional name string) for each new device released, even though the functionality of the driver remains the same. Also in case old drivers would detect newer devices by VID/PID but not have a human readable name assigned in that version, that would still require to have some kind of fallback name for such cases, or for the driver to ignore that device, and bring confusion why it is working.

The "/dev/limelitepcie*" nameing was chosen to be the same as the module name for consistency sake. It can also be changed to anything we want, it doesn't have to match the module name, suggestions are welcome. The requirement is that it needs to be unique from other system device names. As this generic device name is intended for any of our possible PCI devices, it wouldn't be technically correct to include SDR in the name, as it's functionality could be anything else. Just to clarify these names are for the system usage to allow it to work (like: sda, sdb, tty0, tty1, i2c-0, i2c-1.... they just indicate type of device and index ), human readable symlink names can be provided additionaly by using UDEV rules, or list the detailed info about devices using our CLI tools limeDevice

src/comms/PCIe/linux-kernel-module/limelitepcie.c Outdated Show resolved Hide resolved
src/comms/PCIe/linux-kernel-module/limelitepcie.c Outdated Show resolved Hide resolved
src/comms/PCIe/linux-kernel-module/boards.h Outdated Show resolved Hide resolved
src/comms/PCIe/linux-kernel-module/limelitepcie.c Outdated Show resolved Hide resolved
src/comms/PCIe/linux-kernel-module/limelitepcie.c Outdated Show resolved Hide resolved
src/comms/PCIe/linux-kernel-module/limelitepcie.c Outdated Show resolved Hide resolved
src/comms/PCIe/linux-kernel-module/limelitepcie.c Outdated Show resolved Hide resolved
src/comms/PCIe/linux-kernel-module/limelitepcie.c Outdated Show resolved Hide resolved
@rjonaitis rjonaitis merged commit bbbfaa1 into myriadrf:develop Jul 18, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants