Lines Matching +full:nxp +full:- +full:imx
1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright 2018-2020 NXP.
6 #include <dt-bindings/firmware/imx/rsrc.h>
8 #include <linux/firmware/imx/sci.h>
53 msg.data.req.resource_id = sensor->resource_id; in imx_sc_thermal_get_temp()
56 hdr->ver = IMX_SC_RPC_VERSION; in imx_sc_thermal_get_temp()
57 hdr->svc = IMX_SC_RPC_SVC_MISC; in imx_sc_thermal_get_temp()
58 hdr->func = IMX_SC_MISC_FUNC_GET_TEMP; in imx_sc_thermal_get_temp()
59 hdr->size = 2; in imx_sc_thermal_get_temp()
63 dev_err(&sensor->tzd->device, "read temp sensor %d failed, ret %d\n", in imx_sc_thermal_get_temp()
64 sensor->resource_id, ret); in imx_sc_thermal_get_temp()
87 np = of_find_node_by_name(NULL, "thermal-zones"); in imx_sc_thermal_probe()
89 return -ENODEV; in imx_sc_thermal_probe()
91 sensor_np = of_node_get(pdev->dev.of_node); in imx_sc_thermal_probe()
94 sensor = devm_kzalloc(&pdev->dev, sizeof(*sensor), GFP_KERNEL); in imx_sc_thermal_probe()
97 ret = -ENOMEM; in imx_sc_thermal_probe()
103 &sensor->resource_id); in imx_sc_thermal_probe()
105 dev_err(&pdev->dev, in imx_sc_thermal_probe()
112 sensor->tzd = devm_thermal_zone_of_sensor_register(&pdev->dev, in imx_sc_thermal_probe()
113 sensor->resource_id, in imx_sc_thermal_probe()
116 if (IS_ERR(sensor->tzd)) { in imx_sc_thermal_probe()
117 dev_err(&pdev->dev, "failed to register thermal zone\n"); in imx_sc_thermal_probe()
118 ret = PTR_ERR(sensor->tzd); in imx_sc_thermal_probe()
123 if (devm_thermal_add_hwmon_sysfs(sensor->tzd)) in imx_sc_thermal_probe()
124 dev_warn(&pdev->dev, "failed to add hwmon sysfs attributes\n"); in imx_sc_thermal_probe()
140 { .compatible = "fsl,imx-sc-thermal", },
149 .name = "imx-sc-thermal",
155 MODULE_AUTHOR("Anson Huang <Anson.Huang@nxp.com>");
156 MODULE_DESCRIPTION("Thermal driver for NXP i.MX SoCs with system controller");