linux/drivers/hwmon/emc2103.c
<<
>>
Prefs
   1/*
   2 * emc2103.c - Support for SMSC EMC2103
   3 * Copyright (c) 2010 SMSC
   4 *
   5 * This program is free software; you can redistribute it and/or modify
   6 * it under the terms of the GNU General Public License as published by
   7 * the Free Software Foundation; either version 2 of the License, or
   8 * (at your option) any later version.
   9 *
  10 * This program is distributed in the hope that it will be useful,
  11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13 * GNU General Public License for more details.
  14 *
  15 * You should have received a copy of the GNU General Public License
  16 * along with this program; if not, write to the Free Software
  17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18 */
  19
  20#include <linux/module.h>
  21#include <linux/init.h>
  22#include <linux/slab.h>
  23#include <linux/jiffies.h>
  24#include <linux/i2c.h>
  25#include <linux/hwmon.h>
  26#include <linux/hwmon-sysfs.h>
  27#include <linux/err.h>
  28#include <linux/mutex.h>
  29
  30/* Addresses scanned */
  31static const unsigned short normal_i2c[] = { 0x2E, I2C_CLIENT_END };
  32
  33static const u8 REG_TEMP[4] = { 0x00, 0x02, 0x04, 0x06 };
  34static const u8 REG_TEMP_MIN[4] = { 0x3c, 0x38, 0x39, 0x3a };
  35static const u8 REG_TEMP_MAX[4] = { 0x34, 0x30, 0x31, 0x32 };
  36
  37#define REG_CONF1               0x20
  38#define REG_TEMP_MAX_ALARM      0x24
  39#define REG_TEMP_MIN_ALARM      0x25
  40#define REG_FAN_CONF1           0x42
  41#define REG_FAN_TARGET_LO       0x4c
  42#define REG_FAN_TARGET_HI       0x4d
  43#define REG_FAN_TACH_HI         0x4e
  44#define REG_FAN_TACH_LO         0x4f
  45#define REG_PRODUCT_ID          0xfd
  46#define REG_MFG_ID              0xfe
  47
  48/* equation 4 from datasheet: rpm = (3932160 * multipler) / count */
  49#define FAN_RPM_FACTOR          3932160
  50
  51/*
  52 * 2103-2 and 2103-4's 3rd temperature sensor can be connected to two diodes
  53 * in anti-parallel mode, and in this configuration both can be read
  54 * independently (so we have 4 temperature inputs).  The device can't
  55 * detect if it's connected in this mode, so we have to manually enable
  56 * it.  Default is to leave the device in the state it's already in (-1).
  57 * This parameter allows APD mode to be optionally forced on or off
  58 */
  59static int apd = -1;
  60module_param(apd, bint, 0);
  61MODULE_PARM_DESC(init, "Set to zero to disable anti-parallel diode mode");
  62
  63struct temperature {
  64        s8      degrees;
  65        u8      fraction;       /* 0-7 multiples of 0.125 */
  66};
  67
  68struct emc2103_data {
  69        struct device           *hwmon_dev;
  70        struct mutex            update_lock;
  71        bool                    valid;          /* registers are valid */
  72        bool                    fan_rpm_control;
  73        int                     temp_count;     /* num of temp sensors */
  74        unsigned long           last_updated;   /* in jiffies */
  75        struct temperature      temp[4];        /* internal + 3 external */
  76        s8                      temp_min[4];    /* no fractional part */
  77        s8                      temp_max[4];    /* no fractional part */
  78        u8                      temp_min_alarm;
  79        u8                      temp_max_alarm;
  80        u8                      fan_multiplier;
  81        u16                     fan_tach;
  82        u16                     fan_target;
  83};
  84
  85static int read_u8_from_i2c(struct i2c_client *client, u8 i2c_reg, u8 *output)
  86{
  87        int status = i2c_smbus_read_byte_data(client, i2c_reg);
  88        if (status < 0) {
  89                dev_warn(&client->dev, "reg 0x%02x, err %d\n",
  90                        i2c_reg, status);
  91        } else {
  92                *output = status;
  93        }
  94        return status;
  95}
  96
  97static void read_temp_from_i2c(struct i2c_client *client, u8 i2c_reg,
  98                               struct temperature *temp)
  99{
 100        u8 degrees, fractional;
 101
 102        if (read_u8_from_i2c(client, i2c_reg, &degrees) < 0)
 103                return;
 104
 105        if (read_u8_from_i2c(client, i2c_reg + 1, &fractional) < 0)
 106                return;
 107
 108        temp->degrees = degrees;
 109        temp->fraction = (fractional & 0xe0) >> 5;
 110}
 111
 112static void read_fan_from_i2c(struct i2c_client *client, u16 *output,
 113                              u8 hi_addr, u8 lo_addr)
 114{
 115        u8 high_byte, lo_byte;
 116
 117        if (read_u8_from_i2c(client, hi_addr, &high_byte) < 0)
 118                return;
 119
 120        if (read_u8_from_i2c(client, lo_addr, &lo_byte) < 0)
 121                return;
 122
 123        *output = ((u16)high_byte << 5) | (lo_byte >> 3);
 124}
 125
 126static void write_fan_target_to_i2c(struct i2c_client *client, u16 new_target)
 127{
 128        u8 high_byte = (new_target & 0x1fe0) >> 5;
 129        u8 low_byte = (new_target & 0x001f) << 3;
 130        i2c_smbus_write_byte_data(client, REG_FAN_TARGET_LO, low_byte);
 131        i2c_smbus_write_byte_data(client, REG_FAN_TARGET_HI, high_byte);
 132}
 133
 134static void read_fan_config_from_i2c(struct i2c_client *client)
 135
 136{
 137        struct emc2103_data *data = i2c_get_clientdata(client);
 138        u8 conf1;
 139
 140        if (read_u8_from_i2c(client, REG_FAN_CONF1, &conf1) < 0)
 141                return;
 142
 143        data->fan_multiplier = 1 << ((conf1 & 0x60) >> 5);
 144        data->fan_rpm_control = (conf1 & 0x80) != 0;
 145}
 146
 147static struct emc2103_data *emc2103_update_device(struct device *dev)
 148{
 149        struct i2c_client *client = to_i2c_client(dev);
 150        struct emc2103_data *data = i2c_get_clientdata(client);
 151
 152        mutex_lock(&data->update_lock);
 153
 154        if (time_after(jiffies, data->last_updated + HZ + HZ / 2)
 155            || !data->valid) {
 156                int i;
 157
 158                for (i = 0; i < data->temp_count; i++) {
 159                        read_temp_from_i2c(client, REG_TEMP[i], &data->temp[i]);
 160                        read_u8_from_i2c(client, REG_TEMP_MIN[i],
 161                                &data->temp_min[i]);
 162                        read_u8_from_i2c(client, REG_TEMP_MAX[i],
 163                                &data->temp_max[i]);
 164                }
 165
 166                read_u8_from_i2c(client, REG_TEMP_MIN_ALARM,
 167                        &data->temp_min_alarm);
 168                read_u8_from_i2c(client, REG_TEMP_MAX_ALARM,
 169                        &data->temp_max_alarm);
 170
 171                read_fan_from_i2c(client, &data->fan_tach,
 172                        REG_FAN_TACH_HI, REG_FAN_TACH_LO);
 173                read_fan_from_i2c(client, &data->fan_target,
 174                        REG_FAN_TARGET_HI, REG_FAN_TARGET_LO);
 175                read_fan_config_from_i2c(client);
 176
 177                data->last_updated = jiffies;
 178                data->valid = true;
 179        }
 180
 181        mutex_unlock(&data->update_lock);
 182
 183        return data;
 184}
 185
 186static ssize_t
 187show_temp(struct device *dev, struct device_attribute *da, char *buf)
 188{
 189        int nr = to_sensor_dev_attr(da)->index;
 190        struct emc2103_data *data = emc2103_update_device(dev);
 191        int millidegrees = data->temp[nr].degrees * 1000
 192                + data->temp[nr].fraction * 125;
 193        return sprintf(buf, "%d\n", millidegrees);
 194}
 195
 196static ssize_t
 197show_temp_min(struct device *dev, struct device_attribute *da, char *buf)
 198{
 199        int nr = to_sensor_dev_attr(da)->index;
 200        struct emc2103_data *data = emc2103_update_device(dev);
 201        int millidegrees = data->temp_min[nr] * 1000;
 202        return sprintf(buf, "%d\n", millidegrees);
 203}
 204
 205static ssize_t
 206show_temp_max(struct device *dev, struct device_attribute *da, char *buf)
 207{
 208        int nr = to_sensor_dev_attr(da)->index;
 209        struct emc2103_data *data = emc2103_update_device(dev);
 210        int millidegrees = data->temp_max[nr] * 1000;
 211        return sprintf(buf, "%d\n", millidegrees);
 212}
 213
 214static ssize_t
 215show_temp_fault(struct device *dev, struct device_attribute *da, char *buf)
 216{
 217        int nr = to_sensor_dev_attr(da)->index;
 218        struct emc2103_data *data = emc2103_update_device(dev);
 219        bool fault = (data->temp[nr].degrees == -128);
 220        return sprintf(buf, "%d\n", fault ? 1 : 0);
 221}
 222
 223static ssize_t
 224show_temp_min_alarm(struct device *dev, struct device_attribute *da, char *buf)
 225{
 226        int nr = to_sensor_dev_attr(da)->index;
 227        struct emc2103_data *data = emc2103_update_device(dev);
 228        bool alarm = data->temp_min_alarm & (1 << nr);
 229        return sprintf(buf, "%d\n", alarm ? 1 : 0);
 230}
 231
 232static ssize_t
 233show_temp_max_alarm(struct device *dev, struct device_attribute *da, char *buf)
 234{
 235        int nr = to_sensor_dev_attr(da)->index;
 236        struct emc2103_data *data = emc2103_update_device(dev);
 237        bool alarm = data->temp_max_alarm & (1 << nr);
 238        return sprintf(buf, "%d\n", alarm ? 1 : 0);
 239}
 240
 241static ssize_t set_temp_min(struct device *dev, struct device_attribute *da,
 242                            const char *buf, size_t count)
 243{
 244        int nr = to_sensor_dev_attr(da)->index;
 245        struct i2c_client *client = to_i2c_client(dev);
 246        struct emc2103_data *data = i2c_get_clientdata(client);
 247        long val;
 248
 249        int result = kstrtol(buf, 10, &val);
 250        if (result < 0)
 251                return -EINVAL;
 252
 253        val = DIV_ROUND_CLOSEST(val, 1000);
 254        if ((val < -63) || (val > 127))
 255                return -EINVAL;
 256
 257        mutex_lock(&data->update_lock);
 258        data->temp_min[nr] = val;
 259        i2c_smbus_write_byte_data(client, REG_TEMP_MIN[nr], val);
 260        mutex_unlock(&data->update_lock);
 261
 262        return count;
 263}
 264
 265static ssize_t set_temp_max(struct device *dev, struct device_attribute *da,
 266                            const char *buf, size_t count)
 267{
 268        int nr = to_sensor_dev_attr(da)->index;
 269        struct i2c_client *client = to_i2c_client(dev);
 270        struct emc2103_data *data = i2c_get_clientdata(client);
 271        long val;
 272
 273        int result = kstrtol(buf, 10, &val);
 274        if (result < 0)
 275                return -EINVAL;
 276
 277        val = DIV_ROUND_CLOSEST(val, 1000);
 278        if ((val < -63) || (val > 127))
 279                return -EINVAL;
 280
 281        mutex_lock(&data->update_lock);
 282        data->temp_max[nr] = val;
 191       c_smbus_write_byte_data(client, REG_TEMP_MIN[nr], data;
 260        mutex_unlock(&data-> 184}
 185
 262        return ssize_t
buf)
 188{
 232static index;
 set_temp_max(struct device *dev, struct device_attribute *da, char *dev);
2egrees * 1000
 236        struct emc2103_data *data = emc2103_update_device( * 125;
&3pc"sref">ref">temp_max[2illidegrees);
client, &/a> =s="sref">da, char * 194}
&3pc"sref">.c#L274" id="L27GET_RPM_FACTORlass="string">&GET_RPM_FACTOR  stru2103.c#L282" id="L282" class="line" name="L282"> 282       sref">data="+code=data" class">data>emc2 /2103.c#L282" id="L282" class="line" name="L282"> 282       srefhref="+code=data" class="sref">ef">temp_max[ 195
 238        return sprintf(buf, &3pc"sre2103_update_device(ssize_t
buf)
 198{
 232static index;
 set_temp_max(struct device *dev, struct device_attribute *da, char *dev);
nr] * 1000;
 236        struct emc2103_data *data = emc2103_update_devi267" id="L267" class=3l3ss="sre3"ction * 125;
8 /2103.c#L282" id="L282" class="line" name="L282"> 282       sref">data="+code=data" class">data>emc103_update_devi267" id="L267" class=3l4ss="sre3"llidegrees);
 238        return sprintf(buf,  194}
ssize_t
buf)
spricomm"> 1>/*class="mon/emc2103.c#L276" id="L276" class3=8uf" cla3s="sref">buf)
spricomm"> 1>ru2Note: we also > =  here, because its value isclass="mon/emc2103.c#L276" id="L276" class3=9uf" cla3s"L198"> 198{
spricomm"> 1>ru2determda dieider.  This follows the "> 2ctadev);
spricomm"> 1>ru2of least sur"> se; the user doesnf="9;t expec#Lthe fa7 sref"> to">denge justclass="mon/emc2103.c#L276" id="L276" class3dev" clas3">nr] * 1000;
spricomm"> 1>ru2because the dieider">denged.class="mon/emc2103.c#L276" id="L276" class3dass="sre3illidegrees);
spricomm"> 1>ru/class="mon/emc2103.c#L276" id="L276" class3d3ss="sre3="L212"> 212}
 265static set_temp_max(struct device *dev, struct  213
 266                            const char *buf, size_t ssize_t
buf)
 246        struct emc2103_data *data = emc2103_update_devi267" id="L267" class=3line" nam3="L216"> 216{
 269        struct i2c_client *client = to_i2c_client(index;
8 /2103.c#L282" id="L282" class="line" name="L282"> 282       sref">data="+code=data" class">data>emc103_update_devi267" id="L267" class=3dev" clas3="sref">dev);
deg3ees == -128);
f3ult ? 1 : 0);
i2c_client *result = kstrtol(to_i2c_client( 221}
        if ( 222
 279                return -ssize_t
buf)
spricomm"> 1>/*2No">denge u/class="mon/emc2103.c#L276" id="L276" class3line" nam3="L225"> 225{
 262        return index;
dev);
nr);
a3arm ? 1 : 0);
i23        return  230}
 231
