MODULE_PARM_DESC(scan_rate, "Polling rate in times/sec. Default = 100");
struct hdm_i2c {
- bool is_open[NUM_CHANNELS];
bool polling_mode;
struct most_interface most_iface;
struct most_channel_capability capabilities[NUM_CHANNELS];
unsigned int delay, pr;
BUG_ON(ch_idx < 0 || ch_idx >= NUM_CHANNELS);
- BUG_ON(dev->is_open[ch_idx]);
if (channel_config->data_type != MOST_CH_CONTROL) {
pr_err("bad data type for channel %d\n", ch_idx);
pr_info("polling rate is %u Hz\n", pr);
}
}
- dev->is_open[ch_idx] = true;
return 0;
}
int ret;
BUG_ON(ch_idx < 0 || ch_idx >= NUM_CHANNELS);
- BUG_ON(!dev->is_open[ch_idx]);
if (ch_idx == CH_RX) {
/* RX */
struct mbo *mbo;
BUG_ON(ch_idx < 0 || ch_idx >= NUM_CHANNELS);
- BUG_ON(!dev->is_open[ch_idx]);
-
- dev->is_open[ch_idx] = false;
if (ch_idx == CH_RX) {
if (!dev->polling_mode)
do_rx_work(dev);
if (dev->polling_mode) {
- if (dev->is_open[CH_RX] && scan_rate)
+ if (scan_rate)
schedule_delayed_work(&dev->rx.dwork, dev->rx.delay);
} else {
dev->rx.int_disabled = false;
client->adapter->nr, client->addr);
for (i = 0; i < NUM_CHANNELS; i++) {
- dev->is_open[i] = false;
dev->capabilities[i].data_type = MOST_CH_CONTROL;
dev->capabilities[i].num_buffers_packet = MAX_BUFFERS_CONTROL;
dev->capabilities[i].buffer_size_packet = MAX_BUF_SIZE_CONTROL;