Skip to content

Commit 7f1f380

Browse files
author
Jiri Kosina
committed
Merge branch 'for-5.14/google' into for-linus
- device tree match for Google Whiskers device from Ikjoon Jang
2 parents fd73788 + 8dcaa04 commit 7f1f380

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/hid/hid-google-hammer.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <linux/hid.h>
1818
#include <linux/leds.h>
1919
#include <linux/module.h>
20+
#include <linux/of.h>
2021
#include <linux/platform_data/cros_ec_commands.h>
2122
#include <linux/platform_data/cros_ec_proto.h>
2223
#include <linux/platform_device.h>
@@ -272,12 +273,21 @@ static const struct acpi_device_id cbas_ec_acpi_ids[] = {
272273
};
273274
MODULE_DEVICE_TABLE(acpi, cbas_ec_acpi_ids);
274275

276+
#ifdef CONFIG_OF
277+
static const struct of_device_id cbas_ec_of_match[] = {
278+
{ .compatible = "google,cros-cbas" },
279+
{ },
280+
};
281+
MODULE_DEVICE_TABLE(of, cbas_ec_of_match);
282+
#endif
283+
275284
static struct platform_driver cbas_ec_driver = {
276285
.probe = cbas_ec_probe,
277286
.remove = cbas_ec_remove,
278287
.driver = {
279288
.name = "cbas_ec",
280289
.acpi_match_table = ACPI_PTR(cbas_ec_acpi_ids),
290+
.of_match_table = of_match_ptr(cbas_ec_of_match),
281291
.pm = &cbas_ec_pm_ops,
282292
},
283293
};

0 commit comments

Comments
 (0)