.. | .. |
---|
506 | 506 | usleep_range(2 * 1000, 3 * 1000); |
---|
507 | 507 | mutex_unlock(&s->power_lock); |
---|
508 | 508 | |
---|
509 | | - s->enable_reg_shadow = 0; |
---|
510 | | - |
---|
511 | 509 | //trigger temperature measurement |
---|
512 | 510 | papyrus_hw_setreg(s, PAPYRUS_ADDR_TMST1, 0x80); |
---|
513 | 511 | queue_delayed_work(s->tmp_monitor_wq, &s->tmp_delay_work, |
---|
.. | .. |
---|
582 | 580 | return stat; |
---|
583 | 581 | } |
---|
584 | 582 | |
---|
| 583 | + sess->tmp_monitor_wq = alloc_ordered_workqueue("%s", |
---|
| 584 | + WQ_MEM_RECLAIM | WQ_FREEZABLE, "tps-tmp-monitor-wq"); |
---|
| 585 | + INIT_DELAYED_WORK(&sess->tmp_delay_work, papyrus_tmp_work); |
---|
| 586 | + queue_delayed_work(sess->tmp_monitor_wq, &sess->tmp_delay_work, |
---|
| 587 | + msecs_to_jiffies(10000)); |
---|
| 588 | + |
---|
585 | 589 | stat = papyrus_hw_init(sess); |
---|
586 | 590 | if (stat) |
---|
587 | 591 | return stat; |
---|
.. | .. |
---|
603 | 607 | pmic->pmic_power_req = papyrus_hw_power_req; |
---|
604 | 608 | pmic->pmic_read_temperature = papyrus_hw_read_temperature; |
---|
605 | 609 | |
---|
606 | | - sess->tmp_monitor_wq = alloc_ordered_workqueue("%s", |
---|
607 | | - WQ_MEM_RECLAIM | WQ_FREEZABLE, "tps-tmp-monitor-wq"); |
---|
608 | | - INIT_DELAYED_WORK(&sess->tmp_delay_work, papyrus_tmp_work); |
---|
609 | | - |
---|
610 | | - queue_delayed_work(sess->tmp_monitor_wq, &sess->tmp_delay_work, |
---|
611 | | - msecs_to_jiffies(10000)); |
---|
612 | 610 | return 0; |
---|
613 | 611 | } |
---|
614 | 612 | |
---|
.. | .. |
---|
643 | 641 | |
---|
644 | 642 | static int tps65185_remove(struct i2c_client *client) |
---|
645 | 643 | { |
---|
646 | | - struct ebc_pmic *pmic = i2c_get_clientdata(client); |
---|
647 | | - struct papyrus_sess *sess = pmic->drvpar; |
---|
648 | | - |
---|
649 | | - if (sess->tmp_monitor_wq) |
---|
650 | | - destroy_workqueue(sess->tmp_monitor_wq); |
---|
651 | | - |
---|
652 | 644 | return 0; |
---|
653 | 645 | } |
---|
654 | 646 | |
---|