ssize_t
i22        return buf)
 234{
index;
i21        return dev);
nr);
 ? 1 : 0);
i2ref">temp_max[ 239}
 240
da,
 279                return -count)
 243{
index;
 281        mutex_lock(&data->dev);
client);
i2c_client *<" class="lreadine" name="L2L183" cla283" class="lreadine" name=sref">result = <191"> 191       c_smbus_write_byte_data(       c->val;
    mon/emc2103.c#L225" id="L225" class=3"line" na3e="L248"> 248
         191       c_smbus_wri>mutex_lock(&sprintf(val);
->3esult < 0)
 260        mutex_unlock(&data->EINVAL;
 279 252
val, 1000);
<    > 127))
|">.c#L274" id="L278ew_renge_bitse=REG_TEMP_MIN" ew_renge_bits    >+code=tem5a>->EINVAL;
 191       c_smbus_write_byte_data(       c-> 256
);
 258       sref">data="+code=data" class">data>emcf">8 /2103.c#L282" id= ew_dievice" class="sr ew_die>emc103_update_devi267" id="L267" class=3=val" cla3s="sref">val;
val);
spricomm"> 1>/*2> =  103high emp_ is not disabled u/class="mon/emc2103.c#L276" id="L276" class3ss="sref"3update_lock);
 282       srefhref">="+code=data" classhref">ref"><   <2rx1fe   a> =x1fe   mon/emc2103.c#L225" id="L225" class=3"line" na3e="L261"> 261
