RE: [PATCH 4/4] RFC Thermal: Platform layer changes to provide thermal data

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

 



Hi Eduardo,

> 
> Hello Rui,

I hope you meant Durga :-)

> 
> On Mon, Jun 11, 2012 at 11:09:34PM +0530, Durgadoss R wrote:
> > This patch shows how can we add platform specific thermal data
> > required by the enhanced thermal framework.
> > This is just an example patch, and _not_ for merge.
> 
> Nice! Thanks for sending an example. This makes things a lot easier.

Happy, that it is useful.
I initially thought of dropping it, but luckily did not :-)

[A big cut.]

> > +static int mrst_get_thermal_params(struct thermal_zone_device *tz)
> > +{
> > +	int i;
> > +
> > +	for (i = 0; i < MRST_THERMAL_ZONES; i++) {
> > +		if (!strcmp(tzp[i].thermal_zone_name, tz->type)) {
> > +			tz->tzp = &tzp[i];
> > +			return 0;
> > +		}
> > +	}
> 
> If you send the pdata while registering the zone, and store it in the zone data
> structures,
> you wont need to be iterating on all pdata array and matching strings.
> 

Even if we have this data coming while registering the zone, that platform
specific thermal driver has to fetch the data from a board specific file.
I understand that we can hard code things inside the platform thermal driver
file, but in most cases people use some standard thermal sensor chips
(for which drivers are available in Linux). So, these chips can be used on
different platforms, with different platform data.

So, I would prefer having this inside a platform specific file, and not hard code
inside any thermal driver.

> Besides, I suppose the pdata you are talking about it actually board specifics,
> right?

Yes. It is board specific, but as I mentioned above, the driver may be a generic one.

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


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux