]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Jul 2008 18:16:05 +0000 (11:16 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Jul 2008 18:16:05 +0000 (11:16 -0700)
* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6: (56 commits)
  i2c: Add detection capability to new-style drivers
  i2c: Call client_unregister for new-style devices too
  i2c: Clean up old chip drivers
  i2c-ibm_iic: Register child nodes
  i2c: New-style EEPROM driver using device IDs
  i2c: Export the i2c_bus_type symbol
  i2c-au1550: Fix PM support
  i2c-dev: Delete empty detach_client callback
  i2c: Drop stray references to lm_sensors
  i2c: Check for ACPI resource conflicts
  i2c-ocores: basic PM support
  i2c-sibyte: SWARM I2C board initialization
  i2c-i801: Fix handling of error conditions
  i2c-i801: Rename local variable temp to status
  i2c-i801: Properly report bus arbitration loss
  i2c-i801: Remove verbose debugging messages
  i2c-algo-pcf: Drop unused struct members
  i2c-algo-pcf: Multi-master lost-arbitration improvement
  i2c: Deprecate the legacy gpio drivers
  i2c-pxa: Initialize early
  ...

1  2 
MAINTAINERS
drivers/i2c/busses/i2c-pxa.c
drivers/i2c/i2c-dev.c

diff --combined MAINTAINERS
index 1528e58b540829a110eba85ad8bd0e5bea4a4c41,dd20fe31ea4494e4adb01283a4122484391daa33..6198fa3deb9979b9c154677ce47a10ea72d91164
@@@ -376,12 -376,6 +376,12 @@@ L:       linux-geode@lists.infradead.org (mod
  W:    http://www.amd.com/us-en/ConnectivitySolutions/TechnicalResources/0,,50_2334_2452_11363,00.html
  S:    Supported
  
 +AMD IOMMU (AMD-VI)
 +P:    Joerg Roedel
 +M:    joerg.roedel@amd.com
 +L:    iommu@lists.linux-foundation.org
 +S:    Supported
 +
  AMS (Apple Motion Sensor) DRIVER
  P:    Stelian Pop
  M:    stelian@popies.net
@@@ -1686,6 -1680,13 +1686,13 @@@ L:    linuxppc-embedded@ozlabs.or
  L:    linux-kernel@vger.kernel.org
  S:    Maintained
  
+ FREESCALE I2C CPM DRIVER
+ P:    Jochen Friedrich
+ M:    jochen@scram.de
+ L:    linuxppc-dev@ozlabs.org
+ L:    i2c@lm-sensors.org
+ S:    Maintained
  FREESCALE SOC FS_ENET DRIVER
  P:    Pantelis Antoniou
  M:    pantelis.antoniou@gmail.com
index dde6ce963a1963efeeeecb284ad4031a0275bc2d,78c0fc42bc735af653ef9d85590dea073a10aa89..af9e6034d7fbda7c51ce0925a7a0707d974d82a1
@@@ -39,6 -39,7 +39,6 @@@
  #include <asm/io.h>
  #include <asm/arch/i2c.h>
  #include <asm/arch/pxa-regs.h>
 -#include <asm/arch/pxa2xx-gpio.h>
  
  struct pxa_i2c {
        spinlock_t              lock;
@@@ -944,6 -945,32 +944,6 @@@ static const struct i2c_algorithm i2c_p
        .functionality  = i2c_pxa_functionality,
  };
  
 -static void i2c_pxa_enable(struct platform_device *dev)
 -{
 -      if (cpu_is_pxa27x()) {
 -              switch (dev->id) {
 -              case 0:
 -                      pxa_gpio_mode(GPIO117_I2CSCL_MD);
 -                      pxa_gpio_mode(GPIO118_I2CSDA_MD);
 -                      break;
 -              case 1:
 -                      local_irq_disable();
 -                      PCFR |= PCFR_PI2CEN;
 -                      local_irq_enable();
 -                      break;
 -              }
 -      }
 -}
 -
 -static void i2c_pxa_disable(struct platform_device *dev)
 -{
 -      if (cpu_is_pxa27x() && dev->id == 1) {
 -              local_irq_disable();
 -              PCFR &= ~PCFR_PI2CEN;
 -              local_irq_enable();
 -      }
 -}
 -
  #define res_len(r)            ((r)->end - (r)->start + 1)
  static int i2c_pxa_probe(struct platform_device *dev)
  {
  #endif
  
        clk_enable(i2c->clk);
 -      i2c_pxa_enable(dev);
  
        if (plat) {
                i2c->adap.class = plat->class;
@@@ -1052,6 -1080,7 +1052,6 @@@ eadapt
                free_irq(irq, i2c);
  ereqirq:
        clk_disable(i2c->clk);
 -      i2c_pxa_disable(dev);
        iounmap(i2c->reg_base);
  eremap:
        clk_put(i2c->clk);
@@@ -1074,6 -1103,7 +1074,6 @@@ static int __exit i2c_pxa_remove(struc
  
        clk_disable(i2c->clk);
        clk_put(i2c->clk);
 -      i2c_pxa_disable(dev);
  
        iounmap(i2c->reg_base);
        release_mem_region(i2c->iobase, i2c->iosize);
@@@ -1104,5 -1134,5 +1104,5 @@@ static void __exit i2c_adap_pxa_exit(vo
  MODULE_LICENSE("GPL");
  MODULE_ALIAS("platform:pxa2xx-i2c");
  
module_init(i2c_adap_pxa_init);
subsys_initcall(i2c_adap_pxa_init);
  module_exit(i2c_adap_pxa_exit);
diff --combined drivers/i2c/i2c-dev.c
index 006a5857256a15b9cebab931d5c9489a62ed891d,50df53640c78562688900611f0d8e038b5b27b18..86727fa8858fcf808a1a1373efe0ecc46a2e5678
@@@ -34,7 -34,6 +34,7 @@@
  #include <linux/list.h>
  #include <linux/i2c.h>
  #include <linux/i2c-dev.h>
 +#include <linux/smp_lock.h>
  #include <asm/uaccess.h>
  
  static struct i2c_driver i2cdev_driver;
@@@ -367,8 -366,7 +367,7 @@@ static noinline int i2cdev_ioctl_smbus(
        return res;
  }
  
- static int i2cdev_ioctl(struct inode *inode, struct file *file,
-               unsigned int cmd, unsigned long arg)
+ static long i2cdev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
  {
        struct i2c_client *client = (struct i2c_client *)file->private_data;
        unsigned long funcs;
@@@ -442,20 -440,14 +441,20 @@@ static int i2cdev_open(struct inode *in
        struct i2c_client *client;
        struct i2c_adapter *adap;
        struct i2c_dev *i2c_dev;
 +      int ret = 0;
  
 +      lock_kernel();
        i2c_dev = i2c_dev_get_by_minor(minor);
 -      if (!i2c_dev)
 -              return -ENODEV;
 +      if (!i2c_dev) {
 +              ret = -ENODEV;
 +              goto out;
 +      }
  
        adap = i2c_get_adapter(i2c_dev->adap->nr);
 -      if (!adap)
 -              return -ENODEV;
 +      if (!adap) {
 +              ret = -ENODEV;
 +              goto out;
 +      }
  
        /* This creates an anonymous i2c_client, which may later be
         * pointed to some address using I2C_SLAVE or I2C_SLAVE_FORCE.
        client = kzalloc(sizeof(*client), GFP_KERNEL);
        if (!client) {
                i2c_put_adapter(adap);
 -              return -ENOMEM;
 +              ret = -ENOMEM;
 +              goto out;
        }
        snprintf(client->name, I2C_NAME_SIZE, "i2c-dev %d", adap->nr);
        client->driver = &i2cdev_driver;
        client->adapter = adap;
        file->private_data = client;
  
 -      return 0;
 +out:
 +      unlock_kernel();
 +      return ret;
  }
  
  static int i2cdev_release(struct inode *inode, struct file *file)
@@@ -497,7 -486,7 +496,7 @@@ static const struct file_operations i2c
        .llseek         = no_llseek,
        .read           = i2cdev_read,
        .write          = i2cdev_write,
-       .ioctl          = i2cdev_ioctl,
+       .unlocked_ioctl = i2cdev_ioctl,
        .open           = i2cdev_open,
        .release        = i2cdev_release,
  };
@@@ -559,19 -548,12 +558,12 @@@ static int i2cdev_detach_adapter(struc
        return 0;
  }
  
- static int i2cdev_detach_client(struct i2c_client *client)
- {
-       return 0;
- }
  static struct i2c_driver i2cdev_driver = {
        .driver = {
                .name   = "dev_driver",
        },
-       .id             = I2C_DRIVERID_I2CDEV,
        .attach_adapter = i2cdev_attach_adapter,
        .detach_adapter = i2cdev_detach_adapter,
-       .detach_client  = i2cdev_detach_client,
  };
  
  /* ------------------------------------------------------------------------- */