bu" class1rs/hwm103.c#L282" id= ew_href">="+code=data" c ew_href">>emcf">c#L278" id="L278"L282" class="line" name="L282"> 282       srefhref">="+code=data" classhref">ref">u2103.c#L282" id=old_dievice" class="srold_dieze_t) /2103.c#L282" id= ew_dievice" class="sr ew_die>emc103_update_devi267" id="L267" class=3nt" class3"sref">count;
 282       srefhref">="+code=data" classhref">ref">i2c_client *="+code=data" c ew_href">>emc,>c#L278" id="L278;s="sref">bu" class1rs/hw)=x1fffa>-> 263}
_"sref""sref">bu" clasi0de=tlasshref">_"sref"llass="line" name="L191"> 191       c_smbus_write_byte_data("L282" class="line" name="L282"> 282       srefhref">="+code=data" classhref">ref"a>-> 264
da,
count)
spricomm"> 1>/*2invali=  267{
 258       vali=8" class="line"vali=ref">i2c_client *emc103_update_devi267" id="L267" class=3nval" cla3"sref">index;
dev);
 260        mutex_unlock(&data->client);
 262        return val;
 272
val);
 214static 3esult < 0)
="+code=data" c215" srefhref">>    /a> set_temp_max(struct device *dev, struct device_attribute *da, char *EINVAL;
 276
 227        struct emc2103_data *data = emc2103_update_devi216" id="L216" class=3"ine" nam3">val, 1000);
&3pc"sref">ref">temp_max[3al > 127))
EINVAL;
spricomm"> 1>/*2high emp_ of =xff210dic  280
 282       srefhref">="+code=data" classhref">ref">a> =s><   < 282       srefhref">="+code=data" classhref">ref"><   <2rx1fe   a> =x1fe  s="sref">da, char *);
&3pc"sref">.c#L274" id="L27GET_RPM_FACTORlass="string">&GET_RPM_FACTOR  stru2103.c#L282" id="L282" class="line" name="L282"> 282       sref">data="+code=data" class">data>emc2="sref">da, char *val;
 282       srefhref">="+code=data" classhref">ref"ef">temp_max[data;
 184}
 238        return sprintf(buf, &3pc"sre2103_update_device( 185
ssize_t
buf)
 265static ="+code=data" c2 hrfa7_href">>    /a> set_temp_max(struct device *dev, struct 3="L188"> 188{
 266                            const char *buf, size_t index;
