Re: [Linux-Thermal-Daemon] Extending thermald to custom devices on embedded platform
by Rajagopal Aravindan
On Fri, Feb 26, 2016 at 11:44 PM, Pandruvada, Srinivas <
srinivas.pandruvada(a)intel.com> wrote:
> On Fri, 2016-02-26 at 11:41 +0530, Rajagopal Aravindan wrote:
> > Hello,
> >
> > I am looking at using thermald for an embedded platform.
> > Can someone please point me to where I can get answers for the below
> > ...
> > How to get the list of devices that are currently managed by thermald
> > (including those yet to be throttled), given that NO ACPI style xml
> > is used. ?
> If this is not a PC style device, then you need to create a config
> file.
> man thermal-conf.xml to see detail.
>
> Basically you need to understand:
> - What all the devices you want to manage for thermal conditions? Do
> you have a temperature sensor on that device or close the device? If
> yes how will you read temperature? Is there sysfs path to read the
> temperature?
> - What temperature you want to take action?
> - What are the operation you can do to influence the device to reduce
> temperature? Reduce performance or activate some device like a FAN or
> increase speed of a FAN. Do you have sysf entry to do this.
> For CPUs temperature it is little simple as you can use cpufreq to
> reduce performance, which is supported for most of the embedded procees
> sors also.
>
> Thanks,
> Srinivas
>
> > How to go about adding new devices to the list of currently managed
> > ones. Where to start from ?
> >
> > Thanks,
> > Rajagopal
> > _______________________________________________
> > Linux-Thermal-Daemon mailing list
> > Linux-Thermal-Daemon(a)lists.01.org
> > https://lists.01.org/mailman/listinfo/linux-thermal-daemon
Srinivas,
Following your above heads-up on this, I managed to gather the below
information regarding my task.
1. A SoC component needs to be thermally controlled.
2. Its sensor is exposed via sysfs, which is async capable, through
which its temperature can be read.
3. The temp threshold values have been provided to me.
4. I would be reducing that device's performance (passive), to bring
down its temperature.
5. There is NO sysfs entry for reducing the device's performance, it
will be using a proprietary method.
Given the above details, could you please confirm my below understanding ?
1. Temp sensing and triggering of action on threshold breach, will be
taken care of by existing thermald framework (sysfs).
2. For initiating the cooling action (passive) ..
1. I would have to write my own cooling device class, which extends
the thermald's cooling device class.
2. Create an object for it and add it to the global list of cooling
devices.
3. Implement the proprietary throttling logic in its *set_curr_state*
member function.
4. Put a *CoolingDevice* entry corresponding to the *SensorType*, as
found in sysfs.
5. The *type* inside *CoolingDevice* should match with what was
passed to *set_cdev_type*.
If there is a way to accomplish this without having to write a new class,
it would be helpful if you could please provide some pointers to that.
Thanks & Regards,
Rajagopal
6 years, 2 months