On Mon, Aug 6, 2018 at 9:10 AM Ian Lepore <ian@xxxxxxxxxxx> wrote: > > On Mon, 2018-08-06 at 08:48 -0600, Rob Herring wrote: > > On Sun, Aug 5, 2018 at 4:03 PM Robert P. J. Day wrote: > > > > > > > > > > > Yes, to answer your question in the subject... > > > > > > > > in section 2.2.2 of devicetree spec v0.2, there is a moderately > > > lengthy list of recommended (but not mandatory) node names, but i > > > notice the use of a few other node names that might warrant inclusion > > > in that list. first, there is a *single* use of the node name > > > "nor-flash" here: > > > > > > arm64/boot/dts/hisilicon/hip05-d02.dts: nor-flash@0,0 { > > > > > > but a single usage doesn't really warrant official approval. > > Why not? > > > > > > > > next, there is usage of both "spiflash" and "spi-flash", but > > > "spi-flash" is clearly the dominant form (searching under arch/): > > > > > > $ grep -r spi-flash@ * | wc -l > > > 38 > > > $ grep -r spiflash@ * | wc -l > > > 1 > > > > > > so is "spi-flash" a recommended node name to be added to that list? > > > (neither of them is in the list at present.) > > Or they should all be changed to nor-flash. I'm not sure that encoding > > the interface type into the node name is good practice. Do we need > > i2c-flash, parallel-bus-flash, etc.? > > > > It's not about encoding the inteface name, SpiFlash is the registered > trademark for that type of device, so spi-flash is a good compromise > that makes it immediately apparently what type of device it is without > violating anybody's trademark. > > Of course, the compatible string tells you what type of device it is, > and the node's location in the tree tells you the interface. So the > name doesn't need to tell you anything at all, and to me that argues > for using something that's descriptive of the way the device is used in > the system, and that strongly argues against any arbitrary naming > standard at all except for general guidelines such as "dashes not > underbars". There is a long standing rule dating back to OpenFirmware that node names follow the class of device. A compatible string does not tell me that without additional information. The issue now is simply there are a lot more classes of devices than there were 20 years ago. Having consistent node names will allow for more validation of DTs. For example, look at the I2C and SPI bus validation that just landed in dtc[1]. Rob [1] https://www.spinics.net/lists/devicetree-compiler/msg02332.html -- To unsubscribe from this list: send the line "unsubscribe devicetree-spec" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html