Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 5 Sep 2013 16:31:03 +0000 (09:31 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 5 Sep 2013 16:31:03 +0000 (09:31 -0700)
Pull i2c updates from Wolfram Sang:
 "Highlights:

   - OF and ACPI helpers are now included in the core, and not in
     external files anymore.  This removes dependency problems for
     modules and is cleaner, in general.
   - mv64xxx-driver gains fifo usage to support mv78230
   - imx-driver overhaul to support VF610
   - various cleanups, most notably related to devm_* and CONFIG_PM
     usage
   - driver bugfixes and smaller feature additions"

* 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (51 commits)
  i2c: rcar: add rcar-H2 support
  i2c: sirf: retry 3 times as sometimes we get random noack and timeout
  i2c: sirf: support reverse direction of address
  i2c: sirf: fix the typo for setting bitrate to less than 100k
  i2c: sirf: we need to wait I2C_RESET status in resume
  i2c: sirf: reset i2c controller early after we get a noack
  i2c: designware: get SDA hold time, HCNT and LCNT configuration from ACPI
  i2c: designware: make HCNT/LCNT values configurable
  i2c: mpc: cleanup clock API use
  i2c: pnx: fix error return code in i2c_pnx_probe()
  i2c: ismt: add error return code in probe()
  i2c: mv64xxx: fix typo in binding documentation
  i2c: imx: use exact SoC revision to document binding
  i2c: move ACPI helpers into the core
  i2c: move OF helpers into the core
  i2c: mv64xxx: Fix timing issue on Armada XP (errata FE-8471889)
  i2c: mv64xxx: Add I2C Transaction Generator support
  i2c: powermac: fix return path on error
  Documentation: i2c: Fix example in instantiating-devices
  i2c: tiny-usb: do not use stack as URB transfer_buffer
  ...

1  2 
drivers/acpi/Kconfig
drivers/staging/imx-drm/imx-tve.c
sound/soc/fsl/imx-sgtl5000.c
sound/soc/fsl/imx-wm8962.c

diff --combined drivers/acpi/Kconfig
index 3278a210c435320df0e98a9dacbab2892b180176,4e0162fa5d360d3403d62312cfabd0c3888fb67d..22327e6a7236fc367313ec5acf45016d354863d4
@@@ -91,6 -91,24 +91,6 @@@ config ACPI_EC_DEBUGF
          Thus this option is a debug option that helps to write ACPI drivers
          and can be used to identify ACPI code or EC firmware bugs.
  
 -config ACPI_PROC_EVENT
 -      bool "Deprecated /proc/acpi/event support"
 -      depends on PROC_FS
 -      default y
 -      help
 -        A user-space daemon, acpid, typically reads /proc/acpi/event
 -        and handles all ACPI-generated events.
 -
 -        These events are now delivered to user-space either
 -        via the input layer or as netlink events.
 -
 -        This build option enables the old code for legacy
 -        user-space implementation.  After some time, this will
 -        be moved under CONFIG_ACPI_PROCFS, and then deleted.
 -
 -        Say Y here to retain the old behaviour.  Say N if your
 -        user-space is newer than kernel 2.6.23 (September 2007).
 -
  config ACPI_AC
        tristate "AC Adapter"
        depends on X86
@@@ -162,12 -180,6 +162,6 @@@ config ACPI_DOC
          This driver supports ACPI-controlled docking stations and removable
          drive bays such as the IBM Ultrabay and the Dell Module Bay.
  
- config ACPI_I2C
-       def_tristate I2C
-       depends on I2C
-       help
-         ACPI I2C enumeration support.
  config ACPI_PROCESSOR
        tristate "Processor"
        select THERMAL
index 3c024b40b4f88933ccc024a32feda9e173b17fa9,2d76fd47c3d7ef9c7007dff91444739f33c358bb..33d6525cf9960c5b4a36b2114a6f9fffc9ca7711
@@@ -21,7 -21,7 +21,7 @@@
  #include <linux/clk.h>
  #include <linux/clk-provider.h>
  #include <linux/module.h>
- #include <linux/of_i2c.h>
+ #include <linux/i2c.h>
  #include <linux/regmap.h>
  #include <linux/regulator/consumer.h>
  #include <linux/spinlock.h>
@@@ -131,14 -131,12 +131,14 @@@ struct imx_tve 
  };
  
  static void tve_lock(void *__tve)
 +__acquires(&tve->lock)
  {
        struct imx_tve *tve = __tve;
        spin_lock(&tve->lock);
  }
  
  static void tve_unlock(void *__tve)
 +__releases(&tve->lock)
  {
        struct imx_tve *tve = __tve;
        spin_unlock(&tve->lock);
@@@ -166,10 -164,7 +166,10 @@@ static void tve_enable(struct imx_tve *
                regmap_write(tve->regmap, TVE_INT_CONT_REG, 0);
        else
                regmap_write(tve->regmap, TVE_INT_CONT_REG,
 -                           TVE_CD_SM_IEN | TVE_CD_LM_IEN | TVE_CD_MON_END_IEN);
 +                           TVE_CD_SM_IEN |
 +                           TVE_CD_LM_IEN |
 +                           TVE_CD_MON_END_IEN);
 +
        spin_unlock_irqrestore(&tve->enable_lock, flags);
  }
  
