hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/drivers/power/supply/max14577_charger.c
....@@ -1,19 +1,9 @@
1
-/*
2
- * max14577_charger.c - Battery charger driver for the Maxim 14577/77836
3
- *
4
- * Copyright (C) 2013,2014 Samsung Electronics
5
- * Krzysztof Kozlowski <krzk@kernel.org>
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License as published by
9
- * the Free Software Foundation; either version 2 of the License, or
10
- * (at your option) any later version.
11
- *
12
- * This program is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- * GNU General Public License for more details.
16
- */
1
+// SPDX-License-Identifier: GPL-2.0+
2
+//
3
+// max14577_charger.c - Battery charger driver for the Maxim 14577/77836
4
+//
5
+// Copyright (C) 2013,2014 Samsung Electronics
6
+// Krzysztof Kozlowski <krzk@kernel.org>
177
188 #include <linux/module.h>
199 #include <linux/platform_device.h>
....@@ -633,9 +623,19 @@
633623 };
634624 MODULE_DEVICE_TABLE(platform, max14577_charger_id);
635625
626
+static const struct of_device_id of_max14577_charger_dt_match[] = {
627
+ { .compatible = "maxim,max14577-charger",
628
+ .data = (void *)MAXIM_DEVICE_TYPE_MAX14577, },
629
+ { .compatible = "maxim,max77836-charger",
630
+ .data = (void *)MAXIM_DEVICE_TYPE_MAX77836, },
631
+ { },
632
+};
633
+MODULE_DEVICE_TABLE(of, of_max14577_charger_dt_match);
634
+
636635 static struct platform_driver max14577_charger_driver = {
637636 .driver = {
638637 .name = "max14577-charger",
638
+ .of_match_table = of_max14577_charger_dt_match,
639639 },
640640 .probe = max14577_charger_probe,
641641 .remove = max14577_charger_remove,