Lines Matching refs:bgp

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