On 06/11/2015 12:07 AM, Matt Ranostay wrote:
[...]
   static const struct cap11xx_hw_model cap11xx_devices[] = {
-       [CAP1106] = { .product_id = 0x55, .num_channels = 6 },
-       [CAP1126] = { .product_id = 0x53, .num_channels = 6 },
-       [CAP1188] = { .product_id = 0x50, .num_channels = 8 },
+       [CAP1106] = { .product_id = 0x55, .num_channels = 6, .num_leds = 0
},
+       [CAP1126] = { .product_id = 0x53, .num_channels = 6, .num_leds = 2
},
+       [CAP1188] = { .product_id = 0x50, .num_channels = 8, .num_leds = 8
},
   };


The number of LEDs should be determined by the number of DT child nodes
representing each LED. Please refer to
Documentation/devicetree/bindings/leds/common.txt and other LED
subsystem drivers to find out how it should be implemented.

Ok but this is still needed as a check so you don't "overflow" the
number the chipset supports, correct?

Right, the above modification is correct then.

--
Best Regards,
Jacek Anaszewski
--
To unsubscribe from this list: send the line "unsubscribe linux-leds" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to