13 Jan, 2012

1 commit

  • Convert static struct pci_device_id *[] to static DEFINE_PCI_DEVICE_TABLE
    tables.

    Use DEFINE_PCI_DEVICE_TABLE ensures we make the pci_device_id table const
    and marked as __devinitconst.

    This also fixes some warnings from checkpatch:
    e.g.
    WARNING: Use DEFINE_PCI_DEVICE_TABLE for struct pci_device_id
    #1096: FILE: i2c/busses/i2c-intel-mid.c:1096:
    +static struct pci_device_id intel_mid_i2c_ids[] = {

    Signed-off-by: Axel Lin
    Cc: Rudolf Marek
    Cc: Ben Dooks
    Acked-by: Olof Johansson
    Cc: "Mark M. Hoffman"
    Acked-by: Dirk Brandewie
    Cc: Tomoya MORINAGA
    Acked-by: Wolfram Sang
    Cc: Feng Tang
    Cc: Sebastian Andrzej Siewior
    Signed-off-by: Jean Delvare

    Axel Lin
     

02 Mar, 2010

1 commit

  • The id_table field of the struct pci_driver is constant in
    so it is worth to make initialization data also constant.

    The semantic match that finds this kind of pattern is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r@
    disable decl_init,const_decl_init;
    identifier I1, I2, x;
    @@
    struct I1 {
    ...
    const struct I2 *x;
    ...
    };
    @s@
    identifier r.I1, y;
    identifier r.x, E;
    @@
    struct I1 y = {
    .x = E,
    };
    @c@
    identifier r.I2;
    identifier s.E;
    @@
    const struct I2 E[] = ... ;
    @depends on !c@
    identifier r.I2;
    identifier s.E;
    @@
    + const
    struct I2 E[] = ...;
    //

    Signed-off-by: Márton Németh
    Cc: Julia Lawall
    Signed-off-by: Jean Delvare

    Márton Németh
     

17 Jan, 2010

1 commit

  • Remove the following sparse warnings (see "make C=1"):
    * drivers/i2c/busses/i2c-ali1563.c:91:3: warning: do-while statement
    is not a compound statement
    * drivers/i2c/busses/i2c-ali1563.c:161:3: warning: do-while statement
    is not a compound statement

    Signed-off-by: Márton Németh
    Signed-off-by: Jean Delvare

    Márton Németh
     

27 Jan, 2009

1 commit


07 Jan, 2009

1 commit


15 Jul, 2008

4 commits

  • Check for ACPI resource conflicts in i2c bus drivers. I've included
    all recent SMBus master drivers for PC hardware.

    I've voluntarily left out:
    * Drivers that don't run on PCs: they can't conflict with ACPI.
    * Bit-banged bus device drivers: it's very unlikely that ACPI would
    deal with such buses.

    Signed-off-by: Jean Delvare

    Jean Delvare
     
  • Let general purpose I2C/SMBus bus drivers add SPD to their class. Once
    this is done, we will be able to tell the eeprom driver to only probe
    for SPD EEPROMs and similar on these buses.

    Note that I took a conservative approach here, adding I2C_CLASS_SPD to
    many drivers that have no idea whether they can host SPD EEPROMs or not.
    This is to make sure that the eeprom driver doesn't stop probing buses
    where SPD EEPROMs or equivalent live.

    So, bus driver maintainers and users should feel free to remove the SPD
    class from drivers those buses never have SPD EEPROMs or they don't
    want the eeprom driver to bind to them. Likewise, feel free to add the
    SPD class to any bus driver I might have missed.

    Signed-off-by: Jean Delvare

    Jean Delvare
     
  • Many PC SMBus host controller drivers don't properly handle the case
    where they are requested to achieve a transaction they do not support.
    Update them so that the consistently print a warning message and
    return a single error value in this case.

    Signed-off-by: Jean Delvare

    Jean Delvare
     
  • Tighten error paths used by various i2c adapters (mostly x86) so
    they return real fault/errno codes instead of a "-1" (which is
    most often interpreted as "-EPERM"). Build tested, with eyeball
    review.

    One minor initial goal is to have adapters consistently return
    the code "-ENXIO" when addressing a device doesn't get an ACK
    response, at least in the probe paths where they are already
    good at stifling related logspam.

    Signed-off-by: David Brownell
    Signed-off-by: Jean Delvare

    David Brownell
     

14 Feb, 2007

3 commits

  • IDs have been defined but not used by most of the I2C adapters.
    By having a unique ID, clients can check for correct connection
    during probe.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Jean Delvare

    Stephen Hemminger
     
  • The i2c-ali1563 initialization looks quite broken to me:
    * If the I/O space isn't enabled, we forcibly set 3 bits in
    the PCI configuration space instead of just the one enabling
    the I/O space.
    * After that we pretend to check if the write worked, but we
    don't actually read the new value from the register.
    * It's probably not a good idea to enable the I/O space if no
    base address has been set.

    So I propose the following changes to that part of the driver:
    * Merge ali1563_enable() into ali1563_setup().
    * Check the base address before the I/O space enabled bit.

    Signed-off-by: Jean Delvare
    Acked-by: Rudolf Marek

    Jean Delvare
     
  • Improve the status messages printed by the i2c-ali1563 driver.

    Signed-off-by: Jean Delvare
    Cc: Rudolf Marek

    Jean Delvare
     

13 Dec, 2006

1 commit


27 Sep, 2006

1 commit


11 Nov, 2005

1 commit


29 Oct, 2005

2 commits

  • This patch updates .owner field for various struct pci_driver variables.

    Signed-off-by: Laurent Riffard
    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Laurent Riffard
     
  • Clean up name string usage in 12 i2c bus drivers:
    * Use the i2c_adapter name for requesting the I/O region rather than
    redefining a new string.
    * Do not initialize the i2c_adapter name to "unset".
    This should save a few data bytes here and there.

    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    drivers/i2c/busses/i2c-ali1535.c | 6 +++---
    drivers/i2c/busses/i2c-ali1563.c | 6 ++++--
    drivers/i2c/busses/i2c-ali15x3.c | 5 +++--
    drivers/i2c/busses/i2c-amd756.c | 5 ++---
    drivers/i2c/busses/i2c-amd8111.c | 4 +++-
    drivers/i2c/busses/i2c-i801.c | 4 ++--
    drivers/i2c/busses/i2c-nforce2.c | 4 ++--
    drivers/i2c/busses/i2c-piix4.c | 4 ++--
    drivers/i2c/busses/i2c-sis5595.c | 5 +++--
    drivers/i2c/busses/i2c-sis630.c | 6 ++++--
    drivers/i2c/busses/i2c-sis96x.c | 5 +++--
    drivers/i2c/busses/i2c-via.c | 4 ++--
    12 files changed, 33 insertions(+), 25 deletions(-)

    Jean Delvare
     

06 Sep, 2005

2 commits


01 Jun, 2005

1 commit

  • This patch fixes "grave" bugs in i2c-ali1563 driver. It seems on recent
    chipset revisions the HSTS_DONE is set only for block transfers, so we
    must detect the end of ordinary transaction other way. Also due to missing
    and mask, setting other transfer modes was not possible. Moreover the
    continous byte mode transfer uses DAT0 for command rather than CMD command.
    All those changes were tested with help of Chunhao Huang from Winbond.

    I'm willing to maintain the driver. Second patch adds me as maintainer
    if this is neccessary.

    Signed-Off-By: Rudolf Marek
    Signed-off-by: Greg Kroah-Hartman

    R.Marek@sh.cvut.cz
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds