/* Write 0 to ask the device to soft reset, 1 to cold reset, 2 to bus reset (as defined by enum i2400m_reset_type).  */
static int debugfs_i2400m_reset_set(void *data, u64 val)
/* Write 0 to ask the device to soft reset, 1 to cold reset, 2 to bus reset (as defined by enum i2400m_reset_type).  */
static int debugfs_i2400m_reset_set(void *data, u64 val)
{
	int result;
	struct i2400m *i2400m = data;
	enum i2400m_reset_type rt = val;
	switch(rt) {
	case I2400M_RT_WARM:
	case I2400M_RT_COLD:
	case I2400M_RT_BUS:
		result = i2400m_reset(i2400m, rt);
		if (result >= 0)
			result = 0;
	default:
		result = -EINVAL;
	}
	return result;
}