Lines Matching refs:bgp

43 	struct ti_bandgap *bgp;  member
83 struct ti_bandgap *bgp; in __ti_thermal_get_temp() local
91 bgp = data->bgp; in __ti_thermal_get_temp()
92 s = &bgp->conf->sensors[data->sensor_id]; in __ti_thermal_get_temp()
94 ret = ti_bandgap_read_temperature(bgp, data->sensor_id, &tmp); in __ti_thermal_get_temp()
111 dev_err(bgp->dev, in __ti_thermal_get_temp()
187 struct ti_bandgap *bgp; in ti_thermal_set_mode() local
189 bgp = data->bgp; in ti_thermal_set_mode()
206 ti_bandgap_write_update_interval(bgp, data->sensor_id, in ti_thermal_set_mode()
245 struct ti_bandgap *bgp; in __ti_thermal_get_trend() local
248 bgp = data->bgp; in __ti_thermal_get_trend()
251 ret = ti_bandgap_get_trend(bgp, id, &tr); in __ti_thermal_get_trend()
307 *ti_thermal_build_data(struct ti_bandgap *bgp, int id) in ti_thermal_build_data() argument
311 data = devm_kzalloc(bgp->dev, sizeof(*data), GFP_KERNEL); in ti_thermal_build_data()
313 dev_err(bgp->dev, "kzalloc fail\n"); in ti_thermal_build_data()
317 data->bgp = bgp; in ti_thermal_build_data()
326 int ti_thermal_expose_sensor(struct ti_bandgap *bgp, int id, in ti_thermal_expose_sensor() argument
331 data = ti_bandgap_get_sensor_data(bgp, id); in ti_thermal_expose_sensor()
334 data = ti_thermal_build_data(bgp, id); in ti_thermal_expose_sensor()
340 data->ti_thermal = thermal_zone_of_sensor_register(bgp->dev, id, in ti_thermal_expose_sensor()
349 dev_err(bgp->dev, "thermal zone device is NULL\n"); in ti_thermal_expose_sensor()
355 ti_bandgap_set_sensor_data(bgp, id, data); in ti_thermal_expose_sensor()
356 ti_bandgap_write_update_interval(bgp, data->sensor_id, in ti_thermal_expose_sensor()
362 int ti_thermal_remove_sensor(struct ti_bandgap *bgp, int id) in ti_thermal_remove_sensor() argument
366 data = ti_bandgap_get_sensor_data(bgp, id); in ti_thermal_remove_sensor()
372 thermal_zone_of_sensor_unregister(bgp->dev, in ti_thermal_remove_sensor()
379 int ti_thermal_report_sensor_temperature(struct ti_bandgap *bgp, int id) in ti_thermal_report_sensor_temperature() argument
383 data = ti_bandgap_get_sensor_data(bgp, id); in ti_thermal_report_sensor_temperature()
390 int ti_thermal_register_cpu_cooling(struct ti_bandgap *bgp, int id) in ti_thermal_register_cpu_cooling() argument
393 struct device_node *np = bgp->dev->of_node; in ti_thermal_register_cpu_cooling()
403 data = ti_bandgap_get_sensor_data(bgp, id); in ti_thermal_register_cpu_cooling()
405 data = ti_thermal_build_data(bgp, id); in ti_thermal_register_cpu_cooling()
416 dev_err(bgp->dev, in ti_thermal_register_cpu_cooling()
422 ti_bandgap_set_sensor_data(bgp, id, data); in ti_thermal_register_cpu_cooling()
427 int ti_thermal_unregister_cpu_cooling(struct ti_bandgap *bgp, int id) in ti_thermal_unregister_cpu_cooling() argument
431 data = ti_bandgap_get_sensor_data(bgp, id); in ti_thermal_unregister_cpu_cooling()