Quantcast
Channel: Processors
Viewing all articles
Browse latest Browse all 149649

Forum Post: RE: AM335x: Assigning interrupt to a GPIO via DTS

$
0
0

As far as I can see in the documentation, the "status" property is used to check if a device is ready for use. Check here: http://lxr.free-electrons.com/source/drivers/of/base.c?v=3.12#L395

[quote]/**
 *  __of_device_is_available - check if a device is available for use
 *
 *  @device: Node to check for availability, with locks already held
 *
 *  Returns 1 if the status property is absent or set to "okay" or "ok",
 *  0 otherwise
 */
static int __of_device_is_available(const struct device_node *device)
{
    const char *status;
    int statlen;

    status = __of_get_property(device, "status", &statlen);
    if (status == NULL)
        return 1;

    if (statlen > 0) {
        if (!strcmp(status, "okay") || !strcmp(status, "ok"))
            return 1;
    }

    return 0;
}[/quote]

My knowledge on your second question is limited, sorry.

Best regards,
Miroslav


Viewing all articles
Browse latest Browse all 149649

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>