26 May, 2009

1 commit


13 May, 2009

2 commits


12 May, 2009

3 commits


05 May, 2009

3 commits

  • Currently, the i2c-algo-pca driver does nothing if the chip enters state
    0x30 (Data byte in I2CDAT has been transmitted; NOT ACK has been
    received). Thus, the i2c bus connected to the controller gets stuck
    afterwards.

    I have seen this kind of error on a custom board in certain load
    situations most probably caused by interference or noise.

    A possible reaction is to let the controller generate a STOP condition.
    This is documented in the PCA9564 data sheet (2006-09-01) and the same
    is done for other NACK states as well.

    Further, state 0x38 isn't handled completely, either. Try to do another
    START in this case like the data sheet says. As this couldn't be tested,
    I've added a comment to try to reset the chip if the START doesn't help
    as suggested by Wolfram Sang.

    Signed-off-by: Enrik Berkhan
    Reviewed-by: Wolfram Sang
    Signed-off-by: Jean Delvare

    Enrik Berkhan
     
  • When fetching DDC using i2c algo bit, we were often seeing timeouts
    before getting valid EDID on a retry. The VESA spec states 2ms is the
    DDC timeout, so when this translates into 1 jiffie and we are close
    to the end of the time period, it could return with a timeout less than
    2ms.

    Change this code to use time_after instead of time_after_eq.

    Signed-off-by: Dave Airlie
    Signed-off-by: Jean Delvare

    Dave Airlie
     
  • with while (timeout++ < MAX_TIMEOUT); timeout reaches MAX_TIMEOUT + 1
    after the loop, so the tests below are off by one.

    Signed-off-by: Roel Kluin
    Signed-off-by: Jean Delvare

    Roel Kluin
     

04 May, 2009

1 commit


13 Apr, 2009

3 commits


07 Apr, 2009

