Lines Matching +full:n +full:- +full:factor
1 // SPDX-License-Identifier: GPL-2.0
15 int factor; member
28 t = sensor->read_mmio(sensor->mmio_base) & sensor->mask; in thermal_mmio_get_temperature()
29 t *= sensor->factor; in thermal_mmio_get_temperature()
49 sensor = devm_kzalloc(&pdev->dev, sizeof(*sensor), GFP_KERNEL); in thermal_mmio_probe()
51 return -ENOMEM; in thermal_mmio_probe()
53 sensor->mmio_base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); in thermal_mmio_probe()
54 if (IS_ERR(sensor->mmio_base)) in thermal_mmio_probe()
55 return PTR_ERR(sensor->mmio_base); in thermal_mmio_probe()
57 sensor_init_func = device_get_match_data(&pdev->dev); in thermal_mmio_probe()
61 dev_err(&pdev->dev, in thermal_mmio_probe()
62 "failed to initialize sensor (%d)\n", in thermal_mmio_probe()
68 thermal_zone = devm_thermal_of_zone_register(&pdev->dev, in thermal_mmio_probe()
73 dev_err(&pdev->dev, in thermal_mmio_probe()
74 "failed to register sensor (%ld)\n", in thermal_mmio_probe()
80 dev_info(&pdev->dev, in thermal_mmio_probe()
81 "thermal mmio sensor %s registered, current temperature: %d\n", in thermal_mmio_probe()
82 pdev->name, temperature); in thermal_mmio_probe()
90 sensor->read_mmio = thermal_mmio_readb; in al_thermal_init()
91 sensor->mask = 0xff; in al_thermal_init()
92 sensor->factor = 1000; in al_thermal_init()
98 { .compatible = "amazon,al-thermal", .data = al_thermal_init},
106 .name = "thermal-mmio",