Lines Matching defs:tsc

163 	const struct tegra_tsensor_channel *tsc = thermal_zone_device_priv(tz);
164 const struct tegra_tsensor *ts = tsc->ts;
172 err = readl_relaxed_poll_timeout(tsc->regs + TSENSOR_SENSOR0_STATUS0, val,
177 dev_err_once(ts->dev, "ch%u: counter invalid\n", tsc->id);
181 val = readl_relaxed(tsc->regs + TSENSOR_SENSOR0_TS_STATUS1);
190 dev_err_once(ts->dev, "ch%u: counter overflow\n", tsc->id);
221 const struct tegra_tsensor_channel *tsc = thermal_zone_device_priv(tz);
222 const struct tegra_tsensor *ts = tsc->ts;
232 val = readl_relaxed(tsc->regs + TSENSOR_SENSOR0_CONFIG1);
237 writel_relaxed(val, tsc->regs + TSENSOR_SENSOR0_CONFIG1);
251 const struct tegra_tsensor_channel *tsc = &ts->ch[id];
254 val = readl_relaxed(tsc->regs + TSENSOR_SENSOR0_STATUS0);
255 writel_relaxed(val, tsc->regs + TSENSOR_SENSOR0_STATUS0);
263 thermal_zone_device_update(tsc->tzd, THERMAL_EVENT_UNSPECIFIED);
283 const struct tegra_tsensor_channel *tsc = &ts->ch[id];
284 struct thermal_zone_device *tzd = tsc->tzd;
299 val = readl_relaxed(tsc->regs + TSENSOR_SENSOR0_CONFIG0);
301 writel_relaxed(val, tsc->regs + TSENSOR_SENSOR0_CONFIG0);
347 const struct tegra_tsensor_channel *tsc = &ts->ch[id];
348 struct thermal_zone_device *tzd = tsc->tzd;
353 val = readl_relaxed(tsc->regs + TSENSOR_SENSOR0_CONFIG0);
355 writel_relaxed(val, tsc->regs + TSENSOR_SENSOR0_CONFIG0);
369 val = readl_relaxed(tsc->regs + TSENSOR_SENSOR0_CONFIG1);
372 writel_relaxed(val, tsc->regs + TSENSOR_SENSOR0_CONFIG1);
375 val = readl_relaxed(tsc->regs + TSENSOR_SENSOR0_CONFIG2);
378 writel_relaxed(val, tsc->regs + TSENSOR_SENSOR0_CONFIG2);
394 val = readl_relaxed(tsc->regs + TSENSOR_SENSOR0_CONFIG0);
402 writel_relaxed(val, tsc->regs + TSENSOR_SENSOR0_CONFIG0);
505 struct tegra_tsensor_channel *tsc = &ts->ch[id];
508 tsc->ts = ts;
509 tsc->id = id;
510 tsc->regs = ts->regs + 0x40 * (hw_id + 1);
512 tsc->tzd = devm_thermal_of_zone_register(ts->dev, id, tsc, &ops);
513 if (IS_ERR(tsc->tzd)) {
514 if (PTR_ERR(tsc->tzd) != -ENODEV)
515 return dev_err_probe(ts->dev, PTR_ERR(tsc->tzd),
522 tsc->tzd = NULL;
526 devm_thermal_add_hwmon_sysfs(ts->dev, tsc->tzd);