Subject: Re: Making a common API for cpu frequency drivers
To: Jason Thorpe <thorpej@shagadelic.org>
From: Juan RP <juan@xtrarom.org>
List: tech-kern
Date: 09/01/2006 19:36:42
On Fri, 1 Sep 2006 09:19:16 -0700
Jason Thorpe <thorpej@shagadelic.org> wrote:
>
> On Sep 1, 2006, at 3:29 AM, Quentin Garnier wrote:
>
> > In any case, a prop_array of prop_number seems fitting to me.
>
> I would suggest wrapping the array inside a properties dictionary, so
> instead of just registering:
>
> <array>
> <integer>1300</integer>
> <integer>1800</integer>
> <integer>2000</integer>
> <integer>2200</integer>
> </array>
>
> ...instead have something like:
>
> <dict>
> <key>cpu-supported-clock-frequencies</key>
> <array>
> <integer>1300</integer>
> <integer>1800</integer>
> <integer>2000</integer>
> <integer>2200</integer>
> </array>
> </dict>
>
> That makes it more extensible if you find you need to add more
> properties later.
>
> In fact, I would suggest registering the frequency array as a property
> in the device_properties() dictionary corresponding to that CPU's
> device_t ... that way these properties can be visible via generic "get
> device properties" calls, as well. sysmon can simply fetch the array
> from there.
True, I've been looking at device_properties() hours ago... and clearly
you show me the correct way to go, thanks.
> Please make sure the dictionary key names have meaningful namespace
> prefixes to them.
>
> Glad someone is taking in interest in cleaning this all up! Yay
> sysmon! Yay proplib! :-)
Oh yeah, it's really powerful.