Lines Matching refs:cl

98 	struct hsi_client	*cl;  member
118 struct hsi_client *cl; member
240 struct hsc_client_data *cl_data = hsi_client_drvdata(msg->cl); in hsc_rx_completed()
260 struct hsc_client_data *cl_data = hsi_client_drvdata(msg->cl); in hsc_tx_completed()
280 struct hsc_client_data *cl_data = hsi_client_drvdata(msg->cl); in hsc_break_req_destructor()
288 struct hsc_client_data *cl_data = hsi_client_drvdata(msg->cl); in hsc_break_received()
307 hsi_flush(msg->cl); in hsc_break_received()
308 ret = hsi_async_read(msg->cl, msg); in hsc_break_received()
313 static int hsc_break_request(struct hsi_client *cl) in hsc_break_request() argument
315 struct hsc_client_data *cl_data = hsi_client_drvdata(cl); in hsc_break_request()
330 ret = hsi_async_read(cl, msg); in hsc_break_request()
337 static int hsc_break_send(struct hsi_client *cl) in hsc_break_send() argument
348 ret = hsi_async_write(cl, msg); in hsc_break_send()
355 static int hsc_rx_set(struct hsi_client *cl, struct hsc_rx_config *rxc) in hsc_rx_set() argument
368 tmp = cl->rx_cfg; in hsc_rx_set()
369 cl->rx_cfg.mode = rxc->mode; in hsc_rx_set()
370 cl->rx_cfg.num_hw_channels = rxc->channels; in hsc_rx_set()
371 cl->rx_cfg.flow = rxc->flow; in hsc_rx_set()
372 ret = hsi_setup(cl); in hsc_rx_set()
374 cl->rx_cfg = tmp; in hsc_rx_set()
378 hsc_break_request(cl); in hsc_rx_set()
383 static inline void hsc_rx_get(struct hsi_client *cl, struct hsc_rx_config *rxc) in hsc_rx_get() argument
385 rxc->mode = cl->rx_cfg.mode; in hsc_rx_get()
386 rxc->channels = cl->rx_cfg.num_hw_channels; in hsc_rx_get()
387 rxc->flow = cl->rx_cfg.flow; in hsc_rx_get()
390 static int hsc_tx_set(struct hsi_client *cl, struct hsc_tx_config *txc) in hsc_tx_set() argument
403 tmp = cl->tx_cfg; in hsc_tx_set()
404 cl->tx_cfg.mode = txc->mode; in hsc_tx_set()
405 cl->tx_cfg.num_hw_channels = txc->channels; in hsc_tx_set()
406 cl->tx_cfg.speed = txc->speed; in hsc_tx_set()
407 cl->tx_cfg.arb_mode = txc->arb_mode; in hsc_tx_set()
408 ret = hsi_setup(cl); in hsc_tx_set()
410 cl->tx_cfg = tmp; in hsc_tx_set()
417 static inline void hsc_tx_get(struct hsi_client *cl, struct hsc_tx_config *txc) in hsc_tx_get() argument
419 txc->mode = cl->tx_cfg.mode; in hsc_tx_get()
420 txc->channels = cl->tx_cfg.num_hw_channels; in hsc_tx_get()
421 txc->speed = cl->tx_cfg.speed; in hsc_tx_get()
422 txc->arb_mode = cl->tx_cfg.arb_mode; in hsc_tx_get()
438 if (channel->ch >= channel->cl->rx_cfg.num_hw_channels) in hsc_read()
450 ret = hsi_async_read(channel->cl, msg); in hsc_read()
460 hsi_flush(channel->cl); in hsc_read()
495 if (channel->ch >= channel->cl->tx_cfg.num_hw_channels) in hsc_write()
511 ret = hsi_async_write(channel->cl, msg); in hsc_write()
519 hsi_flush(channel->cl); in hsc_write()
548 hsi_flush(channel->cl); in hsc_ioctl()
556 ret = hsi_start_tx(channel->cl); in hsc_ioctl()
560 ret = hsi_stop_tx(channel->cl); in hsc_ioctl()
566 return hsc_break_send(channel->cl); in hsc_ioctl()
570 return hsc_rx_set(channel->cl, &rxc); in hsc_ioctl()
572 hsc_rx_get(channel->cl, &rxc); in hsc_ioctl()
579 return hsc_tx_set(channel->cl, &txc); in hsc_ioctl()
581 hsc_tx_get(channel->cl, &txc); in hsc_ioctl()
597 hsi_flush(cl_data->cl); in __hsc_port_release()
598 hsi_release_port(cl_data->cl); in __hsc_port_release()
623 ret = hsi_claim_port(cl_data->cl, 0); in hsc_open()
626 hsi_setup(cl_data->cl); in hsc_open()
654 hsi_stop_tx(channel->cl); in hsc_release()
693 struct hsi_client *cl = to_hsi_client(dev); in hsc_probe() local
704 hsc_baseminor = HSC_BASEMINOR(hsi_id(cl), hsi_port_id(cl)); in hsc_probe()
720 hsi_client_set_drvdata(cl, cl_data); in hsc_probe()
723 cl_data->cl = cl; in hsc_probe()
727 channel->cl = cl; in hsc_probe()
749 struct hsi_client *cl = to_hsi_client(dev); in hsc_remove() local
750 struct hsc_client_data *cl_data = hsi_client_drvdata(cl); in hsc_remove()
755 hsi_client_set_drvdata(cl, NULL); in hsc_remove()