/* Toggles the MMC slots between open-drain and push-pull mode.  */
int menelaus_set_mmc_opendrain(int slot, int enable)
/* Toggles the MMC slots between open-drain and push-pull mode.  */
int menelaus_set_mmc_opendrain(int slot, int enable)
{
	int ret, val;
	if (slot != 1 && slot != 2)
		return -EINVAL;
	mutex_lock(&the_menelaus->lock);
	ret = menelaus_read_reg(MENELAUS_MCT_CTRL1);
	if (ret < 0) {
		mutex_unlock(&the_menelaus->lock);
		return ret;
	}
	val = ret;
	if (slot == 1) {
		if (enable)
			val |= 1 << 2;
		else
			val &= ~(1 << 2);
	} else {
		if (enable)
			val |= 1 << 3;
		else
			val &= ~(1 << 3);
	}
	ret = menelaus_write_reg(MENELAUS_MCT_CTRL1, val);
	mutex_unlock(&the_menelaus->lock);
	return ret;
}