Lines Matching refs:bgp
34 struct ti_bandgap *bgp; member
48 dev_dbg(data->bgp->dev, "updated thermal zone %s\n", in ti_thermal_work()
74 struct ti_bandgap *bgp; in __ti_thermal_get_temp() local
82 bgp = data->bgp; in __ti_thermal_get_temp()
83 s = &bgp->conf->sensors[data->sensor_id]; in __ti_thermal_get_temp()
85 ret = ti_bandgap_read_temperature(bgp, data->sensor_id, &tmp); in __ti_thermal_get_temp()
102 dev_err(bgp->dev, in __ti_thermal_get_temp()
117 struct ti_bandgap *bgp; in __ti_thermal_get_trend() local
120 bgp = data->bgp; in __ti_thermal_get_trend()
123 ret = ti_bandgap_get_trend(bgp, id, &tr); in __ti_thermal_get_trend()
143 *ti_thermal_build_data(struct ti_bandgap *bgp, int id) in ti_thermal_build_data() argument
147 data = devm_kzalloc(bgp->dev, sizeof(*data), GFP_KERNEL); in ti_thermal_build_data()
149 dev_err(bgp->dev, "kzalloc fail\n"); in ti_thermal_build_data()
153 data->bgp = bgp; in ti_thermal_build_data()
162 int ti_thermal_expose_sensor(struct ti_bandgap *bgp, int id, in ti_thermal_expose_sensor() argument
167 data = ti_bandgap_get_sensor_data(bgp, id); in ti_thermal_expose_sensor()
170 data = ti_thermal_build_data(bgp, id); in ti_thermal_expose_sensor()
176 data->ti_thermal = devm_thermal_of_zone_register(bgp->dev, id, in ti_thermal_expose_sensor()
179 dev_err(bgp->dev, "thermal zone device is NULL\n"); in ti_thermal_expose_sensor()
183 ti_bandgap_set_sensor_data(bgp, id, data); in ti_thermal_expose_sensor()
184 ti_bandgap_write_update_interval(bgp, data->sensor_id, in ti_thermal_expose_sensor()
187 devm_thermal_add_hwmon_sysfs(bgp->dev, data->ti_thermal); in ti_thermal_expose_sensor()
192 int ti_thermal_remove_sensor(struct ti_bandgap *bgp, int id) in ti_thermal_remove_sensor() argument
196 data = ti_bandgap_get_sensor_data(bgp, id); in ti_thermal_remove_sensor()
206 int ti_thermal_report_sensor_temperature(struct ti_bandgap *bgp, int id) in ti_thermal_report_sensor_temperature() argument
210 data = ti_bandgap_get_sensor_data(bgp, id); in ti_thermal_report_sensor_temperature()
217 int ti_thermal_register_cpu_cooling(struct ti_bandgap *bgp, int id) in ti_thermal_register_cpu_cooling() argument
220 struct device_node *np = bgp->dev->of_node; in ti_thermal_register_cpu_cooling()
230 data = ti_bandgap_get_sensor_data(bgp, id); in ti_thermal_register_cpu_cooling()
232 data = ti_thermal_build_data(bgp, id); in ti_thermal_register_cpu_cooling()
247 dev_err(bgp->dev, "Failed to register cpu cooling device %d\n", in ti_thermal_register_cpu_cooling()
253 ti_bandgap_set_sensor_data(bgp, id, data); in ti_thermal_register_cpu_cooling()
258 int ti_thermal_unregister_cpu_cooling(struct ti_bandgap *bgp, int id) in ti_thermal_unregister_cpu_cooling() argument
262 data = ti_bandgap_get_sensor_data(bgp, id); in ti_thermal_unregister_cpu_cooling()