dev);
 227        struct emc2103_data *data = emc2103_update_devi216" id="L216" class=3ds="sref"3egrees * 1000
 269        struct i2c_client *client = to_i2c_client( * 125;
="+code=data" c3pc_href">ref"ef">temp_max[3illidegrees);
 194}
 273        int result = kstrtol(="+code=data" c3pc_href">ref"ref">to_i2c_client( 195
 274        if (ssize_t
 279                return -buf)
 198{
spricomm"> 1>/*2Dss=sheet mon/as 1638r as maximum RPM sref"> (table 3.2) u/class="mon/emc2103.c#L276" id="L276" class4ex" class4"sref">index;
="+code=data" c3pc_href">ref">           if ((="+code=data" c3pc_href">ref">da, char *dev);
 251                return -nr] * 1000;
 * 125;
 281        mutex_lock(&data->);
 194}
="+code=data" c3pc_href">ref">=> =s="sref">da, char *ssize_t
 282       srefhref">="+code=data" classhref">ref">i2=x1fff>->ssize_t
buf)
 282       srefhref">="+code=data" classhref">ref">i2struct -> 198{
&GET_RPM_FACTOR  stru2103.c#L282" id="L282" class="line" name="L282"> 282       sref">data="+code=data" class">data>emc21/2103.c#L282" id=4pc_href">="+code=data" c3pc_href">ref"f/a>        return dev);
->nr] * 1000;
_"sref""sref">bu" clasi0de=tlasshref">_"sref"llass="line" name="L191"> 191       c_smbus_write_byte_data("L282" class="line" name="L282"> 282       srefhref">="+code=data" classhref">ref"a>-> 212}
 213
 260        mutex_unlock(&data->ssize_t
 262        return buf)
 216{
index;
/a>        return dev);
    /a> set_temp_max(struct device *dev, struct device_attribute *da, char *deg4ees == -128);
f4ult ? 1 : 0);
 227        struct emc2103_data *data = emc2103_update_devi216" id="L216" class=4=ass="sre4="L221"> 221}
buf,quot;="+code=data" cquot;>   f">..c#L274" id="L27ef="+code=client" class="sref">client, &/<   <2rx1fe   => =x1fe  103_update_devi216" id="L216" class=4=3ss="sre4e="L222"> 222
 238        return sprintf(buf,    f? 1 :   103_update_devi216" id="L216" class=4=4ss="sre4sref">ssize_t
buf)
 225{
/a>        return index;
    /a> set_temp_max(struct device *dev, struct device_attribute *da, char *dev);
nr);
 227        struct emc2103_data *data = emc2103_update_devi216" id="L216" class=4="sref">a4arm ? 1 : 0);
 238        return sprintf(buf, client, &   f? 3 :   103_update_devi216" id="L216" class=4line" nam4="L230"> 230}
 231
ssize_t
 265static     /a> set_temp_max(struct device *dev, struct buf)
 266                            const char *buf, size_t  234{
index;
 269        struct i2c_client *client = to_i2c_client(dev);
 227        struct emc2103_data *data = i2c_get_clientdata(nr);
 ? 1 : 0);
buf,         return  239}
 240
 273        int result = kstrtol(da,
 274        if (count)
 279                return - 243{
index;
 281        mutex_lock(&data->dev);
client);
val;
 282       sref3pc_contrf="+code=result" ;   fi2c_client *emc103_update_devi267" id="L267" class=4"line" na4e="L248"> 248
val);
4esult < 0)
 282       sref3pc_contrf="+code=result" ;   fi2c_client *<03.ta" class="sref"03.t>emc103_update_devi267" id="L267" class=4L" class=4sref">EINVAL;
 252
val, 1000);
buf,  279                return - > 127))
="+code=data" ccr>             return -EINVAL;
 256
);
 273        int bu" clasreadiu8_fromref"llass="line" name="L191"> 191       c_smbus_write_byte_data(       c->val;
 27t mon/emc2103.c#L225" id="L225" class=4val" clas4="sref">val);
 27>->);
="+code=data" ccr>             return - 261
count;
 263}
