diff mbox

[12/13] Thermal: Add documentation for platform layer data

Message ID 1344516365-7230-13-git-send-email-durgadoss.r@intel.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

durgadoss.r@intel.com Aug. 9, 2012, 12:46 p.m. UTC
This patch adds documentation for the structure
thermal_zone_params, and also shows an example of
how to populate them.

Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
---
 Documentation/thermal/sysfs-api.txt |   30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

Comments

Eduardo Valentin Aug. 21, 2012, 5:38 a.m. UTC | #1
hello,

On Thu, Aug 09, 2012 at 06:16:04PM +0530, Durgadoss R wrote:
> This patch adds documentation for the structure
> thermal_zone_params, and also shows an example of
> how to populate them.

Just a reminder, I believe you should also expose some documentation about
the new functions exported in this series.

> 
> Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
> ---
>  Documentation/thermal/sysfs-api.txt |   30 ++++++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
> 
> diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt
> index ca1a1a3..669720c 100644
> --- a/Documentation/thermal/sysfs-api.txt
> +++ b/Documentation/thermal/sysfs-api.txt
> @@ -112,6 +112,36 @@ temperature) and throttle appropriate devices.
>      trip: indicates which trip point the cooling devices is associated with
>  	  in this thermal zone.
>  
> +1.4 Thermal Zone Parameters
> +1.4.1 struct thermal_zone_params
> +    This structure defines the platform level parameters for a thermal zone.
> +    This data, for each thermal zone should come from the platform layer.
> +    This is an optional feature where some platforms can choose not to
> +    provide this data.
> +1.4.2 struct thermal_zone_params attributes
> +    .thermal_zone_name: Name of the thermal zone, for which these parameters
> +			are being defined.
> +    .num_cdevs: Number of cooling devices associated with this
> +			  thermal zone.
> +    .cdevs_name: Names of the cooling devices associated with this
> +			   thermal zone.
> +    .weights: This parameter defines the 'influence' of a particular cooling
> +	      device on this thermal zone, on a percentage scale. The sum of
> +	      all these weights cannot exceed 100. The order of values in
> +	      this array should match with that of the cdevs_name.
> +    .trip_mask: This is a bit mask that gives the binding relation between
> +		this thermal zone and cdev, for a particular trip point.
> +		If nth bit is set, then the cdev and thermal zone are bound
> +		for trip point n.
> +1.4.3 An example thermal_zone_params structure
> +	struct thermal_zone_params tzp = {
> +                .thermal_zone_name = "CPU",
> +                .num_cdevs = 2,
> +                .cdevs_name = {"CPU", "Memory"},
> +                .weights = {70, 30},
> +		.trip_mask = {0x0F, 0x08},
> +        };
> +
>  2. sysfs attributes structure
>  
>  RO	read only value
> -- 
> 1.7.9.5
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
durgadoss.r@intel.com Aug. 21, 2012, 5:51 a.m. UTC | #2
> -----Original Message-----
> From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi-
> owner@vger.kernel.org] On Behalf Of Eduardo Valentin
> Sent: Tuesday, August 21, 2012 11:09 AM
> To: R, Durgadoss
> Cc: lenb@kernel.org; Zhang, Rui; rjw@sisk.pl; linux-acpi@vger.kernel.org;
> linux-pm@vger.kernel.org; eduardo.valentin@ti.com;
> amit.kachhap@linaro.org; wni@nvidia.com
> Subject: Re: [PATCH 12/13] Thermal: Add documentation for platform layer
> data
> 
> hello,
> 
> On Thu, Aug 09, 2012 at 06:16:04PM +0530, Durgadoss R wrote:
> > This patch adds documentation for the structure
> > thermal_zone_params, and also shows an example of
> > how to populate them.
> 
> Just a reminder, I believe you should also expose some documentation
> about
> the new functions exported in this series.

