On Mon, 13 Jun 2011 10:14:04 -0700, Guenter Roeck wrote: > Hi Durga, > > On Sat, Jun 11, 2011 at 07:28:43AM -0400, Durgadoss R wrote: > > This patch adds the core and pkg support to coretemp. > > These thresholds can be configured via the sysfs interfaces tempX_max > > and tempX_max_hyst. An interrupt is generated when CPU temperature reaches > > or crosses above tempX_max OR drops below tempX_max_hyst. > > > > This patch is based on the documentation in IA Manual vol 3A, that can be > > downloaded from here: > > http://download.intel.com/design/processor/manuals/253668.pdf > > > > Signed-off-by: Durgadoss R <durgadoss.r@xxxxxxxxx> > > [ ... ] > > > + size_t count) = { NULL, NULL, NULL, NULL, NULL, > > + store_ttarget, store_tmin }; > > + static const char *names[TOTAL_ATTRS] = { > > "temp%d_label", "temp%d_crit_alarm", > > - "temp%d_max", "temp%d_input", > > - "temp%d_crit" }; > > + "temp%d_imput", "temp%d_crit", > > s/imput/input/ > > Seems like we need another round of detailed testing ... > > > + "temp%d_max_alarm", "temp%d_max", > > + "temp%d_max_hyst" }; > > > > - for (i = 0; i < MAX_ATTRS; i++) { > > + for (i = 0; i < tdata->attr_size; i++) { > > snprintf(tdata->attr_name[i], CORETEMP_NAME_LENGTH, names[i], > > attr_no); > > sysfs_attr_init(&tdata->sd_attrs[i].dev_attr.attr); > > tdata->sd_attrs[i].dev_attr.attr.name = tdata->attr_name[i]; > > tdata->sd_attrs[i].dev_attr.attr.mode = S_IRUGO; > > + if (rw_ptr[i]) > > + tdata->sd_attrs[i].dev_attr.attr.mode |= S_IWUSR; > > tdata->sd_attrs[i].dev_attr.show = rd_ptr[i]; > > - tdata->sd_attrs[i].dev_attr.store = NULL; > > + tdata->sd_attrs[i].dev_attr.store = rw_ptr[i]; > > Since you check for rw_ptr above anyway, you might as well move this assignment > into the if branch above. The NULL assignment is not necessary anyway, since the > entire structure is pre-initialized from kzalloc(). Durgadoss, any progress on this? I also have coretemp patches pending, I was originally waiting for yours to go in first, to avoid conflicts, but I don't want to wait too long either... -- Jean Delvare _______________________________________________ lm-sensors mailing list lm-sensors@xxxxxxxxxxxxxx http://lists.lm-sensors.org/mailman/listinfo/lm-sensors