.tx_cfg.speed = 200000, /* tx clock, kHz */
.tx_cfg.channels = 8,
.tx_cfg.mode = HSI_MODE_FRAME,
- .tx_cfg.arb_mode = HSI_ARB_RR,
- .rx_cfg.flow = HSI_FLOW_SYNC,
+ .tx_cfg.u.arb_mode = HSI_ARB_RR,
+ .rx_cfg.u.flow = HSI_FLOW_SYNC,
.rx_cfg.mode = HSI_MODE_FRAME,
.rx_cfg.channels = 8
},
.tx_cfg.speed = 100000, /* tx clock, kHz */
.tx_cfg.channels = 8,
.tx_cfg.mode = HSI_MODE_FRAME,
- .tx_cfg.arb_mode = HSI_ARB_RR,
- .rx_cfg.flow = HSI_FLOW_SYNC,
+ .tx_cfg.u.arb_mode = HSI_ARB_RR,
+ .rx_cfg.u.flow = HSI_FLOW_SYNC,
.rx_cfg.mode = HSI_MODE_FRAME,
.rx_cfg.channels = 8
}
.tx_cfg.speed = 200000, /* tx clock, kHz */
.tx_cfg.channels = 8,
.tx_cfg.mode = HSI_MODE_FRAME,
- .tx_cfg.arb_mode = HSI_ARB_RR,
- .rx_cfg.flow = HSI_FLOW_SYNC,
+ .tx_cfg.u.arb_mode = HSI_ARB_RR,
+ .rx_cfg.u.flow = HSI_FLOW_SYNC,
.rx_cfg.mode = HSI_MODE_FRAME,
.rx_cfg.channels = 8
},
.tx_cfg.speed = 100000, /* tx clock, kHz */
.tx_cfg.channels = 8,
.tx_cfg.mode = HSI_MODE_FRAME,
- .tx_cfg.arb_mode = HSI_ARB_RR,
- .rx_cfg.flow = HSI_FLOW_SYNC,
+ .tx_cfg.u.arb_mode = HSI_ARB_RR,
+ .rx_cfg.u.flow = HSI_FLOW_SYNC,
.rx_cfg.mode = HSI_MODE_FRAME,
.rx_cfg.channels = 8
}
.tx_cfg.speed = 200000, /* tx clock, kHz */
.tx_cfg.channels = 8,
.tx_cfg.mode = HSI_MODE_FRAME,
- .tx_cfg.arb_mode = HSI_ARB_RR,
- .rx_cfg.flow = HSI_FLOW_SYNC,
+ .tx_cfg.u.arb_mode = HSI_ARB_RR,
+ .rx_cfg.u.flow = HSI_FLOW_SYNC,
.rx_cfg.mode = HSI_MODE_FRAME,
.rx_cfg.channels = 8
},
.tx_cfg.speed = 100000, /* tx clock, kHz */
.tx_cfg.channels = 8,
.tx_cfg.mode = HSI_MODE_FRAME,
- .tx_cfg.arb_mode = HSI_ARB_RR,
- .rx_cfg.flow = HSI_FLOW_SYNC,
+ .tx_cfg.u.arb_mode = HSI_ARB_RR,
+ .rx_cfg.u.flow = HSI_FLOW_SYNC,
.rx_cfg.mode = HSI_MODE_FRAME,
.rx_cfg.channels = 8
}
.tx_cfg.speed = 100000, /* tx clock, kHz */
.tx_cfg.channels = 8,
.tx_cfg.mode = HSI_MODE_FRAME,
- .tx_cfg.arb_mode = HSI_ARB_RR,
- .rx_cfg.flow = HSI_FLOW_SYNC,
+ .tx_cfg.u.arb_mode = HSI_ARB_RR,
+ .rx_cfg.u.flow = HSI_FLOW_SYNC,
.rx_cfg.mode = HSI_MODE_FRAME,
.rx_cfg.channels = 8
}
.name = "client0",
.hsi_id = 0,
.port = 0,
- .tx_cfg = {
- .mode = HSI_MODE_FRAME,
- .channels = 8,
- .speed = 200000, /* 200 MHz */
- .arb_mode = HSI_ARB_RR,
- },
- .rx_cfg = {
- .mode = HSI_MODE_FRAME,
- .channels = 8,
- .speed = 200000, /* 200 MHz but used in tx */
- .flow = HSI_FLOW_PIPE,
- },
+ .tx_cfg.mode = HSI_MODE_FRAME,
+ .tx_cfg.channels = 8,
+ .tx_cfg.speed = 200000, /* 200 MHz */
+ .tx_cfg.u.arb_mode = HSI_ARB_RR,
+ .rx_cfg.mode = HSI_MODE_FRAME,
+ .rx_cfg.channels = 8,
+ .rx_cfg.speed = 200000, /* 200 MHz but used in tx */
+ .rx_cfg.u.flow = HSI_FLOW_PIPE,
},
[1] = {
.name = "client1",
.hsi_id = 0,
.port = 0,
- .tx_cfg = {
- .mode = HSI_MODE_FRAME,
- .channels = 8,
- .speed = 200000, /* 200 MHz */
- .arb_mode = HSI_ARB_RR,
- },
- .rx_cfg = {
- .mode = HSI_MODE_FRAME,
- .channels = 8,
- .speed = 200000, /* 200 MHz but used in tx */
- .flow = HSI_FLOW_PIPE,
- },
+ .tx_cfg.mode = HSI_MODE_FRAME,
+ .tx_cfg.channels = 8,
+ .tx_cfg.speed = 200000, /* 200 MHz */
+ .tx_cfg.u.arb_mode = HSI_ARB_RR,
+ .rx_cfg.mode = HSI_MODE_FRAME,
+ .rx_cfg.channels = 8,
+ .rx_cfg.speed = 200000, /* 200 MHz but used in tx */
+ .rx_cfg.u.flow = HSI_FLOW_PIPE,
},
[2] = {
.name = "client2",
.hsi_id = 0,
.port = 0,
- .tx_cfg = {
- .mode = HSI_MODE_FRAME,
- .channels = 8,
- .speed = 200000, /* 200 MHz */
- .arb_mode = HSI_ARB_RR,
- },
- .rx_cfg = {
- .mode = HSI_MODE_FRAME,
- .channels = 8,
- .speed = 200000, /* 200 MHz but used in tx */
- .flow = HSI_FLOW_PIPE,
- },
+ .tx_cfg.mode = HSI_MODE_FRAME,
+ .tx_cfg.channels = 8,
+ .tx_cfg.speed = 200000, /* 200 MHz */
+ .tx_cfg.u.arb_mode = HSI_ARB_RR,
+ .rx_cfg.mode = HSI_MODE_FRAME,
+ .rx_cfg.channels = 8,
+ .rx_cfg.speed = 200000, /* 200 MHz but used in tx */
+ .rx_cfg.u.flow = HSI_FLOW_PIPE,
},
[3] = {
.name = "client3",
.hsi_id = 0,
.port = 0,
- .tx_cfg = {
- .mode = HSI_MODE_FRAME,
- .channels = 8,
- .speed = 200000, /* 200 MHz */
- .arb_mode = HSI_ARB_RR,
- },
- .rx_cfg = {
- .mode = HSI_MODE_FRAME,
- .channels = 8,
- .speed = 200000, /* 200 MHz but used in tx */
- .flow = HSI_FLOW_PIPE,
- },
+ .tx_cfg.mode = HSI_MODE_FRAME,
+ .tx_cfg.channels = 8,
+ .tx_cfg.speed = 200000, /* 200 MHz */
+ .tx_cfg.u.arb_mode = HSI_ARB_RR,
+ .rx_cfg.mode = HSI_MODE_FRAME,
+ .rx_cfg.channels = 8,
+ .rx_cfg.speed = 200000, /* 200 MHz but used in tx */
+ .rx_cfg.u.flow = HSI_FLOW_PIPE,
},
[4] = {
.name = "hsi_flash",
.hsi_id = 0,
.port = 0,
- .tx_cfg = {
- .mode = HSI_MODE_FRAME,
- .channels = 1,
- .speed = 5000, /* 5 MHz */
- .arb_mode = HSI_ARB_RR,
- },
- .rx_cfg = {
- .mode = HSI_MODE_FRAME,
- .channels = 1,
- .speed = 0,
- .flow = HSI_FLOW_SYNC,
- },
+ .tx_cfg.mode = HSI_MODE_FRAME,
+ .tx_cfg.channels = 1,
+ .tx_cfg.speed = 5000, /* 5 MHz */
+ .tx_cfg.u.arb_mode = HSI_ARB_RR,
+ .rx_cfg.mode = HSI_MODE_FRAME,
+ .rx_cfg.channels = 1,
+ .rx_cfg.speed = 0,
+ .rx_cfg.u.flow = HSI_FLOW_SYNC,
},
};
case HSI_FLOW_SYNC:
case HSI_FLOW_PIPE:
spin_lock_irqsave(&ctx->tx.lock, flags);
- ctx->tx.config.flow = arg;
+ ctx->tx.config.u.flow = arg;
spin_unlock_irqrestore(&ctx->tx.lock, flags);
break;
default:
case FFL_TTY_GET_TX_FLOW:
spin_lock_irqsave(&ctx->tx.lock, flags);
- data = ctx->tx.config.flow;
+ data = ctx->tx.config.u.flow;
spin_unlock_irqrestore(&ctx->tx.lock, flags);
return put_user(data, (unsigned int __user *) arg);
break;
case HSI_FLOW_SYNC:
case HSI_FLOW_PIPE:
spin_lock_irqsave(&ctx->rx.lock, flags);
- ctx->client->rx_cfg.flow = arg;
+ ctx->client->rx_cfg.u.flow = arg;
spin_unlock_irqrestore(&ctx->rx.lock, flags);
break;
default:
case FFL_TTY_GET_RX_FLOW:
spin_lock_irqsave(&ctx->rx.lock, flags);
- data = ctx->rx.config.flow;
+ data = ctx->rx.config.u.flow;
spin_unlock_irqrestore(&ctx->rx.lock, flags);
return put_user(data, (unsigned int __user *) arg);
break;
case HSI_ARB_RR:
case HSI_ARB_PRIO:
spin_lock_irqsave(&ctx->tx.lock, flags);
- ctx->tx.config.arb_mode = arg;
+ ctx->tx.config.u.arb_mode = arg;
spin_unlock_irqrestore(&ctx->tx.lock, flags);
break;
default:
case FFL_TTY_GET_TX_ARB_MODE:
spin_lock_irqsave(&ctx->tx.lock, flags);
- data = ctx->tx.config.arb_mode;
+ data = ctx->tx.config.u.arb_mode;
spin_unlock_irqrestore(&ctx->tx.lock, flags);
return put_user(data, (unsigned int __user *) arg);
break;
intel_hsi->tx_speed = cl->tx_cfg.speed;
/* Compute the arbiter control register */
- arb_cfg = cl->tx_cfg.arb_mode;
+ arb_cfg = cl->tx_cfg.u.arb_mode;
/* Compute the RX timeout value (for inserting RX error) */
/* Compute the program, FIFO , DMA and interrupt registers */
prg_cfg = ARASAN_RX_TIMEOUT_CNT(rx_timeout) |
ARASAN_TX_MODE(cl->tx_cfg.mode) |
- ARASAN_RX_FLOW(cl->rx_cfg.flow) |
+ ARASAN_RX_FLOW(cl->rx_cfg.u.flow) |
ARASAN_RX_MODE(cl->rx_cfg.mode);
irq_cfg = ARASAN_IRQ_RX_WAKE;
err_cfg = ARASAN_IRQ_BREAK | ARASAN_IRQ_RX_ERROR;
u32 offset;
int (*func)(const struct v4l2_ioctl_ops *ops,
struct file *file, void *fh, void *p);
- };
+ } u;
void (*debug)(const void *arg, bool write_only);
};
.ioctl = _ioctl, \
.flags = _flags | INFO_FL_STD, \
.name = #_ioctl, \
- .offset = offsetof(struct v4l2_ioctl_ops, _vidioc), \
+ .u.offset = offsetof(struct v4l2_ioctl_ops, _vidioc), \
.debug = _debug, \
}
.ioctl = _ioctl, \
.flags = _flags | INFO_FL_FUNC, \
.name = #_ioctl, \
- .func = _func, \
+ .u.func = _func, \
.debug = _debug, \
}
if (info->flags & INFO_FL_STD) {
typedef int (*vidioc_op)(struct file *file, void *fh, void *p);
const void *p = vfd->ioctl_ops;
- const vidioc_op *vidioc = p + info->offset;
+ const vidioc_op *vidioc = p + info->u.offset;
ret = (*vidioc)(file, fh, arg);
} else if (info->flags & INFO_FL_FUNC) {
- ret = info->func(ops, file, fh, arg);
+ ret = info->u.func(ops, file, fh, arg);
} else if (!ops->vidioc_default) {
ret = -ENOTTY;
} else {
union {
unsigned int flow; /* RX only */
unsigned int arb_mode; /* TX only */
- };
+ } u;
};
/**