1. Jul 13, 2016
    • Guenter Roeck's avatar
      hwmon: (tmp102) Convert to use regmap, and drop local cache · 28a340db
      Guenter Roeck authored
      
      
      By converting the driver to regmap, we can use regmap to cache non-volatile
      registers. Stop caching the temperature register; while potentially reading
      it more often can result in reading it more often than necessary, this is
      offset by the gain due to not re-reading the limit registers.
      
      A positive side effect of this change is that limit registers can now be
      read and updated before the first temperature conversion is complete.
      
      Acked-by: default avatarNishanth Menon <nm@ti.com>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      28a340db
    • Guenter Roeck's avatar
      hwmon: (tmp102) Rework chip configuration · a9f92ccf
      Guenter Roeck authored
      
      
      So far the chip was forced into polarity 0, even if it was preconfigured
      differently. Do not touch the polarity when configuring the chip.
      
      Also, the configuration register was read beack to check if the
      configuration 'sticks'. Ultimately, that is similar to checking if the
      chip is a tmp102 in the first place. Checking if a write into the
      configuration register was successful is really not the way to do it,
      and quite risky if the chip is not a tmp102, so drop that check.
      Instead, verify if the configuration register has unexpected bits set
      before writing into it.
      
      Acked-by: default avatarNishanth Menon <nm@ti.com>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      a9f92ccf
    • Guenter Roeck's avatar
      hwmon: (tmp102) Improve handling of initial read delay · 3d8f7a89
      Guenter Roeck authored
      
      
      If the chip was in shutdown mode when the driver was loaded, the first
      conversion is ready no more than 35 milli-seconds after the chip was
      taken out of shutdown. The driver delay was so far set to 333 ms (HZ / 3),
      which is much higher than the maximum time needed by the chip.
      Reduce the time to 35 milli-seconds.
      
      Introduce a 'valid' flag to ensure that sensor data is actually read
      even if requested less than 333 ms after the driver was loaded.
      
      Acked-by: default avatarNishanth Menon <nm@ti.com>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      3d8f7a89
  2. Jul 09, 2016
  3. Jul 05, 2016
    • Alison Schofield's avatar
      hwmon: (jc42) Add I2C_CLASS_HWMON to detection class · eacc48ce
      Alison Schofield authored
      In 2011, commit 774466ad
      
       ("hwmon: (jc42) Change detection class")
      changed the detection class of these chips to I2C_CLASS_SPD based
      on this premise: "makes more sense because these chips always live on
      memory modules"
      
      Today these chips have applications beyond memory modules. Examples are
      JC42.4 compatible chips such as MCP9804 and MCP9808, but also MCP9805,
      which is marked as JC42.4 compliant and suggested for use not only for
      DIMMS, but also as generic temperature sensor.
      
      Add I2C_CLASS_HWMON as an additional detection class to allow detection
      by hwmon class i2c adapters.
      
      Signed-off-by: default avatarAlison Schofield <amsfield22@gmail.com>
      Cc: Daniel Baluta <daniel.baluta@gmail.com>
      [groeck: Updated description]
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      eacc48ce
  4. Jun 28, 2016
  5. Jun 27, 2016
  6. Jun 25, 2016