linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org,
	davinci-linux-open-source@linux.davincidsp.com,
	linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
	linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH V2] i2c: move of helpers into the core
Date: Wed, 21 Aug 2013 16:46:48 +0200	[thread overview]
Message-ID: <5214D2D8.7010106@samsung.com> (raw)
In-Reply-To: <1377092832-3417-1-git-send-email-wsa@the-dreams.de>

On 08/21/2013 03:47 PM, Wolfram Sang wrote:
> I2C of helpers used to live in of_i2c.c but experience (from SPI) shows
> that it is much cleaner to have this in the core. This also removes a
> circular dependency between the helpers and the core, and so we can
> finally register child nodes in the core instead of doing this manually
> in each driver. So, fix the drivers and documentation, too.
> 
> Acked-by: Sylwester Nawrocki <s.nawrocki@amsung.com>
> Acked-by: Rob Herring <rob.herring@calxeda.com>
> Reviewed-by: Felipe Balbi <balbi@ti.com>
> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

With this patch there are still couple of of_i2c.h header file
inclusions:

$ git grep of_i2c.h
arch/powerpc/platforms/44x/warp.c:#include <linux/of_i2c.h>
drivers/gpu/drm/tilcdc/tilcdc_slave.c:#include <linux/of_i2c.h>
drivers/gpu/drm/tilcdc/tilcdc_tfp410.c:#include <linux/of_i2c.h>
drivers/gpu/host1x/drm/output.c:#include <linux/of_i2c.h>
drivers/media/platform/exynos4-is/fimc-is.c:#include <linux/of_i2c.h>
drivers/media/platform/exynos4-is/media-dev.c:#include <linux/of_i2c.h>
drivers/staging/imx-drm/imx-tve.c:#include <linux/of_i2c.h>
sound/soc/fsl/imx-sgtl5000.c:#include <linux/of_i2c.h>
sound/soc/fsl/imx-wm8962.c:#include <linux/of_i2c.h>


Please include also this chunk, without it I'm getting build errors.

--------------8<---------------------
diff --git a/drivers/media/platform/exynos4-is/fimc-is-i2c.c
b/drivers/media/platform/exynos4-is/fimc-is-i2c.c
index ca07b48..e38e9dc 100644
--- a/drivers/media/platform/exynos4-is/fimc-is-i2c.c
+++ b/drivers/media/platform/exynos4-is/fimc-is-i2c.c
@@ -11,6 +11,7 @@
  */

 #include <linux/clk.h>
+#include <linux/i2c.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
diff --git a/drivers/media/platform/exynos4-is/fimc-is.c
b/drivers/media/platform/exynos4-is/fimc-is.c
index 6743ae3..63e4f1d 100644
--- a/drivers/media/platform/exynos4-is/fimc-is.c
+++ b/drivers/media/platform/exynos4-is/fimc-is.c
@@ -21,7 +21,6 @@
 #include <linux/interrupt.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/of_i2c.h>
 #include <linux/of_irq.h>
 #include <linux/of_address.h>
 #include <linux/of_platform.h>
diff --git a/drivers/media/platform/exynos4-is/media-dev.c
b/drivers/media/platform/exynos4-is/media-dev.c
index c10dee2..00e5f91 100644
--- a/drivers/media/platform/exynos4-is/media-dev.c
+++ b/drivers/media/platform/exynos4-is/media-dev.c
@@ -22,7 +22,6 @@
 #include <linux/of.h>
 #include <linux/of_platform.h>
 #include <linux/of_device.h>
-#include <linux/of_i2c.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 #include <linux/types.h>
--------------8<---------------------

> ---
> 
> V1 -> V2: * Add #else branch to #if CONFIG_OF
> 	  * EXPORT_SYMBOLs got attached to wrong functions
> 	  * cosmetic change (of -> OF)
> 	  * properly based on 3.11-rc4
> 
>  Documentation/acpi/enumeration.txt              |    1 -
>  drivers/i2c/busses/i2c-at91.c                   |    3 -
>  drivers/i2c/busses/i2c-cpm.c                    |    6 --
>  drivers/i2c/busses/i2c-davinci.c                |    2 -
>  drivers/i2c/busses/i2c-designware-platdrv.c     |    2 -
>  drivers/i2c/busses/i2c-gpio.c                   |    3 -
>  drivers/i2c/busses/i2c-i801.c                   |    2 -
>  drivers/i2c/busses/i2c-ibm_iic.c                |    4 -
>  drivers/i2c/busses/i2c-imx.c                    |    3 -
>  drivers/i2c/busses/i2c-mpc.c                    |    2 -
>  drivers/i2c/busses/i2c-mv64xxx.c                |    3 -
>  drivers/i2c/busses/i2c-mxs.c                    |    3 -
>  drivers/i2c/busses/i2c-nomadik.c                |    3 -
>  drivers/i2c/busses/i2c-ocores.c                 |    3 -
>  drivers/i2c/busses/i2c-octeon.c                 |    3 -
>  drivers/i2c/busses/i2c-omap.c                   |    3 -
>  drivers/i2c/busses/i2c-pnx.c                    |    3 -
>  drivers/i2c/busses/i2c-powermac.c               |    9 +-
>  drivers/i2c/busses/i2c-pxa.c                    |    2 -
>  drivers/i2c/busses/i2c-s3c2410.c                |    2 -
>  drivers/i2c/busses/i2c-sh_mobile.c              |    2 -
>  drivers/i2c/busses/i2c-sirf.c                   |    3 -
>  drivers/i2c/busses/i2c-stu300.c                 |    2 -
>  drivers/i2c/busses/i2c-tegra.c                  |    3 -
>  drivers/i2c/busses/i2c-versatile.c              |    2 -
>  drivers/i2c/busses/i2c-wmt.c                    |    3 -
>  drivers/i2c/busses/i2c-xiic.c                   |    3 -
>  drivers/i2c/i2c-core.c                          |  109 +++++++++++++++++++++-
>  drivers/i2c/i2c-mux.c                           |    3 -
>  drivers/i2c/muxes/i2c-arb-gpio-challenge.c      |    1 -
>  drivers/i2c/muxes/i2c-mux-gpio.c                |    1 -
>  drivers/i2c/muxes/i2c-mux-pinctrl.c             |    1 -
>  drivers/media/platform/exynos4-is/fimc-is-i2c.c |    3 -
>  drivers/of/Kconfig                              |    6 --
>  drivers/of/Makefile                             |    1 -
>  drivers/of/of_i2c.c                             |  114 -----------------------
>  include/linux/i2c.h                             |   20 ++++
>  include/linux/of_i2c.h                          |   46 ---------
>  38 files changed, 132 insertions(+), 253 deletions(-)
>  delete mode 100644 drivers/of/of_i2c.c
>  delete mode 100644 include/linux/of_i2c.h

I've tested this patch on Exynos4412 SoC based board, so this covers
i2c-s3c2410 and fimc-is-i2c. Compiled with CONFIG_OF enabled.

I guess after removing all remaining occurrences of
#include <linux/of_i2c.h> you could add:

Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com>

--
Thanks,
Sylwester


      reply	other threads:[~2013-08-21 14:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-21 13:47 [PATCH V2] i2c: move of helpers into the core Wolfram Sang
2013-08-21 14:46 ` Sylwester Nawrocki [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5214D2D8.7010106@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).