/* Checks if any input data on the given channel is available Checks RxAvail  */
static int portman_data_avail(struct portman *pm, int channel)
/* Checks if any input data on the given channel is available Checks RxAvail  */
static int portman_data_avail(struct portman *pm, int channel)
{
	int command = INT_EN;
	switch (channel) {
	case 0:
		command |= RXDATA0;
		break;
	case 1:
		command |= RXDATA1;
		break;
	}
	portman_write_command(pm, command);
	if ((portman_read_status(pm) & RXAVAIL) == RXAVAIL)
		return 1;
	return 0;
}