client, &         if ( 264
|">0x8ref">temp_max[da,
count)
<   temp_max[ 267{
index;
 191       c_smbus_write_byte_data(       c->dev);
="+code=data" ccr>    :on/emc2103.c#L225" id="L225" class=4" class="4ref">client);
 260        mutex_unlock(&data->val;
 262        return  272
val);
4esult < 0)
&SENSOR_DEVICE_ATTRllass="line" name="Ltemp1_inpue=client" class="emp1_inpueta 279 279EINVAL;
&SENSOR_DEVICE_ATTRllass="line" name="Ltemp1_ref="+code=data" ctemp1_refta 279&S_IWUSR               const c15" "emp_ref="+code=data" cc15" "emp_ref"srefmon/emc2103.c#L272" id="L272" class4"line" na4e="L276"> 276
_"emp_ref="+code=data" cc">_"emp_ref        103_update_devi216" id="L216" class=4Ls="sref"4">val, 1000);
&SENSOR_DEVICE_ATTRllass="line" name="Ltemp1_rax="+code=data" ctemp1_raxta 279&S_IWUSR               const c15" "emp_rax="+code=data" cc15" "emp_rax"srefmon/emc2103.c#L272" id="L272" class4"val" cla4al > 127))
_"emp_rax="+code=data" cc">_"emp_rax        103_update_devi216" id="L216" class=4L" class=4sref">EINVAL;
&SENSOR_DEVICE_ATTRllass="line" name="Ltemp1_quot;="+code=data" ctemp1_quot;ta 279 279 280
&SENSOR_DEVICE_ATTRllass="line" name="Ltemp1_ref_alarclass="string">&temp1_ref_alarcta 279&c15" "empfref_alarc"srefmon/emc2103.c#L272" id="L272" class4ss="sref"4update_lock);
 279val;
&SENSOR_DEVICE_ATTRllass="line" name="Ltemp1_rax_alarclass="string">&temp1_rax_alarcta 279&c15" "empfrax_alarc"srefmon/emc2103.c#L272" id="L272" class4sal" clas4="sref">data;
 2794="L184"> 184}
 185
&SENSOR_DEVICE_ATTRllass="line" name="Ltemp2_inpue=client" class="emp2_inpueta 279 279ssize_t
&SENSOR_DEVICE_ATTRllass="line" name="Ltemp2_ref="+code=data" ctemp2_refta 279&S_IWUSR               const c15" "emp_ref="+code=data" cc15" "emp_ref"srefmon/emc2103.c#L272" id="L272" class4=buf" cla4s="sref">buf)
_"emp_ref="+code=data" cc">_"emp_ref      1 103_update_devi216" id="L216" class=4"val" cla4="L188"> 188{
&SENSOR_DEVICE_ATTRllass="line" name="Ltemp2_rax="+code=data" ctemp2_raxta 279&S_IWUSR               const c15" "emp_rax="+code=data" cc15" "emp_rax"srefmon/emc2103.c#L272" id="L272" class4ex" class4"sref">index;
_"emp_rax="+code=data" cc">_"emp_rax      1 103_update_devi216" id="L216" class=4dev" clas4="sref">dev);
&SENSOR_DEVICE_ATTRllass="line" name="Ltemp2_quot;="+code=data" ctemp2_quot;ta 279 279 * 1000
&SENSOR_DEVICE_ATTRllass="line" name="Ltemp2_ref_alarclass="string">&temp2_ref_alarcta 279&c15" "empfref_alarc"srefmon/emc2103.c#L272" id="L272" class4sval" cla4action * 125;
 279);
&SENSOR_DEVICE_ATTRllass="line" name="Ltemp2_rax_alarclass="string">&temp2_rax_alarcta 279&c15" "empfrax_alarc"srefmon/emc2103.c#L272" id="L272" class4dine" nam4="L194"> 194}
 279 195
ssize_t
&SENSOR_DEVICE_ATTRllass="line" name="Ltemp3_inpue=client" class="emp3_inpueta 279 279buf)
&SENSOR_DEVICE_ATTRllass="line" name="Ltemp3_ref="+code=data" ctemp3_refta 279&S_IWUSR               const c15" "emp_ref="+code=data" cc15" "emp_ref"srefmon/emc2103.c#L272" id="L272" class4line" nam4="L198"> 198{
_"emp_ref="+code=data" cc">_"emp_ref      2 103_update_devi216" id="L216" class=5ex" class5"sref">index;
&SENSOR_DEVICE_ATTRllass="line" name="Ltemp3_rax="+code=data" ctemp3_raxta 279&S_IWUSR               const c15" "emp_rax="+code=data" cc15" "emp_rax"srefmon/emc2103.c#L272" id="L272" class5dev" clas5="sref">dev);
_"emp_rax="+code=data" cc">_"emp_rax      2 103_update_devi216" id="L216" class=5e2v" clas5=grees * 1000
&SENSOR_DEVICE_ATTRllass="line" name="Ltemp3_quot;="+code=data" ctemp3_quot;ta 279 279 * 125;
&SENSOR_DEVICE_ATTRllass="line" name="Ltemp3_ref_alarclass="string">&temp3_ref_alarcta 279&c15" "empfref_alarc"srefmon/emc2103.c#L272" id="L272" class5l4ss="sre5"llidegrees);
 279 194}
&SENSOR_DEVICE_ATTRllass="line" name="Ltemp3_rax_alarclass="string">&temp3_rax_alarcta 279&c15" "empfrax_alarc"srefmon/emc2103.c#L272" id="L272" class5t" class=5sref">ssize_t
 279ssize_t
buf)
&SENSOR_DEVICE_ATTRllass="line" name="Ltemp4_inpue=client" class="emp4_inpueta 279 279 198{
&SENSOR_DEVICE_ATTRllass="line" name="Ltemp4_ref="+code=data" ctemp4_refta 279&S_IWUSR               const c15" "emp_ref="+code=data" cc15" "emp_ref"srefmon/emc2103.c#L272" id="L272" class5dev" clas5="sref">dev);
_"emp_ref="+code=data" cc">_"emp_ref      3 103_update_devi216" id="L216" class=5dev" clas5">nr] * 1000;
&SENSOR_DEVICE_ATTRllass="line" name="Ltemp4_rax="+code=data" ctemp4_raxta 279&S_IWUSR               const c15" "emp_rax="+code=data" cc15" "emp_rax"srefmon/emc2103.c#L272" id="L272" class5dass="sre5illidegrees);
_"emp_rax="+code=data" cc">_"emp_rax      3 103_update_devi216" id="L216" class=5d3v" clas5="L212"> 212}
&SENSOR_DEVICE_ATTRllass="line" name="Ltemp4_quot;="+code=data" ctemp4_quot;ta 279 279 213
&SENSOR_DEVICE_ATTRllass="line" name="Ltemp4_ref_alarclass="string">&temp4_ref_alarcta 279&c15" "empfref_alarc"srefmon/emc2103.c#L272" id="L272" class5t" class=5sref">ssize_t
 279buf)
&SENSOR_DEVICE_ATTRllass="line" name="Ltemp4_rax_alarclass="string">&temp4_rax_alarcta 279&c15" "empfrax_alarc"srefmon/emc2103.c#L272" id="L272" class5line" nam5="L216"> 216{
 279index;
dev);
&DEVICE_ATTRllass="line" name="Lfan1_inpue=client" class=fan1_inpueta 279&c15" fan               const NULame="L279"> 279deg5ees == -128);
&DEVICE_ATTRllass="line" name="Lfan1_dito_i2c_client" cfan1_ditta 279&S_IWUSR               const c15" ; ? 1 : 0);
&DEVICE_ATTRllass="line" name="Lfan1_href">="+code=data" clas1_href">ref"f          const S_IRUGOme="L279"> 279&S_IWUSR               const c15" ;="+code=data" c215" srefhref">>   fmon/emc2103.c#L272" id="L272" class5=ass="sre5="L221"> 221}
="+code=data" c2 hrfa7_href">>    103_update_devi216" id="L216" class=5s3v" clas5e="L222"> 222
&DEVICE_ATTRllass="line" name="Lfan1_quot;="+code=data" cqun1_quot;ta 279              const NULame="L279"> 279ssize_t
buf)
&DEVICE_ATTRllass="line" name="Lpwm1_enable="+code=data" cpwm1_enableref"f          const S_IRUGOme="L279"> 279&S_IWUSR               const c15" pwm_enable="+code=data" c215" pwm_enable>   fmon/emc2103.c#L272" id="L272" class5=" class=5="L225"> 225{
    103_update_devi216" id="L216" class=5sine" nam5"sref">index;
