Lines Matching refs:txc
390 static int hsc_tx_set(struct hsi_client *cl, struct hsc_tx_config *txc) in hsc_tx_set() argument
395 if ((txc->mode != HSI_MODE_STREAM) && (txc->mode != HSI_MODE_FRAME)) in hsc_tx_set()
397 if ((txc->channels == 0) || (txc->channels > HSC_DEVS)) in hsc_tx_set()
399 if (txc->channels & (txc->channels - 1)) in hsc_tx_set()
401 if ((txc->arb_mode != HSI_ARB_RR) && (txc->arb_mode != HSI_ARB_PRIO)) 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()
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()
543 struct hsc_tx_config txc; in hsc_ioctl() local
577 if (copy_from_user(&txc, (void __user *)arg, sizeof(txc))) in hsc_ioctl()
579 return hsc_tx_set(channel->cl, &txc); in hsc_ioctl()
581 hsc_tx_get(channel->cl, &txc); in hsc_ioctl()
582 if (copy_to_user((void __user *)arg, &txc, sizeof(txc))) in hsc_ioctl()