Lines Matching refs:zone
426 struct tegra_thermctl_zone *zone = data; in tegra_thermctl_get_temp() local
429 val = readl(zone->reg); in tegra_thermctl_get_temp()
430 val = REG_GET_MASK(val, zone->sg->sensor_temp_mask); in tegra_thermctl_get_temp()
587 struct tegra_thermctl_zone *zone = data; in tegra_thermctl_set_trip_temp() local
588 struct thermal_zone_device *tz = zone->tz; in tegra_thermctl_set_trip_temp()
589 struct tegra_soctherm *ts = zone->ts; in tegra_thermctl_set_trip_temp()
590 const struct tegra_tsensor_group *sg = zone->sg; in tegra_thermctl_set_trip_temp()
591 struct device *dev = zone->dev; in tegra_thermctl_set_trip_temp()
639 struct tegra_thermctl_zone *zone = data; in tegra_thermctl_get_trend() local
640 struct thermal_zone_device *tz = zone->tz; in tegra_thermctl_get_trend()
646 ret = tz->ops->get_trip_temp(zone->tz, trip, &trip_temp); in tegra_thermctl_get_trend()
693 struct tegra_thermctl_zone *zone = data; in tegra_thermctl_set_trips() local
696 thermal_irq_disable(zone); in tegra_thermctl_set_trips()
698 r = readl(zone->ts->regs + zone->sg->thermctl_lvl0_offset); in tegra_thermctl_set_trips()
700 writel(r, zone->ts->regs + zone->sg->thermctl_lvl0_offset); in tegra_thermctl_set_trips()
702 lo = enforce_temp_range(zone->dev, lo) / zone->ts->soc->thresh_grain; in tegra_thermctl_set_trips()
703 hi = enforce_temp_range(zone->dev, hi) / zone->ts->soc->thresh_grain; in tegra_thermctl_set_trips()
704 dev_dbg(zone->dev, "%s hi:%d, lo:%d\n", __func__, hi, lo); in tegra_thermctl_set_trips()
706 r = REG_SET_MASK(r, zone->sg->thermctl_lvl0_up_thresh_mask, hi); in tegra_thermctl_set_trips()
707 r = REG_SET_MASK(r, zone->sg->thermctl_lvl0_dn_thresh_mask, lo); in tegra_thermctl_set_trips()
709 writel(r, zone->ts->regs + zone->sg->thermctl_lvl0_offset); in tegra_thermctl_set_trips()
711 thermal_irq_enable(zone); in tegra_thermctl_set_trips()
2217 struct tegra_thermctl_zone *zone = in tegra_soctherm_probe() local
2218 devm_kzalloc(&pdev->dev, sizeof(*zone), GFP_KERNEL); in tegra_soctherm_probe()
2219 if (!zone) { in tegra_soctherm_probe()
2224 zone->reg = tegra->regs + soc->ttgs[i]->sensor_temp_offset; in tegra_soctherm_probe()
2225 zone->dev = &pdev->dev; in tegra_soctherm_probe()
2226 zone->sg = soc->ttgs[i]; in tegra_soctherm_probe()
2227 zone->ts = tegra; in tegra_soctherm_probe()
2230 soc->ttgs[i]->id, zone, in tegra_soctherm_probe()
2239 zone->tz = z; in tegra_soctherm_probe()