Thanks for the catch :-)
Will add in v2.
> 
> >
> > Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
> > ---
> >  Documentation/thermal/sysfs-api.txt |   30
> ++++++++++++++++++++++++++++++
> >  1 file changed, 30 insertions(+)
> >
> > diff --git a/Documentation/thermal/sysfs-api.txt
> b/Documentation/thermal/sysfs-api.txt
> > index ca1a1a3..669720c 100644
> > --- a/Documentation/thermal/sysfs-api.txt
> > +++ b/Documentation/thermal/sysfs-api.txt
> > @@ -112,6 +112,36 @@ temperature) and throttle appropriate devices.
> >      trip: indicates which trip point the cooling devices is associated with
> >  	  in this thermal zone.
> >
> > +1.4 Thermal Zone Parameters
> > +1.4.1 struct thermal_zone_params
> > +    This structure defines the platform level parameters for a thermal zone.
> > +    This data, for each thermal zone should come from the platform layer.
> > +    This is an optional feature where some platforms can choose not to
> > +    provide this data.
> > +1.4.2 struct thermal_zone_params attributes
> > +    .thermal_zone_name: Name of the thermal zone, for which these
> parameters
> > +			are being defined.
> > +    .num_cdevs: Number of cooling devices associated with this
> > +			  thermal zone.
> > +    .cdevs_name: Names of the cooling devices associated with this
> > +			   thermal zone.
> > +    .weights: This parameter defines the 'influence' of a particular cooling
> > +	      device on this thermal zone, on a percentage scale. The sum of
> > +	      all these weights cannot exceed 100. The order of values in
> > +	      this array should match with that of the cdevs_name.
> > +    .trip_mask: This is a bit mask that gives the binding relation between
> > +		this thermal zone and cdev, for a particular trip point.
> > +		If nth bit is set, then the cdev and thermal zone are bound
> > +		for trip point n.
> > +1.4.3 An example thermal_zone_params structure
> > +	struct thermal_zone_params tzp = {
> > +                .thermal_zone_name = "CPU",
> > +                .num_cdevs = 2,
> > +                .cdevs_name = {"CPU", "Memory"},
> > +                .weights = {70, 30},
> > +		.trip_mask = {0x0F, 0x08},
> > +        };
> > +
> >  2. sysfs attributes structure
> >
> >  RO	read only value
> > --
> > 1.7.9.5
> >
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt
index ca1a1a3..669720c 100644
--- a/Documentation/thermal/sysfs-api.txt
+++ b/Documentation/thermal/sysfs-api.txt
@@ -112,6 +112,36 @@  temperature) and throttle appropriate devices.
     trip: indicates which trip point the cooling devices is associated with
 	  in this thermal zone.
 
+1.4 Thermal Zone Parameters
+1.4.1 struct thermal_zone_params
+    This structure defines the platform level parameters for a thermal zone.
+    This data, for each thermal zone should come from the platform layer.
+    This is an optional feature where some platforms can choose not to
+    provide this data.
+1.4.2 struct thermal_zone_params attributes
+    .thermal_zone_name: Name of the thermal zone, for which these parameters
+			are being defined.
+    .num_cdevs: Number of cooling devices associated with this
+			  thermal zone.
+    .cdevs_name: Names of the cooling devices associated with this
+			   thermal zone.
+    .weights: This parameter defines the 'influence' of a particular cooling
+	      device on this thermal zone, on a percentage scale. The sum of
+	      all these weights cannot exceed 100. The order of values in
+	      this array should match with that of the cdevs_name.
+    .trip_mask: This is a bit mask that gives the binding relation between
+		this thermal zone and cdev, for a particular trip point.
+		If nth bit is set, then the cdev and thermal zone are bound
+		for trip point n.
+1.4.3 An example thermal_zone_params structure
+	struct thermal_zone_params tzp = {
+                .thermal_zone_name = "CPU",
+                .num_cdevs = 2,
+                .cdevs_name = {"CPU", "Memory"},
+                .weights = {70, 30},
+		.trip_mask = {0x0F, 0x08},
+        };
+
 2. sysfs attributes structure
 
 RO	read only value