[Skiboot] [PATCH 14/22] FSP/LEDS: Add device tree nodes

Ananth N Mavinakayanahalli ananth at in.ibm.com
Thu Feb 12 19:13:31 AEDT 2015


On Thu, Feb 05, 2015 at 02:10:40PM +0530, Vasant Hegde wrote:

> +	/* LED parent node */
> +	pled = dt_new(opal_node, "led");
> +	if (!pled) {
> +		prlog(PR_WARNING, PREFIX
> +		      "LED parent device node creation failed\n");
> +		return;
> +	}
> +	dt_add_property_strings(pled, "compatible", "ibm,opal-v3-led");
> +
> +	/* LED child nodes */
> +	list_for_each_safe(&cec_ledq, led, next, link) {
> +		cled = dt_new(pled, led->loc_code);
> +		if (!cled) {
> +			prlog(PR_WARNING, PREFIX
> +			      "LED child device node creation failed\n");
> +			continue;
> +		}
> +
> +		dt_add_property_strings(cled, "compatible", "ibm,opal-v3-led");

Do you need the compatible property for every led? You already have it
at /led, isn't that sufficient?

Ananth



More information about the Skiboot mailing list