[En-Nut-Discussion] Doubts about NutRegisterSpiDevice
Uwe Bonnes
bon at elektron.ikp.physik.tu-darmstadt.de
Mon Sep 7 12:27:18 CEST 2015
Hello,
in the tradition of public soliloquy here another subject feedback would be
welcome:
For SPI devices, NutRegisterSpiDevice() stores the NUTSPINODE SPI bus
information in dev_icb. The Interface control block is used for general
interface information, and e.g. Ethernet drivers expectes IFNET as icb. So a
SPI-connected ethernet device can't use our present net infrastructure.
The device control blockdev_dcb thereas is normally used for storing driver
specific information and NUTSPINODE has an entry node_dcb for layering
devices specific information.
So I think NutRegisterSpiDevice() is the wrong approach and a better
functionality to register a device would should store NUTSPINODE as dev_dcb.
To keep backward compatibility I think about adding a NutSpiRegisterDevice()
function similar to NutRegisterSpiDevice(), but storing NUTSPINODE in
dev_dcb.
Do I miss something? Any objections?
Thanks
--
Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
More information about the En-Nut-Discussion
mailing list