[lkml]   [2008]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH v2] thermal: Make it simpler to use the thermal layer inside the kernel
    On Wednesday 01 October 2008 08:41:11 pm Matthew Garrett wrote:
    > The thermal layer passes temperatures and trip point types around as
    > strings. This is fine for sysfs, but makes it hard to use them for other
    > purposes in-kernel. Move the string conversion to the sysfs-specific
    > code.
    I went through your very first version and I also like the string to
    int conversion very much.
    I wanted to move the polling from acpi/thermal.c to the new thermal
    layer to have the thermal polling in the architecture independent part
    and started on top of your first version, but I got stuck and run out of time,
    otherwise I'd also sent this.

    > struct thermal_cooling_device_ops {
    > - int (*get_max_state) (struct thermal_cooling_device *, char *);
    > - int (*get_cur_state) (struct thermal_cooling_device *, char *);
    > + int (*get_max_state) (struct thermal_cooling_device *, unsigned int *);
    > + int (*get_cur_state) (struct thermal_cooling_device *, unsigned int *);
    > int (*set_cur_state) (struct thermal_cooling_device *, unsigned int);
    > };
    Looks like you forgot the menlow driver again which also makes use of this:

    grep get_max_state drivers/misc/intel_menlow.c
    .get_max_state = memory_get_max_bandwidth,

    It would be great to see the conversion in .28.


     \ /
      Last update: 2008-10-03 19:11    [W:0.044 / U:14.128 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site