On Thu, 26 Apr 2018, Javier Arteaga wrote: [...] > > > static const struct regmap_range upboard_up2_readable_ranges[] = { > > > @@ -116,7 +124,18 @@ static const struct regmap_config upboard_up2_regmap_config = { > > > .wr_table = &upboard_up2_writable_table, > > > }; > > > > > > +static struct upboard_led_data upboard_up2_led_data[] = { > > > + { .id = 0, .color = "blue" }, > > > + { .id = 1, .color = "yellow" }, > > > + { .id = 2, .color = "green" }, > > > + { .id = 3, .color = "red" }, > > > +}; > > > > How is this data used? > > > > Does it ever change, from board to board? > > This provides indexes into the LED control register, so the leds driver > knows which regmap bits to flip, and maps them to color names, so it can > name the led devices accordingly. The mapping does change for each board > (UP1 has 3 LEDs, UP Core depends on the carrier board). I think this information should live in the driver which consumes it. -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog