Messages in this thread | | | Date | Tue, 6 Dec 2011 22:50:56 +0100 | From | Wolfram Sang <> | Subject | Re: [PATCH] drivers, char: add U-Boot bootcount driver |
| |
Hi Heiko,
> >> This driver provides read/write access to the U-Boot bootcounter > >> through PROC FS and/or sysFS file. > > > > Why ProcFS? Why ProcFS and/or SysFS? Which has priority? Why not /dev? > > I drop the ProcFS support for v2.
Don't bother. This approach starts from the wrong side.
> > >> The bootcountregister gets configured via DTS. > >> for example on the enbw_cmc board: > >> > >> bootcount@0x23060 { > >> compatible = "uboot,bootcount"; > > > > No. I assume you are not the vendor of what is at 0x23060, the actual device. > > Only the device must be encoded in the compatible-entry which then implies the > > bootcount functionality. Also, keep in mind that your solution should be > > generic for bootloaders. > > So I should call it compatible = "generic, bootcount" ?
Nope, you should give it the name of the device. Remember that 'compatible' is no 1:1 replacement for platform_driver-binding. Check http://devicetree.org/Device_Tree_Usage, especially the sections about the compatible-property.
bootcount itself is not a device. It is a feature of certain devices. And that needs to be implemented; possibly generic enough that it can work for register based, i2c based, and so forth, accesses.
Regards,
Wolfram
-- Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | [unhandled content-type:application/pgp-signature] | |