[PATCH v5 3/3] OMAP2+: voltage: add check for missing PMIC info in vp init

Kevin Hilman khilman at ti.com
Fri Sep 30 17:10:19 EDT 2011


Abhilash K V <abhilash.kv at ti.com> writes:

> From: Abhilash K V <abhilash.kv at ti.com>
>
> If PMIC info is not available in omap_vp_init(), abort.
>
> Signed-off-by: Abhilash K V <abhilash.kv at ti.com>

Looks good.

After minor fixup below, adding to the next round of voltage cleanups
(branch: for_3.2/voltage-cleanup-2.)

> ---
>  arch/arm/mach-omap2/vp.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c
> index 66bd700..0ed3d13 100644
> --- a/arch/arm/mach-omap2/vp.c
> +++ b/arch/arm/mach-omap2/vp.c
> @@ -41,6 +41,13 @@ void __init omap_vp_init(struct voltagedomain *voltdm)
>  	u32 val, sys_clk_rate, timeout, waittime;
>  	u32 vddmin, vddmax, vstepmin, vstepmax;
>  
> +	if (!voltdm->pmic || !voltdm->pmic->uv_to_vsel) {
> +		pr_err("%s: PMIC info requried to configure VP for "
> +			"vdd_%s not populated.Hence cannot initialize VP\n",

Added space after '.'

Thanks,

Kevin

> +			__func__, voltdm->name);
> +		return;
> +	}
> +
>  	if (!voltdm->read || !voltdm->write) {
>  		pr_err("%s: No read/write API for accessing vdd_%s regs\n",
>  			__func__, voltdm->name);




More information about the linux-arm-kernel mailing list