1*f18198c0SInochi Amaoto // SPDX-License-Identifier: GPL-2.0
2*f18198c0SInochi Amaoto /*
3*f18198c0SInochi Amaoto * Sophgo SG2044 multi-function system controller driver
4*f18198c0SInochi Amaoto *
5*f18198c0SInochi Amaoto * Copyright (C) 2025 Inochi Amaoto <inochiama@gmail.com>
6*f18198c0SInochi Amaoto */
7*f18198c0SInochi Amaoto
8*f18198c0SInochi Amaoto #include <linux/mfd/core.h>
9*f18198c0SInochi Amaoto #include <linux/mod_devicetable.h>
10*f18198c0SInochi Amaoto #include <linux/module.h>
11*f18198c0SInochi Amaoto #include <linux/property.h>
12*f18198c0SInochi Amaoto #include <linux/resource.h>
13*f18198c0SInochi Amaoto
14*f18198c0SInochi Amaoto static const struct mfd_cell sg2044_topsys_subdev[] = {
15*f18198c0SInochi Amaoto {
16*f18198c0SInochi Amaoto .name = "sg2044-pll",
17*f18198c0SInochi Amaoto },
18*f18198c0SInochi Amaoto };
19*f18198c0SInochi Amaoto
sg2044_topsys_probe(struct platform_device * pdev)20*f18198c0SInochi Amaoto static int sg2044_topsys_probe(struct platform_device *pdev)
21*f18198c0SInochi Amaoto {
22*f18198c0SInochi Amaoto return devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO,
23*f18198c0SInochi Amaoto sg2044_topsys_subdev,
24*f18198c0SInochi Amaoto ARRAY_SIZE(sg2044_topsys_subdev),
25*f18198c0SInochi Amaoto NULL, 0, NULL);
26*f18198c0SInochi Amaoto }
27*f18198c0SInochi Amaoto
28*f18198c0SInochi Amaoto static const struct of_device_id sg2044_topsys_of_match[] = {
29*f18198c0SInochi Amaoto { .compatible = "sophgo,sg2044-top-syscon" },
30*f18198c0SInochi Amaoto { /* sentinel */ }
31*f18198c0SInochi Amaoto };
32*f18198c0SInochi Amaoto MODULE_DEVICE_TABLE(of, sg2044_topsys_of_match);
33*f18198c0SInochi Amaoto
34*f18198c0SInochi Amaoto static struct platform_driver sg2044_topsys_driver = {
35*f18198c0SInochi Amaoto .probe = sg2044_topsys_probe,
36*f18198c0SInochi Amaoto .driver = {
37*f18198c0SInochi Amaoto .name = "sg2044-topsys",
38*f18198c0SInochi Amaoto .of_match_table = sg2044_topsys_of_match,
39*f18198c0SInochi Amaoto },
40*f18198c0SInochi Amaoto };
41*f18198c0SInochi Amaoto module_platform_driver(sg2044_topsys_driver);
42*f18198c0SInochi Amaoto
43*f18198c0SInochi Amaoto MODULE_AUTHOR("Inochi Amaoto <inochiama@gmail.com>");
44*f18198c0SInochi Amaoto MODULE_DESCRIPTION("Sophgo SG2044 multi-function system controller driver");
45*f18198c0SInochi Amaoto MODULE_LICENSE("GPL");
46