Lines Matching defs:psc
53 struct sc16is7xx_sc *psc = sc->psc;
56 mutex_enter(&psc->sc_thread_mutex);
58 if (psc->sc_thread_state != SC16IS7XX_THREAD_GPIO &&
59 psc->sc_thread_state != SC16IS7XX_THREAD_RUNNING &&
60 psc->sc_thread_state != SC16IS7XX_THREAD_EXIT &&
61 psc->sc_de_count == 0) {
62 if (psc->sc_thread_state == SC16IS7XX_THREAD_STOPPED)
64 sc16is7xx_thread, psc, &psc->sc_thread, "%s", device_xname(psc->sc_dev));
66 aprint_error_dev(psc->sc_dev,
70 psc->sc_thread_state = SC16IS7XX_THREAD_RUNNING;
71 cv_signal(&psc->sc_threadvar);
75 psc->sc_de_count++;
77 KASSERTMSG(psc->sc_de_count >= 0 && psc->sc_de_count <= 2,
78 "Disable / Enable count out of bounds: %d\n", psc->sc_de_count);
82 mutex_exit(&psc->sc_thread_mutex);
91 struct sc16is7xx_sc *psc = sc->psc;
93 mutex_enter(&psc->sc_thread_mutex);
95 psc->sc_de_count--;
97 KASSERTMSG(psc->sc_de_count >= 0 && psc->sc_de_count <= 2,
98 "Disable / Enable count out of bounds: %d\n", psc->sc_de_count);
100 if (psc->sc_thread_state != SC16IS7XX_THREAD_GPIO &&
101 psc->sc_thread_state != SC16IS7XX_THREAD_PAUSED &&
102 psc->sc_thread_state != SC16IS7XX_THREAD_EXIT &&
103 psc->sc_de_count == 0) {
104 psc->sc_thread_state = SC16IS7XX_THREAD_PAUSED;
105 cv_signal(&psc->sc_threadvar);
108 mutex_exit(&psc->sc_thread_mutex);
123 struct sc16is7xx_sc *psc = device_private(parent);
126 sc->psc = psc;
133 sc->sc_com.sc_regs.cr_read = psc->sc_com_funcs->com_read_1;
134 sc->sc_com.sc_regs.cr_write = psc->sc_com_funcs->com_write_1;
135 sc->sc_com.sc_regs.cr_write_multi = psc->sc_com_funcs->com_write_multi_1;
141 psc->sc_funcs->copy_handles(psc, &sc->sc_com.sc_regs);
149 sc->sc_com.sc_frequency = psc->sc_frequency;