Merge branch 'i2c/for-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 8 Sep 2015 23:16:26 +0000 (16:16 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 8 Sep 2015 23:16:26 +0000 (16:16 -0700)
Pull i2c updates from Wolfram Sang:
 "Features:

   - new drivers: Renesas EMEV2, register based MUX, NXP LPC2xxx
   - core: scans DT and assigns wakeup interrupts.  no driver changes needed.
   - core: some refcouting issues fixed and better API for that
   - core: new helper function for best effort block read emulation
   - slave framework: proper DT bindings and userspace instantiation
   - some bigger work for xiic, pxa, omap drivers

  .. and quite a number of smaller driver fixes, cleanups, improvements"

* 'i2c/for-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (65 commits)
  i2c: mux: reg Change ioread endianness for readback
  i2c: mux: reg: fix compilation warnings
  i2c: mux: reg: simplify register size checking
  i2c: muxes: fix leaked i2c adapter device node references
  i2c: allow specifying separate wakeup interrupt in device tree
  of/irq: export of_get_irq_byname()
  i2c: xgene-slimpro: dma_mapping_error() doesn't return an error code
  i2c: Replace I2C_CROS_EC_TUNNEL dependency
  eeprom: at24: use i2c_smbus_read_i2c_block_data_or_emulated
  i2c: core: Add support for best effort block read emulation
  i2c: lpc2k: add driver
  i2c: mux: Add register-based mux i2c-mux-reg
  i2c: dt: describe generic bindings
  i2c: slave: print warning if slave flag not set
  i2c: support 10 bit and slave addresses in sysfs 'new_device'
  i2c: take address space into account when checking for used addresses
  i2c: apply DT flags when probing
  i2c: make address check indpendent from client struct
  i2c: rename address check functions
  i2c: apply address offset for slaves, too
  ...

1  2 
drivers/misc/eeprom/max6875.c
drivers/of/irq.c

@@@ -114,6 -114,12 +114,6 @@@ static ssize_t max6875_read(struct fil
        struct max6875_data *data = i2c_get_clientdata(client);
        int slice, max_slice;
  
 -      if (off > USER_EEPROM_SIZE)
 -              return 0;
 -
 -      if (off + count > USER_EEPROM_SIZE)
 -              count = USER_EEPROM_SIZE - off;
 -
        /* refresh slices which contain requested bytes */
        max_slice = (off + count - 1) >> SLICE_BITS;
        for (slice = (off >> SLICE_BITS); slice <= max_slice; slice++)
@@@ -191,6 -197,7 +191,7 @@@ static const struct i2c_device_id max68
        { "max6875", 0 },
        { }
  };
+ MODULE_DEVICE_TABLE(i2c, max6875_id);
  
  static struct i2c_driver max6875_driver = {
        .driver = {
diff --combined drivers/of/irq.c
@@@ -18,7 -18,6 +18,7 @@@
   * driver.
   */
  
 +#include <linux/device.h>
  #include <linux/errno.h>
  #include <linux/list.h>
  #include <linux/module.h>
@@@ -432,6 -431,7 +432,7 @@@ int of_irq_get_byname(struct device_nod
  
        return of_irq_get(dev, index);
  }
+ EXPORT_SYMBOL_GPL(of_irq_get_byname);
  
  /**
   * of_irq_count - Count the number of IRQs a node uses
@@@ -577,23 -577,3 +578,23 @@@ err
                kfree(desc);
        }
  }
 +
 +/**
 + * of_msi_configure - Set the msi_domain field of a device
 + * @dev: device structure to associate with an MSI irq domain
 + * @np: device node for that device
 + */
 +void of_msi_configure(struct device *dev, struct device_node *np)
 +{
 +      struct device_node *msi_np;
 +      struct irq_domain *d;
 +
 +      msi_np = of_parse_phandle(np, "msi-parent", 0);
 +      if (!msi_np)
 +              return;
 +
 +      d = irq_find_matching_host(msi_np, DOMAIN_BUS_PLATFORM_MSI);
 +      if (!d)
 +              d = irq_find_host(msi_np);
 +      dev_set_msi_domain(dev, d);
 +}