Re: [PATCH V4] mmc: core: eMMC 4.5 Power Class Selection Feature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Girish,

On Fri, Sep 23 2011, Girish K S wrote:
> +	default:
> +		pr_warning("%s: Voltage range not supported "
> +			   "for power class.\n", mmc_hostname(host));
> +		break;
> +	}

I suggested replacing your BUG(); here with a return, but you just have
a break here.  Is having the function continue in this case intentional?

> +
> +	pwrclass_val = ext_csd[index];
> +
> +	if (bus_width & (EXT_CSD_BUS_WIDTH_8 | EXT_CSD_DDR_BUS_WIDTH_8))
> +		pwrclass_val = (pwrclass_val & EXT_CSD_PWR_CL_8BIT_MASK) >>
> +				EXT_CSD_PWR_CL_8BIT_SHIFT;
> +	else
> +		pwrclass_val = (pwrclass_val & EXT_CSD_PWR_CL_4BIT_MASK) >>
> +				EXT_CSD_PWR_CL_4BIT_SHIFT;
> +
> +	/* If the power class is different from the default value */
> +	if (pwrclass_val > 0) {
> +		err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
> +				 EXT_CSD_POWER_CLASS,
> +				 pwrclass_val,
> +				 0);
> +	}
> +
> +	return err;
> +}

Thanks,

- Chris.
-- 
Chris Ball   <cjb@xxxxxxxxxx>   <http://printf.net/>
One Laptop Per Child
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux