Lines Matching full:sensor
26 struct thermal_mmio *sensor = in thermal_mmio_get_temperature() local
29 t = sensor->read_mmio(sensor->mmio_base) & sensor->mask; in thermal_mmio_get_temperature()
30 t *= sensor->factor; in thermal_mmio_get_temperature()
44 struct thermal_mmio *sensor; in thermal_mmio_probe() local
46 struct thermal_mmio *sensor); in thermal_mmio_probe()
51 sensor = devm_kzalloc(&pdev->dev, sizeof(*sensor), GFP_KERNEL); in thermal_mmio_probe()
52 if (!sensor) in thermal_mmio_probe()
56 sensor->mmio_base = devm_ioremap_resource(&pdev->dev, resource); in thermal_mmio_probe()
57 if (IS_ERR(sensor->mmio_base)) in thermal_mmio_probe()
58 return PTR_ERR(sensor->mmio_base); in thermal_mmio_probe()
62 ret = sensor_init_func(pdev, sensor); in thermal_mmio_probe()
65 "failed to initialize sensor (%d)\n", in thermal_mmio_probe()
73 sensor, in thermal_mmio_probe()
77 "failed to register sensor (%ld)\n", in thermal_mmio_probe()
82 thermal_mmio_get_temperature(sensor, &temperature); in thermal_mmio_probe()
84 "thermal mmio sensor %s registered, current temperature: %d\n", in thermal_mmio_probe()
91 struct thermal_mmio *sensor) in al_thermal_init() argument
93 sensor->read_mmio = thermal_mmio_readb; in al_thermal_init()
94 sensor->mask = 0xff; in al_thermal_init()
95 sensor->factor = 1000; in al_thermal_init()