1. 20 May, 2014 2 commits
  2. 16 May, 2014 16 commits
  3. 14 May, 2014 2 commits
    • Hans de Goede's avatar
      mvtwsi: Remove unnecessary twsi_baud_rate and twsi_slave_address globals · 2072e726
      Hans de Goede authored
      
      These are used only once, so their is no need to have them global.
      
      This also stops mvtwsi from using any bss vars making it easier to use
      before dram init (to talk to the pmic to set the dram voltage).
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      2072e726
    • Hans de Goede's avatar
      mvtwsi: Fix clock programming · fab356a0
      Hans de Goede authored
      
      The TWSI_FREQUENCY macro was wrong in 2 ways:
      1) It was casting the result of the calculations to an u8, while i2c clk
      rates are often >= 100Khz which won't fit in a u8, drop the cast.
      2) It had an extra factor of 2 in the divider which neither the datasheet nor
      the Linux driver have.
      
      The comment for the default value was wrongly saying that m lives in
      bits 4-7, while in reality it is in bits 3-6, as can be seen from the correct
      shift by 3 used in i2c_init().
      
      While at it remove the unused twsi_actual_speed variable.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      fab356a0
  4. 13 May, 2014 20 commits