11 commits

  • 'disable_delay' was static which is wrong as it is calculated using the per-device
    bus speed. This patch turns 'disable_delay' into a per-device variable.

    Reported-by: Sascha Hauer
    Signed-off-by: Wolfram Sang
    Acked-by: Guennadi Liakhovetski
    Acked-by: Darius Augulis
    Signed-off-by: Ben Dooks

    Wolfram Sang
     
  • Support for the s6000 on-chip i2c controller.

    Signed-off-by: Oskar Schirmer
    Signed-off-by: Daniel Glöckner
    Signed-off-by: Ben Dooks

    Oskar Schirmer
     
  • This patch makes the I2C bus speed configurable by using the I2C node
    property "clock-frequency". If the property is not defined, the old
    fixed clock settings will be used for backward comptibility.

    The generic I2C clock properties, especially the CPU-specific source
    clock pre-scaler are defined via the OF match table:

    static const struct of_device_id mpc_i2c_of_match[] = {
    ...
    {.compatible = "fsl,mpc8543-i2c",
    .data = &(struct fsl_i2c_match_data) {
    .setclock = mpc_i2c_setclock_8xxx,
    .prescaler = 2,
    },
    },

    The "data" field defines the relevant I2C setclock function and the
    relevant pre-scaler for the I2C source clock frequency.

    It uses arch-specific tables and functions to determine resonable
    Freqency Divider Register (fdr) values for MPC83xx, MPC85xx, MPC86xx,
    MPC5200 and MPC5200B.

    The i2c->flags field and the corresponding FSL_I2C_DEV_* definitions
    have been removed as they are obsolete.

    Signed-off-by: Wolfgang Grandegger
    Signed-off-by: Ben Dooks

    Wolfgang Grandegger
     
  • This patch used the dev_dbg, dev_err, etc. functions for debug
    and error output instead of printk and pr_debug.

    Signed-off-by: Wolfgang Grandegger
    Signed-off-by: Ben Dooks

    Wolfgang Grandegger
     
  • Fix errors reported by checkpatch (indention, long lines, trailing
    white space, etc.).

    Signed-off-by: Wolfgang Grandegger
    Signed-off-by: Ben Dooks

    Wolfgang Grandegger
     
  • Signed-off-by: Darius Augulis
    [ben-linux@fluff.org: fix minor patch fault in remove]
    Signed-off-by: Ben Dooks

    Darius Augulis
     
  • This is required in order to ensure that core system devices such as
    voltage regulators attached via I2C are avaiable early in boot.

    Signed-off-by: Mark Brown
    Signed-off-by: Ben Dooks

    Mark Brown
     
  • The platform data for the i2c-s3c2410 driver used to allow a min,
    max and desired frequency for the I2C bus. This patch reduces it
    to simply a desired frequency ceiling and corrects all the uses
    of the platform data appropriately.

    This means, for example, that on a system with a 66MHz fclk, a
    request for 100KHz will achieve 65KHz which is safe and
    acceptable, rather than 378KHz which it would have achieved
    without this change.

    Signed-off-by: Simtec Linux Team
    Signed-off-by: Daniel Silverstone
    [ben-linux@fluff.org: tidy subject and description]
    Signed-off-by: Ben Dooks

    Daniel Silverstone
     
  • The sda_delay field should be specified in ns, not in clock ticks
    as when using cpufreq we could be changing the bus rate.

    Signed-off-by: Ben Dooks

    Ben Dooks
     
  • Implementation of I2C Adapter/Algorithm Driver for I2C Bus integrated
    in Freescale's i.MX/MXC processors.

    Signed-off-by: Darius Augulis
    Tested-by: Sascha Hauer
    Reviewed-by: Wolfram Sang
    Signed-off-by: Ben Dooks

    Darius Augulis
     
  • The i2c-algo-sgi code was merged into the vino driver, so we can
    delete it now.

    Signed-off-by: Jean Delvare

    Jean Delvare
     

31 Mar, 2009

3 commits

  • * 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
    hwmon: (fschmd) Add support for the FSC Hades IC
    hwmon: (fschmd) Add support for the FSC Syleus IC
    i2c-i801: Instantiate FSC hardware montioring chips
    dmi: Let dmi_walk() users pass private data
    hwmon: Define a standard interface for chassis intrusion detection
    Move the pcf8591 driver to hwmon
    hwmon: (w83627ehf) Only expose in6 or temp3 on the W83667HG
    hwmon: (w83627ehf) Add support for W83667HG
    hwmon: (w83627ehf) Invert fan pin variables logic
    hwmon: (hdaps) Fix Thinkpad X41 axis inversion
    hwmon: (hdaps) Allow inversion of separate axis
    hwmon: (ds1621) Clean up documentation
    hwmon: (ds1621) Avoid unneeded register access
    hwmon: (ds1621) Clean up register access
    hwmon: (ds1621) Reorder code statements

    Linus Torvalds
     
  • Detect various FSC hwmon IC's based on DMI tables and then let
    the i2c-i801 driver instantiate the i2c client devices. Note that
    some of the info in the added table is indentical for all rows, still
    this is kept in the table to keep the code general and thus (hopefully)
    easily extensible in the future.

    Signed-off-by: Hans de Goede
    Signed-off-by: Jean Delvare

    Hans de Goede
     
  • Directory drivers/i2c/chips is going away, so drivers there must find
    new homes. For the pcf8591 driver, the best choice seems to be the
    hwmon subsystem. While the Philips PCF8591 device isn't a typical
    hardware monitoring chip, its DAC interface is compatible with the
    hwmon one, so it fits somewhat.

    If a better subsystem is ever created for ADC/DAC chips, the driver
    could be moved there.

    Signed-off-by: Jean Delvare
    Cc: Aurelien Jarno

    Jean Delvare
     

30 Mar, 2009

1 commit


29 Mar, 2009

12 commits

  • * 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
    i2c-core: Some style cleanups
    i2c-piix4: Add support for the Broadcom HT1100 chipset
    i2c-piix4: Add support to SB800 SMBus changes
    i2c-pca-platform: Use defaults if no platform_data given
    i2c-algo-pca: Use timeout for checking the state machine
    i2c-algo-pca: Rework waiting for a free bus
    i2c-algo-pca: Add PCA9665 support
    i2c: Adapt debug macros for KERN_* constants
    i2c-davinci: Fix timeout handling
    i2c: Adapter timeout is in jiffies
    i2c: Set a default timeout value for all adapters
    i2c: Add missing KERN_* constants to printks
    i2c-algo-pcf: Handle timeout correctly
    i2c-algo-pcf: Style cleanups
    eeprom/at24: Remove EXPERIMENTAL
    i2c-nforce2: Add support for MCP67, MCP73, MCP78S and MCP79
    i2c: Clarify which clients are auto-removed
    i2c: Let checkpatch shout on users of the legacy model
    i2c: Document the different ways to instantiate i2c devices

    Linus Torvalds
     
  • Some lines over 80.
    The printk(KERN_ERR ... ) should be dev_err.
    And some blankspace should be deleted.

    Signed-off-by: Zhenwen Xu
    Signed-off-by: Jean Delvare

    Zhenwen Xu
     
  • Add support for the Broadcom HT1100 LD chipset (SMBus function.)

    Signed-off-by: Flavio Leitner
    Signed-off-by: Jean Delvare

    Flavio Leitner
     
  • Add support for the AMD SB800 Family series of products.
    Major changes include the changes to addressing the SMBus registers at different
    location from the locations in the previous compatible parts from AMD such as
    SB400/SB600/SB700. For SB800, the main features and register definitions of
    SMBus and other interfaces are still compatible with the previous products with
    the only change being in how to access the internal registers for these blocks.

    Signed-off-by: Shane Huang
    Signed-off-by: Jean Delvare

    Shane Huang
     
  • Signed-off-by: Wolfram Sang
    Signed-off-by: Jean Delvare

    Wolfram Sang
     
  • We now timeout also if the state machine does not change within the
    given time. For that, the driver-specific completion-functions are
    extended to return true or false depending on the timeout. This then
    gets checked in the algorithm.

    Signed-off-by: Wolfram Sang
    Signed-off-by: Jean Delvare

    Wolfram Sang
     
  • Waiting for a free bus now accepts the timeout value in jiffies and does
    proper checking using time_before.

    Signed-off-by: Wolfram Sang
    Signed-off-by: Jean Delvare

    Wolfram Sang
     
  • Add support for the PCA9665 I2C controller.

    Signed-off-by: Wolfram Sang
    Signed-off-by: Jean Delvare

    Marco Aurelio da Costa
     
  • According to kerneljanitors todo list all printk calls (beginning
    a new line) should have an according KERN_* constant.
    Those are the changes to the debug macros in the i2c subsystem
    to meet this requirement. Also changing no-debug statements
    to raw printks again.

    Signed-off-by: Frank Seidel
    Signed-off-by: Jean Delvare
    Tested-by: Wolfram Sang

    Frank Seidel
     
  • Properly set the adapter timeout value in jiffies, and then use that
    value in the driver, rather than a hard-coded constant.

    Signed-off-by: Jean Delvare
    Tested-by: Troy Kisky
    Cc: Kevin Hilman

    Jean Delvare
     
  • i2c_adapter.timeout is in jiffies. Fix all drivers which thought
    otherwise. It didn't really matter as long as the value was only used
    inside the driver, but soon i2c-core will use it too so it must have
    the proper unit.

    Note: for the i2c-mpc driver, this fixes a bug in polling mode.
    Timeout would trigger after 1 jiffy, which is most probably not what
    the author wanted.

    Signed-off-by: Jean Delvare
    Cc: Clifford Wolf
    Acked-by: Sean MacLennan
    Cc: Stefan Roese
    Acked-by: Lennert Buytenhek
    Cc: Dan Williams
    Cc: Grant Likely
    Acked-by: Mark A. Greer

    Jean Delvare
     
  • Setting a default timeout value on a per-algo basis doesn't make any
    sense. Move the default value setting to i2c-core. Individual adapter
    drivers can specify a different (non-zero) value if they wish.

    Also express the timeout value in a way which results in the same
    duration regarless of the value of HZ.

    Signed-off-by: Jean Delvare
    Acked-by: Wolfram Sang

    Jean Delvare