Lines Matching refs:cl
85 struct hsi_client *cl; member
105 struct hsi_client *cl; member
227 struct hsc_client_data *cl_data = hsi_client_drvdata(msg->cl); in hsc_rx_completed()
247 struct hsc_client_data *cl_data = hsi_client_drvdata(msg->cl); in hsc_tx_completed()
267 struct hsc_client_data *cl_data = hsi_client_drvdata(msg->cl); in hsc_break_req_destructor()
275 struct hsc_client_data *cl_data = hsi_client_drvdata(msg->cl); in hsc_break_received()
294 hsi_flush(msg->cl); in hsc_break_received()
295 ret = hsi_async_read(msg->cl, msg); in hsc_break_received()
300 static int hsc_break_request(struct hsi_client *cl) in hsc_break_request() argument
302 struct hsc_client_data *cl_data = hsi_client_drvdata(cl); in hsc_break_request()
317 ret = hsi_async_read(cl, msg); in hsc_break_request()
324 static int hsc_break_send(struct hsi_client *cl) in hsc_break_send() argument
335 ret = hsi_async_write(cl, msg); in hsc_break_send()
342 static int hsc_rx_set(struct hsi_client *cl, struct hsc_rx_config *rxc) in hsc_rx_set() argument
355 tmp = cl->rx_cfg; in hsc_rx_set()
356 cl->rx_cfg.mode = rxc->mode; in hsc_rx_set()
357 cl->rx_cfg.num_hw_channels = rxc->channels; in hsc_rx_set()
358 cl->rx_cfg.flow = rxc->flow; in hsc_rx_set()
359 ret = hsi_setup(cl); in hsc_rx_set()
361 cl->rx_cfg = tmp; in hsc_rx_set()
365 hsc_break_request(cl); in hsc_rx_set()
370 static inline void hsc_rx_get(struct hsi_client *cl, struct hsc_rx_config *rxc) in hsc_rx_get() argument
372 rxc->mode = cl->rx_cfg.mode; in hsc_rx_get()
373 rxc->channels = cl->rx_cfg.num_hw_channels; in hsc_rx_get()
374 rxc->flow = cl->rx_cfg.flow; in hsc_rx_get()
377 static int hsc_tx_set(struct hsi_client *cl, struct hsc_tx_config *txc) in hsc_tx_set() argument
390 tmp = cl->tx_cfg; in hsc_tx_set()
391 cl->tx_cfg.mode = txc->mode; in hsc_tx_set()
392 cl->tx_cfg.num_hw_channels = txc->channels; in hsc_tx_set()
393 cl->tx_cfg.speed = txc->speed; in hsc_tx_set()
394 cl->tx_cfg.arb_mode = txc->arb_mode; in hsc_tx_set()
395 ret = hsi_setup(cl); in hsc_tx_set()
397 cl->tx_cfg = tmp; in hsc_tx_set()
404 static inline void hsc_tx_get(struct hsi_client *cl, struct hsc_tx_config *txc) in hsc_tx_get() argument
406 txc->mode = cl->tx_cfg.mode; in hsc_tx_get()
407 txc->channels = cl->tx_cfg.num_hw_channels; in hsc_tx_get()
408 txc->speed = cl->tx_cfg.speed; in hsc_tx_get()
409 txc->arb_mode = cl->tx_cfg.arb_mode; in hsc_tx_get()
425 if (channel->ch >= channel->cl->rx_cfg.num_hw_channels) in hsc_read()
437 ret = hsi_async_read(channel->cl, msg); in hsc_read()
447 hsi_flush(channel->cl); in hsc_read()
482 if (channel->ch >= channel->cl->tx_cfg.num_hw_channels) in hsc_write()
498 ret = hsi_async_write(channel->cl, msg); in hsc_write()
506 hsi_flush(channel->cl); in hsc_write()
535 hsi_flush(channel->cl); in hsc_ioctl()
543 ret = hsi_start_tx(channel->cl); in hsc_ioctl()
547 ret = hsi_stop_tx(channel->cl); in hsc_ioctl()
553 return hsc_break_send(channel->cl); in hsc_ioctl()
557 return hsc_rx_set(channel->cl, &rxc); in hsc_ioctl()
559 hsc_rx_get(channel->cl, &rxc); in hsc_ioctl()
566 return hsc_tx_set(channel->cl, &txc); in hsc_ioctl()
568 hsc_tx_get(channel->cl, &txc); in hsc_ioctl()
584 hsi_flush(cl_data->cl); in __hsc_port_release()
585 hsi_release_port(cl_data->cl); in __hsc_port_release()
610 ret = hsi_claim_port(cl_data->cl, 0); in hsc_open()
613 hsi_setup(cl_data->cl); in hsc_open()
641 hsi_stop_tx(channel->cl); in hsc_release()
680 struct hsi_client *cl = to_hsi_client(dev); in hsc_probe() local
690 hsc_baseminor = HSC_BASEMINOR(hsi_id(cl), hsi_port_id(cl)); in hsc_probe()
706 hsi_client_set_drvdata(cl, cl_data); in hsc_probe()
709 cl_data->cl = cl; in hsc_probe()
713 channel->cl = cl; in hsc_probe()
735 struct hsi_client *cl = to_hsi_client(dev); in hsc_remove() local
736 struct hsc_client_data *cl_data = hsi_client_drvdata(cl); in hsc_remove()
741 hsi_client_set_drvdata(cl, NULL); in hsc_remove()