On Sat, 23 Feb 2008 15:58:23 -0600 Josh Boyer <[EMAIL PROTECTED]> wrote:
> IEEE 1275 defined a standard "status" property to indicate the operational > status of a device. The property has four possible values: okay, disabled, > fail, fail-xxx. The absence of this property means the operational status > of the device is unknown or okay. > > This adds a function called of_device_is_disabled that checks to see if a > node has the status property set to "disabled". This can be quite useful > for devices that may be present but disabled due to pin sharing, etc. > > Signed-off-by: Josh Boyer <[EMAIL PROTECTED]> Talking with Ben H a bit, he suggested to reverse this API. Basically, create an of_device_is_available that returns 1 if the status property is completely missing, or if it's set to "okay" or "ok". The latter is to cope with some broken firmwares. I can do either really. Eventually you could embed the is_available check in the of_platform code so that devices don't even get presented to drivers if they aren't available. Dave, I'm not sure how applicable this all is to sparc. But for some of the "newer" embedded ports that are coming into powerpc I can see it being very useful. Thoughts? josh _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev