Re: [PATCHv4 12/15] vc: omap3: auto_ret / auto_off support

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

 



Tero Kristo <t-kristo@xxxxxx> writes:

> On Fri, 2011-12-09 at 12:13 -0800, Kevin Hilman wrote:
>> Tero Kristo <t-kristo@xxxxxx> writes:
>> 
>> > Voltage code will now enable / disable auto_ret / auto_off dynamically
>> > according to the voltagedomain usecounts. This is accomplished via
>> > the usage of the voltdm callback functions for sleep / wakeup.
>> >
>> > Signed-off-by: Tero Kristo <t-kristo@xxxxxx>
>> 
>> [...]
>> 
>> > -static void __init omap3_vc_init_channel(struct voltagedomain *voltdm)
>> > +static void omap3_set_core_off_timings(struct voltagedomain *voltdm)
>> >  {
>> > +	u32 tstart, tshut;
>> 
>> nit: insert blank line here
>
> Okay.
>
>> 
>> > +	omap_pm_get_oscillator(&tstart, &tshut);
>> > +	omap3_set_clksetup(tstart, voltdm);
>> >  	omap3_set_off_timings(voltdm);
>> >  }
>> >  
>> > +static void omap3_vc_channel_sleep(struct voltagedomain *voltdm)
>> > +{
>> > +	/* Set off timings if entering off */
>> > +	if (voltdm->target_state == PWRDM_POWER_OFF)
>> > +		omap3_set_off_timings(voltdm);
>> > +	else
>> > +		omap3_set_i2c_timings(voltdm, 0);
>> 
>> Comment probably applies more to patch 2 since that's where it was
>> introduced, but this is where I got confused, so mentioning it here:
>> 
>> Calling this 'set_i2c_timings' is a bit confusing IMO because reading
>> the code there is a choice between 'i2c' timings and 'off' timings.
>> Maybe just calling these 'ret' and 'off' timings will be better for
>> readability.
>
> Well, actually, you can use i2c timings when scaling voltage to off
> level also. You have following options for voltage scaling on omap3:
>
> - scale to ret level (0.975V) using i2c command
> - scale to off level (0.6V) using i2c command
> - switch to off (0V) using pmic scripts
>
> I was kind of trying to reflect this here, even though the pmic script
> support is missing.
>

OK, makes sense now.   Being more vebose in the changelog, or better,
having verbose kernel comments for the functions would help here.

Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux