Hi,
I'm investigating adding a custom driver for a device on my system. I'm not
a programmer by any means, so please pardon any silly questions...
I'd like to learn more about how to properly add custom drivers, and how
they are called from devicetrees. First, if there is a resource for this,
could you point me to it, please?
In my case, I need to read & write from specific PCIe registers, so I'm
assuming I can use "pci_write_config" from pci_ops for that.
However, I'm unclear on how to invoke a new driver. Looking at some
examples & guidance from the IRC channel, I've been told I can add a
chip.h, which I can call from a devicetree using the "chip path/to/driver"
line.
Specifically, what is the syntax & correct usage of the chip keyword? It
looks like it's generally arranged under other devices, but I'm unclear on
where I would put it. My device connects to a specific PCIe root port, so
would it be placed under that specific root port's enable line, similar to
this?
*device pci 1f.0 on chip ec/51nb/npce985la0dx device pnp
0c09.0 on end .........*
Further, it looks to me like arguments are passed to drivers using the
"register" keyword. If my driver takes no arguments, is it sufficient to
just place the "chip path/to/driver" ?
Thanks,
Rafael