1*4882a593SmuzhiyunKernel driver sht3x 2*4882a593Smuzhiyun=================== 3*4882a593Smuzhiyun 4*4882a593SmuzhiyunSupported chips: 5*4882a593Smuzhiyun 6*4882a593Smuzhiyun * Sensirion SHT3x-DIS 7*4882a593Smuzhiyun 8*4882a593Smuzhiyun Prefix: 'sht3x' 9*4882a593Smuzhiyun 10*4882a593Smuzhiyun Addresses scanned: none 11*4882a593Smuzhiyun 12*4882a593Smuzhiyun Datasheet: https://www.sensirion.com/file/datasheet_sht3x_digital 13*4882a593Smuzhiyun 14*4882a593SmuzhiyunAuthor: 15*4882a593Smuzhiyun 16*4882a593Smuzhiyun - David Frey <david.frey@sensirion.com> 17*4882a593Smuzhiyun - Pascal Sachs <pascal.sachs@sensirion.com> 18*4882a593Smuzhiyun 19*4882a593SmuzhiyunDescription 20*4882a593Smuzhiyun----------- 21*4882a593Smuzhiyun 22*4882a593SmuzhiyunThis driver implements support for the Sensirion SHT3x-DIS chip, a humidity 23*4882a593Smuzhiyunand temperature sensor. Temperature is measured in degrees celsius, relative 24*4882a593Smuzhiyunhumidity is expressed as a percentage. In the sysfs interface, all values are 25*4882a593Smuzhiyunscaled by 1000, i.e. the value for 31.5 degrees celsius is 31500. 26*4882a593Smuzhiyun 27*4882a593SmuzhiyunThe device communicates with the I2C protocol. Sensors can have the I2C 28*4882a593Smuzhiyunaddresses 0x44 or 0x45, depending on the wiring. See 29*4882a593SmuzhiyunDocumentation/i2c/instantiating-devices.rst for methods to instantiate the device. 30*4882a593Smuzhiyun 31*4882a593SmuzhiyunThere are two options configurable by means of sht3x_platform_data: 32*4882a593Smuzhiyun 33*4882a593Smuzhiyun1. blocking (pull the I2C clock line down while performing the measurement) or 34*4882a593Smuzhiyun non-blocking mode. Blocking mode will guarantee the fastest result but 35*4882a593Smuzhiyun the I2C bus will be busy during that time. By default, non-blocking mode 36*4882a593Smuzhiyun is used. Make sure clock-stretching works properly on your device if you 37*4882a593Smuzhiyun want to use blocking mode. 38*4882a593Smuzhiyun2. high or low accuracy. High accuracy is used by default and using it is 39*4882a593Smuzhiyun strongly recommended. 40*4882a593Smuzhiyun 41*4882a593SmuzhiyunThe sht3x sensor supports a single shot mode as well as 5 periodic measure 42*4882a593Smuzhiyunmodes, which can be controlled with the update_interval sysfs interface. 43*4882a593SmuzhiyunThe allowed update_interval in milliseconds are as follows: 44*4882a593Smuzhiyun 45*4882a593Smuzhiyun ===== ======= ==================== 46*4882a593Smuzhiyun 0 single shot mode 47*4882a593Smuzhiyun 2000 0.5 Hz periodic measurement 48*4882a593Smuzhiyun 1000 1 Hz periodic measurement 49*4882a593Smuzhiyun 500 2 Hz periodic measurement 50*4882a593Smuzhiyun 250 4 Hz periodic measurement 51*4882a593Smuzhiyun 100 10 Hz periodic measurement 52*4882a593Smuzhiyun ===== ======= ==================== 53*4882a593Smuzhiyun 54*4882a593SmuzhiyunIn the periodic measure mode, the sensor automatically triggers a measurement 55*4882a593Smuzhiyunwith the configured update interval on the chip. When a temperature or humidity 56*4882a593Smuzhiyunreading exceeds the configured limits, the alert attribute is set to 1 and 57*4882a593Smuzhiyunthe alert pin on the sensor is set to high. 58*4882a593SmuzhiyunWhen the temperature and humidity readings move back between the hysteresis 59*4882a593Smuzhiyunvalues, the alert bit is set to 0 and the alert pin on the sensor is set to 60*4882a593Smuzhiyunlow. 61*4882a593Smuzhiyun 62*4882a593Smuzhiyunsysfs-Interface 63*4882a593Smuzhiyun--------------- 64*4882a593Smuzhiyun 65*4882a593Smuzhiyun=================== ============================================================ 66*4882a593Smuzhiyuntemp1_input: temperature input 67*4882a593Smuzhiyunhumidity1_input: humidity input 68*4882a593Smuzhiyuntemp1_max: temperature max value 69*4882a593Smuzhiyuntemp1_max_hyst: temperature hysteresis value for max limit 70*4882a593Smuzhiyunhumidity1_max: humidity max value 71*4882a593Smuzhiyunhumidity1_max_hyst: humidity hysteresis value for max limit 72*4882a593Smuzhiyuntemp1_min: temperature min value 73*4882a593Smuzhiyuntemp1_min_hyst: temperature hysteresis value for min limit 74*4882a593Smuzhiyunhumidity1_min: humidity min value 75*4882a593Smuzhiyunhumidity1_min_hyst: humidity hysteresis value for min limit 76*4882a593Smuzhiyuntemp1_alarm: alarm flag is set to 1 if the temperature is outside the 77*4882a593Smuzhiyun configured limits. Alarm only works in periodic measure mode 78*4882a593Smuzhiyunhumidity1_alarm: alarm flag is set to 1 if the humidity is outside the 79*4882a593Smuzhiyun configured limits. Alarm only works in periodic measure mode 80*4882a593Smuzhiyunheater_enable: heater enable, heating element removes excess humidity from 81*4882a593Smuzhiyun sensor: 82*4882a593Smuzhiyun 83*4882a593Smuzhiyun - 0: turned off 84*4882a593Smuzhiyun - 1: turned on 85*4882a593Smuzhiyunupdate_interval: update interval, 0 for single shot, interval in msec 86*4882a593Smuzhiyun for periodic measurement. If the interval is not supported 87*4882a593Smuzhiyun by the sensor, the next faster interval is chosen 88*4882a593Smuzhiyun=================== ============================================================ 89