dev);
spricomm"> 1>/*2sensors present on all m idls u/class="mon/emc2103.c#L276" id="L276" class5=9 class=5s="sref">nr);
, struct   >, structs a5arm ? 1 : 0);
, s_temp1_inpue=client" class=sensor_dev >, s_temp1_inpues/hw.a href="+code=mdev >, s=client" class=dev >, ss/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5line" nam5="L230"> 230}
, s_temp1_ref="+code=data" cc"nsor_dev >, s_temp1_refs/hw.a href="+code=mdev >, s=client" class=dev >, ss/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5lass="sre5e="L231"> 231
, s_temp1_rax="+code=data" cc"nsor_dev >, s_temp1_raxs/hw.a href="+code=mdev >, s=client" class=dev >, ss/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5l3v" clas5sref">ssize_t
, s_temp1_quot;="+code=data" c2ensor_dev >, s_temp1_quot;s/hw.a href="+code=mdev >, s=client" class=dev >, ss/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5l4ss="sre5s="sref">buf)
, s_temp1_ref_alarclass="string">&censor_dev >, s_temp1_ref_alarcs/hw.a href="+code=mdev >, s=client" class=dev >, ss/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5lbuf" cla5="L234"> 234{
, s_temp1_rax_alarclass="string">&censor_dev >, s_temp1_rax_alarc"sre.a href="+code=mdev >, s=client" class=dev >, ss/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5l" class=5"sref">index;
, s_temp2_inpue=client" class=sensor_dev >, s_temp2_inpue"sre.a href="+code=mdev >, s=client" class=dev >, ss/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5line" nam5="sref">dev);
, s_temp2_ref="+code=data" cc"nsor_dev >, s_temp2_refs/hw.a href="+code=mdev >, s=client" class=dev >, ss/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5lx" class5s="sref">nr);
, s_temp2_rax="+code=data" cc"nsor_dev >, s_temp2_raxs/hw.a href="+code=mdev >, s=client" class=dev >, ss/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5l9 class=5arm ? 1 : 0);
, s_temp2_quot;="+code=data" c2ensor_dev >, s_temp2_quot;s/hw.a href="+code=mdev >, s=client" class=dev >, ss/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5line" nam5="L239"> 239}
, s_temp2_ref_alarclass="string">&sensor_dev >, s_temp2_ref_alarcs/hw.a href="+code=mdev >, s=client" class=dev >, ss/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5line" nam5e="L240"> 240
, s_temp2_rax_alarclass="string">&sensor_dev >, s_temp2_rax_alarcs/hw.a href="+code=mdev >, s=client" class=dev >, ss/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5lass="sre5ss="sref">da,
, s_fan1_inpue=client" class=dev >, s_fan1_inpues/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5l3v" clas5"sref">count)
, s_fan1_dito_i2c_client" cdev >, s_fan1_dits/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5l4ss="sre5="L243"> 243{
, s_fan1_href">="+code=data" cdev >, s_fan1_href">s/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5lbuf" cla5"sref">index;
, s_fan1_quot;="+code=data" cdev >, s_fan1_quot;s/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5l" class=5="sref">dev);
, s_pwm1_enable="+code=data" cdev >, s_pwm1_enables/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5line" nam5ref">client);
 279val;
 248
val);
spricomm"> 1>/*2extra temperature2sensors only present on " cl-2 and " cl-4 u/class="mon/emc2103.c#L276" id="L276" class5s="sref">5esult < 0)
, struct   >, structs_temp3 EINVAL;
, s_temp3_inpue=client" class=sensor_dev >, s_temp3_inpues/hw.a href="+code=mdev >, s=client" class=dev >, ss/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5vt" class5e="L252"> 252
, s_temp3_ref="+code=data" csensor_dev >, s_temp3_refs/hw.a href="+code=mdev >, s=client" class=dev >, ss/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5v4ss="sre5">val, 1000);
, s_temp3_rax="+code=data" csensor_dev >, s_temp3_raxs/hw.a href="+code=mdev >, s=client" class=dev >, ss/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5vbuf" cla5al > 127))
, s_temp3_quot;="+code=data" csensor_dev >, s_temp3_quot;s/hw.a href="+code=mdev >, s=client" class=dev >, ss/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5v" class=5sref">EINVAL;
, s_temp3_ref_alarclass="string">&sensor_dev >, s_temp3_ref_alarcs/hw.a href="+code=mdev >, s=client" class=dev >, ss/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5vine" nam5e="L256"> 256
, s_temp3_rax_alarclass="string">&sensor_dev >, s_temp3_rax_alarcs/hw.a href="+code=mdev >, s=client" class=dev >, ss/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5vx" class5update_lock);
 279val;
val);
);
spricomm"> 1>/*2extra temperature2sensors only present on " cl-2 and " cl-4 in APD m id u/class="mon/emc2103.c#L276" id="L276" class5"line" na5e="L261"> 261
, struct   >, structs_temp4 count;
, s_temp4_inpue=client" class=sensor_dev >, s_temp4_inpues/hw.a href="+code=mdev >, s=client" class=dev >, ss/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5line" nam5="L263"> 263}
, s_temp4_ref="+code=data" csensor_dev >, s_temp4_refs/hw.a href="+code=mdev >, s=client" class=dev >, ss/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5lbuf" cla5e="L264"> 264
, s_temp4_rax="+code=data" csensor_dev >, s_temp4_raxs/hw.a href="+code=mdev >, s=client" class=dev >, ss/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5l" class=5ss="sref">da,
, s_temp4_quot;="+code=data" csensor_dev >, s_temp4_quot;s/hw.a href="+code=mdev >, s=client" class=dev >, ss/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5line" nam5"sref">count)
, s_temp4_ref_alarclass="string">&sensor_dev >, s_temp4_ref_alarcs/hw.a href="+code=mdev >, s=client" class=dev >, ss/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5lx" class5="L267"> 267{
, s_temp4_rax_alarclass="string">&sensor_dev >, s_temp4_rax_alarcs/hw.a href="+code=mdev >, s=client" class=dev >, ss/hw.a href="+code=m>, s=client" class=>, ss/hwfmon/emc2103.c#L272" id="L272" class5lval" cla5"sref">index;
 279dev);
client);
val;
  group="+code=data" c27  groups/hwm= mon/emc2103.c#L225" id="L225" class=5"line" na5e="L272"> 272
