.. | .. |
---|
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> |
---|
17 | 7 | |
---|
18 | 8 | #include <linux/module.h> |
---|
19 | 9 | #include <linux/platform_device.h> |
---|
.. | .. |
---|
633 | 623 | }; |
---|
634 | 624 | MODULE_DEVICE_TABLE(platform, max14577_charger_id); |
---|
635 | 625 | |
---|
| 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 | + |
---|
636 | 635 | static struct platform_driver max14577_charger_driver = { |
---|
637 | 636 | .driver = { |
---|
638 | 637 | .name = "max14577-charger", |
---|
| 638 | + .of_match_table = of_max14577_charger_dt_match, |
---|
639 | 639 | }, |
---|
640 | 640 | .probe = max14577_charger_probe, |
---|
641 | 641 | .remove = max14577_charger_remove, |
---|