Skip to content

Commit 75bd07a

Browse files
Kate Hsuanlag-linaro
authored andcommitted
leds: rgb: leds-ktd202x: I2C ID tables for KTD2026 and 2027
Add an i2c_device_id id_table to match manually instantiated (non device-tree / ACPI instantiated) KTD202x controllers as found on some x86 boards. This table shows the maximum support LED channel for KTD2026 (three LEDs) and KTD-2027 (4 LEDs). Link: https://www.kinet-ic.com/uploads/KTD2026-7-04h.pdf Signed-off-by: Kate Hsuan <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent f14aa5e commit 75bd07a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/leds/rgb/leds-ktd202x.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,13 @@ static void ktd202x_shutdown(struct i2c_client *client)
606606
regmap_write(chip->regmap, KTD202X_REG_RESET_CONTROL, KTD202X_RSTR_RESET);
607607
}
608608

609+
static const struct i2c_device_id ktd202x_id[] = {
610+
{"ktd2026", KTD2026_NUM_LEDS},
611+
{"ktd2027", KTD2027_NUM_LEDS},
612+
{}
613+
};
614+
MODULE_DEVICE_TABLE(i2c, ktd202x_id);
615+
609616
static const struct of_device_id ktd202x_match_table[] = {
610617
{ .compatible = "kinetic,ktd2026", .data = (void *)KTD2026_NUM_LEDS },
611618
{ .compatible = "kinetic,ktd2027", .data = (void *)KTD2027_NUM_LEDS },
@@ -621,6 +628,7 @@ static struct i2c_driver ktd202x_driver = {
621628
.probe = ktd202x_probe,
622629
.remove = ktd202x_remove,
623630
.shutdown = ktd202x_shutdown,
631+
.id_table = ktd202x_id,
624632
};
625633
module_i2c_driver(ktd202x_driver);
626634

0 commit comments

Comments
 (0)