unsigned long flags;
        unsigned mode;
 
+       pm_runtime_get_sync(ci->dev);
        spin_lock_irqsave(&ci->lock, flags);
        mode = hw_port_test_get(ci);
        spin_unlock_irqrestore(&ci->lock, flags);
+       pm_runtime_put_sync(ci->dev);
 
        seq_printf(s, "mode = %u\n", mode);
 
        if (sscanf(buf, "%u", &mode) != 1)
                return -EINVAL;
 
+       pm_runtime_get_sync(ci->dev);
        spin_lock_irqsave(&ci->lock, flags);
        ret = hw_port_test_set(ci, mode);
        spin_unlock_irqrestore(&ci->lock, flags);
+       pm_runtime_put_sync(ci->dev);
 
        return ret ? ret : count;
 }
        if (role == CI_ROLE_END || role == ci->role)
                return -EINVAL;
 
+       pm_runtime_get_sync(ci->dev);
        ci_role_stop(ci);
        ret = ci_role_start(ci, role);
+       pm_runtime_put_sync(ci->dev);
 
        return ret ? ret : count;
 }