> The multi-master -binding is documented here as boolean and encodes a > Boolean by either existing or not existing in device tree. It is also > used in other drivers so I couldn't do much about it missing meaning > False. > https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/i2c/i2c.txt > I originally had a custom device tree entry where the default was for > multi-master to be enabled before I noticed the pre-existing binding. > > Maybe if the multi-master binding was changed from Boolean to for > example a string property (multi-master = "ON" / multi-master = > "OFF"), code could still just check the existence with > "of_property_read_bool()" first, where property missing means "OFF" > and property existing means "ON"(like before) if there is no text > associated. Xiic driver would then only disable multimaster, if device > tree explicitly contains multi-master = "OFF". > > This should be able to maintain driver backwards compatibility with > old device trees, but requires binding documentation change and all > drivers should likely be updated to also accept the new style of > multi-master property to be consistent. This is also not as clean as > the old Boolean property in my opinion. I agree. I don't want to change the old "multi-master" binding like above because that would be quite intrusive for other drivers and confusing when trying to understand the binding. My best bet is to introduce another binding "single-master" which says clearly that we are the only bus master on that bus. Both bindings missing means then "unclear". I think this matches reality best. Opinions?
Attachment:
signature.asc
Description: PGP signature