@@@ -470,9 -465,7 +470,9 @@@ static int clk_tve_di_set_rate(struct c
        else
                val = TVE_DAC_FULL_RATE;
  
 -      ret = regmap_update_bits(tve->regmap, TVE_COM_CONF_REG, TVE_DAC_SAMP_RATE_MASK, val);
 +      ret = regmap_update_bits(tve->regmap, TVE_COM_CONF_REG,
 +                               TVE_DAC_SAMP_RATE_MASK, val);
 +
        if (ret < 0) {
                dev_err(tve->dev, "failed to set divider: %d\n", ret);
                return ret;
@@@ -616,17 -609,13 +616,17 @@@ static int imx_tve_probe(struct platfor
        }
  
        if (tve->mode == TVE_MODE_VGA) {
 -              ret = of_property_read_u32(np, "fsl,hsync-pin", &tve->hsync_pin);
 +              ret = of_property_read_u32(np, "fsl,hsync-pin",
 +                                         &tve->hsync_pin);
 +
                if (ret < 0) {
                        dev_err(&pdev->dev, "failed to get vsync pin\n");
                        return ret;
                }
  
 -              ret |= of_property_read_u32(np, "fsl,vsync-pin", &tve->vsync_pin);
 +              ret |= of_property_read_u32(np, "fsl,vsync-pin",
 +                                          &tve->vsync_pin);
 +
                if (ret < 0) {
                        dev_err(&pdev->dev, "failed to get vsync pin\n");
                        return ret;
        }
  
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 -      if (!res) {
 -              dev_err(&pdev->dev, "failed to get memory region\n");
 -              return -ENOENT;
 -      }
 -
        base = devm_ioremap_resource(&pdev->dev, res);
        if (IS_ERR(base))
                return PTR_ERR(base);
@@@ -749,4 -743,3 +749,4 @@@ module_platform_driver(imx_tve_driver)
  MODULE_DESCRIPTION("i.MX Television Encoder driver");
  MODULE_AUTHOR("Philipp Zabel, Pengutronix");
  MODULE_LICENSE("GPL");
 +MODULE_ALIAS("platform:imx-tve");
index 389cbfa6dca79d6100b34e64f57d6bc2514d20f8,f2fbde9c3d4cd07e8ec7195a99e4fee0e722ef52..46c5b4fdfc5298e61008032fe903c0191f886d31
@@@ -13,7 -13,7 +13,7 @@@
  #include <linux/module.h>
  #include <linux/of.h>
  #include <linux/of_platform.h>
- #include <linux/of_i2c.h>
+ #include <linux/i2c.h>
  #include <linux/clk.h>
  #include <sound/soc.h>
  
@@@ -129,10 -129,8 +129,10 @@@ static int imx_sgtl5000_probe(struct pl
        }
  
        data->codec_clk = devm_clk_get(&codec_dev->dev, NULL);
 -      if (IS_ERR(data->codec_clk))
 +      if (IS_ERR(data->codec_clk)) {
 +              ret = PTR_ERR(data->codec_clk);
                goto fail;
 +      }
  
        data->clk_frequency = clk_get_rate(data->codec_clk);
  
index 1d70e278e9154e7f21d1ba230b4f573ad5b31f95,9fd7a65ae83b3fd9125e279420f2fc4149749ae3..722afe69169e904798974115292159a89a08ba18
@@@ -15,7 -15,7 +15,7 @@@
  
  #include <linux/module.h>
  #include <linux/of_platform.h>
- #include <linux/of_i2c.h>
+ #include <linux/i2c.h>
  #include <linux/slab.h>
  #include <linux/clk.h>
  #include <sound/soc.h>
@@@ -217,8 -217,7 +217,8 @@@ static int imx_wm8962_probe(struct plat
        codec_dev = of_find_i2c_device_by_node(codec_np);
        if (!codec_dev || !codec_dev->driver) {
                dev_err(&pdev->dev, "failed to find codec platform device\n");
 -              return -EINVAL;
 +              ret = -EINVAL;
 +              goto fail;
        }
  
        data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);