• Home
  • Raw
  • Download

Lines Matching refs:thermal

71 	struct da9062_thermal *thermal = container_of(work,  in da9062_thermal_poll_on()  local
79 ret = regmap_write(thermal->hw->regmap, in da9062_thermal_poll_on()
83 dev_err(thermal->dev, in da9062_thermal_poll_on()
92 ret = regmap_read(thermal->hw->regmap, in da9062_thermal_poll_on()
96 dev_err(thermal->dev, in da9062_thermal_poll_on()
102 mutex_lock(&thermal->lock); in da9062_thermal_poll_on()
103 thermal->temperature = DA9062_MILLI_CELSIUS(125); in da9062_thermal_poll_on()
104 mutex_unlock(&thermal->lock); in da9062_thermal_poll_on()
105 thermal_zone_device_update(thermal->zone, in da9062_thermal_poll_on()
108 delay = msecs_to_jiffies(thermal->zone->passive_delay); in da9062_thermal_poll_on()
109 queue_delayed_work(system_freezable_wq, &thermal->work, delay); in da9062_thermal_poll_on()
113 mutex_lock(&thermal->lock); in da9062_thermal_poll_on()
114 thermal->temperature = DA9062_MILLI_CELSIUS(0); in da9062_thermal_poll_on()
115 mutex_unlock(&thermal->lock); in da9062_thermal_poll_on()
116 thermal_zone_device_update(thermal->zone, in da9062_thermal_poll_on()
120 enable_irq(thermal->irq); in da9062_thermal_poll_on()
125 struct da9062_thermal *thermal = data; in da9062_thermal_irq_handler() local
127 disable_irq_nosync(thermal->irq); in da9062_thermal_irq_handler()
128 queue_delayed_work(system_freezable_wq, &thermal->work, 0); in da9062_thermal_irq_handler()
136 struct da9062_thermal *thermal = z->devdata; in da9062_thermal_get_mode() local
137 *mode = thermal->mode; in da9062_thermal_get_mode()
145 struct da9062_thermal *thermal = z->devdata; in da9062_thermal_get_trip_type() local
152 dev_err(thermal->dev, in da9062_thermal_get_trip_type()
164 struct da9062_thermal *thermal = z->devdata; in da9062_thermal_get_trip_temp() local
171 dev_err(thermal->dev, in da9062_thermal_get_trip_temp()
182 struct da9062_thermal *thermal = z->devdata; in da9062_thermal_get_temp() local
184 mutex_lock(&thermal->lock); in da9062_thermal_get_temp()
185 *temp = thermal->temperature; in da9062_thermal_get_temp()
186 mutex_unlock(&thermal->lock); in da9062_thermal_get_temp()
212 struct da9062_thermal *thermal; in da9062_thermal_probe() local
236 thermal = devm_kzalloc(&pdev->dev, sizeof(struct da9062_thermal), in da9062_thermal_probe()
238 if (!thermal) { in da9062_thermal_probe()
243 thermal->config = match->data; in da9062_thermal_probe()
244 thermal->hw = chip; in da9062_thermal_probe()
245 thermal->mode = THERMAL_DEVICE_ENABLED; in da9062_thermal_probe()
246 thermal->dev = &pdev->dev; in da9062_thermal_probe()
248 INIT_DELAYED_WORK(&thermal->work, da9062_thermal_poll_on); in da9062_thermal_probe()
249 mutex_init(&thermal->lock); in da9062_thermal_probe()
251 thermal->zone = thermal_zone_device_register(thermal->config->name, in da9062_thermal_probe()
252 1, 0, thermal, in da9062_thermal_probe()
255 if (IS_ERR(thermal->zone)) { in da9062_thermal_probe()
257 ret = PTR_ERR(thermal->zone); in da9062_thermal_probe()
263 thermal->zone->passive_delay); in da9062_thermal_probe()
270 thermal->irq = ret; in da9062_thermal_probe()
272 ret = request_threaded_irq(thermal->irq, NULL, in da9062_thermal_probe()
275 "THERMAL", thermal); in da9062_thermal_probe()
282 platform_set_drvdata(pdev, thermal); in da9062_thermal_probe()
286 thermal_zone_device_unregister(thermal->zone); in da9062_thermal_probe()
293 struct da9062_thermal *thermal = platform_get_drvdata(pdev); in da9062_thermal_remove() local
295 free_irq(thermal->irq, thermal); in da9062_thermal_remove()
296 cancel_delayed_work_sync(&thermal->work); in da9062_thermal_remove()
297 thermal_zone_device_unregister(thermal->zone); in da9062_thermal_remove()