, ssv" class="sref">, sss/hwm= ef="+code=devic27  >, structsv" class="sref"27  >, structss/hwfmon/emc2103.c#L272" id="L272" class5val" clas5="sref">val);
 < 0)
EINVAL;
  temp3_group="+code=data" c27  temp3_groups/hwm= mon/emc2103.c#L225" id="L225" class=5"ine" nam5e="L276"> 276
, ssv" class="sref">, sss/hwm= ef="+code=devic27  >, structs_temp3v" class="sref"27  >, structs_temp3 val, 1000);
 > 127))
EINVAL;
  temp4_group="+code=data" c27  temp4_groups/hwm= mon/emc2103.c#L225" id="L225" class=5"line" na5e="L280"> 280
, ssv" class="sref">, sss/hwm= ef="+code=devic27  >, structs_temp4v" class="sref"27  >, structs_temp4 );
val;
data;
 184}
  probev" class="sref"27  probes/hw(103.c#L236" id="L236" class="line" name="L269"> 269        struct  269device_id      struct  d          if ( 185
ssize_t
 227        struct buf)
 188{
index;
 269(&adaptes=client" class=>daptesref",cunlock(&I2C_FUNC_SMBUS_BYTE_DATA=client" class=I2C_FUNC_SMBUS_BYTE_DATA           if (dev);
 279 * 1000
 * 125;
bu" clasdevm_kzallo"s/hw(        (&dev"sref">bu" clasdevref",csizeof(103.c#L236" id="L236" class="line" name="L227"> 227        st)fmon/emc2103.c#L272" id="L272" class5dal" clas5illidegrees);
 279 194}
 195
 279ssize_t
buf)
  ame=s/hw(struct (&de=emc2103_data" class="sre 103_update_devi216" id="L216" class=5dval" cla5="L198"> 198{
 inie=i2c_client" cl260"> inies/hw(        mutex_unlock(&data->index;
dev);
spricomm"> 1>/*2" cl-2 and " cl-4 have 32external di&ams, " cl-1 has 1 u/class="mon/emc2103.c#L276" id="L276" class6e2v" clas6=grees * 1000
(&-> * 125;
);
spricomm"> 1>/*2" cl-1 only has 1 external di&am u/class="mon/emc2103.c#L276" id="L276" class6e5ss="sre6""L194"> 194}
mutex_unlock(&"empfclass="line" name="L"empfclass"srem= 2>-> 195
ssize_t
spricomm"> 1>/*2" cl-2 and " cl-4 have 32or 42external di&ams u/class="mon/emc2103.c#L276" id="L276" class6e8ss="sre6"="sref">buf)
(&       c-> 198{
dev);
(&dev"sref">bu" clasdevref",c ="sref">spri103ing">"reg>0x%02x, err %d\n"class=",cunlock(&       cnr] * 1000;
-> 212}
 213
ssize_t
spricomm"> 1>/*2detec#Lcurrent mon/e of hardwarm u/class="mon/emc2103.c#L276" id="L276" class6d" class=6s="sref">buf)
mutex_unlock(&"empfclass="line" name="L"empfclass"srem= .103.c#L282" id=aon/usv" class="sref"mon/us"srem&    >0x01) ? 42: 3103_update_devi216" id="L216" class=6d7ss="sre6="L216"> 216{
index;
spricomm"> 1>/*2force APD mon/e 103module pardev);
apd"srem=">0t mon/emc2103.c#L225" id="L225" class=6sref">deg6ees == -128);
spricomm"> 1>/*2force APD m id off u/class="mon/emc2103.c#L276" id="L276" class6sev" clas6ult ? 1 : 0);
mutex_unlock(&"empfclass="line" name="L"empfclass"srem= 3103_update_devi216" id="L216" class=6=ass="sre6="L221"> 221}
 222
(&       c->ssize_t
apd"srem=">1t mon/emc2103.c#L225" id="L225" class=6s" class=6s="sref">buf)
spricomm"> 1>/*2force APD m id on u/class="mon/emc2103.c#L276" id="L276" class6s" class=6="L225"> 225{
mutex_unlock(&"empfclass="line" name="L"empfclass"srem= 4>->index;
0x01>->dev);
(&       c->nr);
a6arm ? 1 : 0);
 230}
 231
spricomm"> 1>/*2Register sysfs hooks u/class="mon/emc2103.c#L276" id="L276" class6l3v" clas6sref">ssize_t
(&dev"sref">bu" clasdevref".a href="+code=mkobj"sref">bu" claskobjta  group="+code=data" c27  groups/hwa>->buf)
 234{
index;
dev);
mutex_unlock(&"empfclass="line" name="L"empfclass"sremtex_= 3t mon/emc2103.c#L225" id="L225" class=6lx" class6s="sref">nr);
(&dev"sref">bu" clasdevref".a href="+code=mkobj"sref">bu" claskobjta ? 1 : 0);
  temp3_group="+code=data" c27  temp3_groups/hwa>-> 239}
 240
da,
count)
 243{
mutex_unlock(&"empfclass="line" name="L"empfclass"srem== 4t mon/emc2103.c#L225" id="L225" class=6lbuf" cla6"sref">index;
(&dev"sref">bu" clasdevref".a href="+code=mkobj"sref">bu" claskobjtadev);
  temp4_group="+code=data" c27  temp4_groups/hwa>->client);
val;
 248
val);
6esult < 0)
mutex_unlock(&" id=_dev"sref">bu" clas" id=_dev"srem= ef="+code=devic" id=_device_register"sref">bu" clas" id=_device_registers/hw(        (&dev"sref">bu" clasdevref"a>->EINVAL;
&IS_ERRs/hw(struct mutex_unlock(&" id=_dev"sref">bu" clas" id=_dev"sre)t mon/emc2103.c#L225" id="L225" class=6vt" class6e="L252"> 252
&PTR_ERRs/hw(struct mutex_unlock(&" id=_dev"sref">bu" clas" id=_dev"sre)>->val, 1000);
 > 127))
EINVAL;
 256
(&dev"sref">bu" clasdevref",c ="sref">spri103ing">"%s:2sensor '%s'\n"class=",mon/emc2103.c#L276" id="L276" class6vx" class6update_lock);
mutex_unlock(&" id=_dev"sref">bu" clas" id=_dev"sre)           const 1+code=i2c_client" class="sref"utex_unlock(&
->val;
val);
);
 261
count;
mutex_unlock(&"empfclass="line" name="L"empfclass"srem== 4t03_update_devi216" id="L216" class=6"4ss="sre6="L263"> 263}
(&dev"sref">bu" clasdevref".a href="+code=mkobj"sref">bu" claskobjta  temp4_group="+code=data" c27  temp4_groups/hwa>-> 264
da,
mutex_unlock(&"empfclass="line" name="L"empfclass"sremtex_= 3t03_update_devi216" id="L216" class=6"ine" nam6"sref">count)
(&dev"sref">bu" clasdevref".a href="+code=mkobj"sref">bu" claskobjta  temp3_group="+code=data" c27  temp3_groups/hwa>-> 267{
index;
(&dev"sref">bu" clasdevref".a href="+code=mkobj"sref">bu" claskobjta  group="+code=data" c27  groups/hwa>->dev);
client);
val;
 272
  removes/hw(103.c#L236" id="L236" class="line" name="L269"> 269        struct val);
 < 0)
 227        struct   ame="L2L183" cla283" clget9  ame=s/hw(struct ->EINVAL;
 276
bu" clas" id=_device_unregisters/hw(struct mutex_unlock(&" id=_dev"sref">bu" clas" id=_dev"sre)>->val, 1000);
 > 127))
mutex_unlock(&"empfclass="line" name="L"empfclass"srem== 4t03_update_devi216" id="L216" class=6L" class=6sref">EINVAL;
(&dev"sref">bu" clasdevref".a href="+code=mkobj"sref">bu" claskobjta  temp4_group="+code=data" c27  temp4_groups/hwa>-> 280
);
mutex_unlock(&"empfclass="line" name="L"empfclass"sremtex_= 3t03_update_devi216" id="L216" class=6"line" na6s="sref">val;
(&dev"sref">bu" clasdevref".a href="+code=mkobj"sref">bu" claskobjta  temp3_group="+code=data" c27  temp3_groups/hwa>->data;
 184}
(&dev"sref">bu" clasdevref".a href="+code=mkobj"sref">bu" claskobjta  group="+code=data" c27  groups/hwa>-> 185
ssize_t
buf)
 188{
index;
 269device_id          ids    [] = mon/emc2103.c#L225" id="L225" class=6dev" clas6="sref">dev);
spri103ing">"225" cl"class=",c0, },mon/emc2103.c#L276" id="L276" class6ds="sref"6egrees * 1000
spricomm"> 1>/*2LIST END u/class="2mon/emc2103.c#L212" id="L212" class=6dline" na6action * 125;
);
 26ref",c     ids    a>-> 194}
 195
spricomm"> 1>/*2Re3.c#L02103detec#ion is auccessful, -ENODEV otherwism u/class="mon/emc2103.c#L276" id="L276" class6dine" nam6sref">ssize_t
buf)
   etec# name="L227"> 227   etec#s/hw(103.c#L236" id="L236" class="line" name="L269"> 269        struct newss="linref",c103.c#L236" id="L236" clasboard_infoo_i2c_client" cclasboard_info      struct  198{
index;
daptesref"m= ef="+code=devicnewss="line" name="L269">newss="linref"utex_unlock(&adaptes=client" class=>daptesref">->dev);
 2produc#ref">-> * 1000
 * 125;
 269daptesref",cunlock(&I2C_FUNC_SMBUS_BYTE_DATA=client" class=I2C_FUNC_SMBUS_BYTE_DATA           if ();
-> 194}
 195
newss="linref",cstruct ->ssize_t
0x5D      if (buf)
-> 198{
dev);
 2produc#ref"m= ef="+code=devic" class="lreadine" name="L2L183" cla283" class="lreadine" name=s/hw(struct newss="linref",cstruct ->nr] * 1000;
 2produc#ref"m!">0x24t      &    >(struct  2produc#ref"m!">0x26       if (-> 212}
 213
103lcpys/hw(struct (&"ypev" class="sref""yperef",cs="sref">spri103ing">"225" cl"class=",cunlock(&I2C_NAME_SIZEv" class="sref"I2C_NAME_SIZEta->ssize_t
buf)
 216{
index;
dev);
 269d.c#L2        27  d.c#L2ref"m= mon/emc2103.c#L225" id="L225" class=7sref">deg7ees == -128);
 ==i2c_client" clas_cls/hwmon/emc222= ef="+code=devicI2C_CLASS_HWMONv" class="sref"I2C_CLASS_HWMONref",on/emc2103.c#L225" id="L225" class=7sev" clas7ult ? 1 : 0);
d.c#L2ref"m= mon/emc2103.c#L225" id="L225" class=7sass="sre7="L221"> 221}
spri103ing">"225" cl"class=",on/emc2103.c#L225" id="L225" class=7s3v" clas7e="L222"> 222
ssize_t
  probev" class="sref"27  probes/hw,mon/emc2103.c#L276" id="L276" class7s5ss="sre7s="sref">buf)
  removev" class="sref"27  removes/hw,mon/emc2103.c#L276" id="L276" class7s" class=7="L225"> 225{
  idsv" class="sref"27  ids    ,mon/emc2103.c#L276" id="L276" class7s7ss="sre7"sref">index;
 2 etec#s/hwon/emc222= ef="+code=devic27   etec# name="L227"> 227   etec#s/hw,mon/emc2103.c#L276" id="L276" class7s8 class=7="sref">dev);
ddress_lis# name="L227"> 2>ddress_lis#s/hw222= e href="+code=m
ormal_ 26e" name="L269">
ormal_ 26s/hw,mon/emc2103.c#L276" id="L276" class7s9ss="sre7s="sref">nr);
a7arm ? 1 : 0);
 230}
module_ 269d.c#L2s/hw(struct   d.c#L2e" name="L269">27  d.c#L2ref"a>-> 231
ssize_t
&MODULE_AUTHORs/hw(s="sref">spri103ing">"Steve Glendinningm<steve.glendinning@shawell.nettex_"class="a>->buf)
spri103ing">"SMSC EMClock e=upd ef="+c"class="a>-> 234{
spri103ing">"GPL"class="a>->index;
indefootes=>
The original LXR softwarm by the >LXR communitys/hw, this experim"> al "+coion by >lxs@x
indesubfootes=>
lxs.xRedpill L