From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
To: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH 10/12] [media] move i2c files into drivers/media/i2c
Date: Sat, 25 Aug 2012 01:44:44 +0200 [thread overview]
Message-ID: <503811EC.8030808@gmail.com> (raw)
In-Reply-To: <1345038500-28734-11-git-send-email-mchehab@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 3092 bytes --]
Hi Mauro,
On 08/15/2012 03:48 PM, Mauro Carvalho Chehab wrote:
> Move ancillary I2C drivers into drivers/media/i2c, in order to
> better organize them.
>
> Signed-off-by: Mauro Carvalho Chehab<mchehab@redhat.com>
> ---
> drivers/media/Kconfig | 9 +-
> drivers/media/Makefile | 2 +-
> drivers/media/i2c/Kconfig | 566 ++++++++++++++++++++
> drivers/media/i2c/Makefile | 63 +++
> drivers/media/{video => i2c}/adp1653.c | 2 +-
...
> rename drivers/media/{video => i2c}/wm8775.c (100%)
>
> diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
> index c9cdc61..26f3de5 100644
> --- a/drivers/media/Kconfig
> +++ b/drivers/media/Kconfig
> @@ -151,18 +151,15 @@ source "drivers/media/rc/Kconfig"
>
> source "drivers/media/tuners/Kconfig"
>
> +source "drivers/media/i2c/Kconfig"
> +
> #
> -# Video/Radio/Hybrid adapters
> +# V4L platform/mem2mem drivers
> #
> -
> source "drivers/media/video/Kconfig"
>
> source "drivers/media/radio/Kconfig"
>
> -#
> -# DVB adapters
> -#
> -
> source "drivers/media/pci/Kconfig"
> source "drivers/media/usb/Kconfig"
> source "drivers/media/mmc/Kconfig"
> diff --git a/drivers/media/Makefile b/drivers/media/Makefile
> index 360c44d..e1be196 100644
> --- a/drivers/media/Makefile
> +++ b/drivers/media/Makefile
> @@ -9,7 +9,7 @@ ifeq ($(CONFIG_MEDIA_CONTROLLER),y)
> endif
>
> obj-y += tuners/ common/ rc/ video/
> -obj-y += pci/ usb/ mmc/ firewire/ parport/
> +obj-y += i2c/ pci/ usb/ mmc/ firewire/ parport/
That way all i2c drivers won't be linked before bridge drivers, which
causes failure of sensor subdev registration. There was a comment
about it in the original Makefile, please see further below.
This issue have already shown up for me in a real system,
[ 1.075000] s3c_camif_driver_init:633
[ 1.080000] s3c-camif s3c2440-camif: sensor clock frequency: 12000000
[ 1.090000] s3c-camif: failed to acquire subdev OV9650
[ 1.095000] platform s3c2440-camif: Driver s3c-camif requests probe deferral
[ 1.100000] ov965x_i2c_driver_init:820
I've attached a patch to fix this issue.
> obj-$(CONFIG_VIDEO_DEV) += radio/ v4l2-core/
> obj-$(CONFIG_DVB_CORE) += dvb-core/ dvb-frontends/
[snip]
> diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
> index a0c6692..52a04fa 100644
> --- a/drivers/media/video/Makefile
> +++ b/drivers/media/video/Makefile
> @@ -2,73 +2,9 @@
> # Makefile for the video capture/playback device drivers.
> #
>
> -msp3400-objs := msp3400-driver.o msp3400-kthreads.o
> -
> omap2cam-objs := omap24xxcam.o omap24xxcam-dma.o
>
> -# Helper modules
> -
> -obj-$(CONFIG_VIDEO_APTINA_PLL) += aptina-pll.o
> -
> -# All i2c modules must come first:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
This is currently not preserved ----+
> -obj-$(CONFIG_VIDEO_TVAUDIO) += tvaudio.o
> -obj-$(CONFIG_VIDEO_TDA7432) += tda7432.o
> -obj-$(CONFIG_VIDEO_SAA6588) += saa6588.o
--
Regards,
Sylwester
[-- Attachment #2: 0001-media-Fix-link-order-of-the-V4L2-bridge-and-I2C-modu.patch --]
[-- Type: text/x-patch, Size: 1374 bytes --]
>From ca02e4cba9f400a0066f2875c2fe4284bc8e06dc Mon Sep 17 00:00:00 2001
From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Date: Sat, 25 Aug 2012 01:23:14 +0200
Subject: [PATCH] [media] Fix link order of the V4L2 bridge and I2C modules
All I2C modules must be linked first to ensure proper module
initialization order. With platform devices linked before I2C
modules I2C subdev registration fails as the subdev drivers
are not yet initialized during bridge driver's probing.
This fixes regression introduced with commmit cb7a01ac324bf2ee2,
"[media] move i2c files into drivers/media/i2c".
Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
drivers/media/Makefile | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/media/Makefile b/drivers/media/Makefile
index b0b0193..92a8bcf 100644
--- a/drivers/media/Makefile
+++ b/drivers/media/Makefile
@@ -8,8 +8,9 @@ ifeq ($(CONFIG_MEDIA_CONTROLLER),y)
obj-$(CONFIG_MEDIA_SUPPORT) += media.o
endif
-obj-y += tuners/ common/ rc/ platform/
-obj-y += i2c/ pci/ usb/ mmc/ firewire/ parport/
+obj-$(CONFIG_VIDEO_DEV) += v4l2-core/
+obj-y += common/ rc/ i2c/
+obj-y += tuners/ platform/ pci/ usb/ mmc/ firewire/ parport/
-obj-$(CONFIG_VIDEO_DEV) += radio/ v4l2-core/
+obj-$(CONFIG_VIDEO_DEV) += radio/
obj-$(CONFIG_DVB_CORE) += dvb-core/ dvb-frontends/
--
1.7.4.1
next prev parent reply other threads:[~2012-08-24 23:44 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-14 20:55 [PATCH 00/12] media tree reorganization part 2 (second version) Mauro Carvalho Chehab
2012-08-14 20:55 ` [PATCH 05/12] [media] move analog PCI saa7146 drivers to its own dir Mauro Carvalho Chehab
2012-08-14 20:55 ` =?true?q?=5BPATCH=2006/12=5D=20=5Bmedia=5D=20move=20the=20remaining=20PCI=20devices=20to=20drivers/media/pci?= Mauro Carvalho Chehab
2012-08-14 20:55 ` [PATCH 07/12] [media] move parallel port/isa video drivers to drivers/media/parport/ Mauro Carvalho Chehab
2012-08-14 20:55 ` [PATCH 08/12] [media] mmc/Kconfig: Improve driver name for siano mmc/sdio driver Mauro Carvalho Chehab
2012-08-14 20:55 ` [PATCH 09/12] [media] reorganize the API core items Mauro Carvalho Chehab
2012-08-14 21:17 ` [PATCH 00/12] media tree reorganization part 2 (second version) Sylwester Nawrocki
2012-08-15 13:48 ` Mauro Carvalho Chehab
2012-08-15 13:48 ` [PATCH 01/12] [media] rename most media/video usb drivers to media/usb Mauro Carvalho Chehab
2012-08-15 13:48 ` [PATCH 02/12] [media] move the remaining USB drivers to drivers/media/usb Mauro Carvalho Chehab
2012-08-15 13:48 ` [PATCH 03/12] [media] bt8xx: move analog TV part to be together with DTV one Mauro Carvalho Chehab
2012-08-15 13:48 ` [PATCH 04/12] [media] rename most media/video pci drivers to media/pci Mauro Carvalho Chehab
2012-08-15 13:48 ` [PATCH 05/12] [media] move analog PCI saa7146 drivers to its own dir Mauro Carvalho Chehab
2012-08-15 13:48 ` [PATCH 06/12] [media] move the remaining PCI devices to drivers/media/pci Mauro Carvalho Chehab
2012-08-15 13:48 ` [PATCH 07/12] [media] move parallel port/isa video drivers to drivers/media/parport/ Mauro Carvalho Chehab
2012-08-15 13:48 ` [PATCH 08/12] [media] mmc/Kconfig: Improve driver name for siano mmc/sdio driver Mauro Carvalho Chehab
2012-08-15 13:48 ` [PATCH 09/12] [media] reorganize the API core items Mauro Carvalho Chehab
2012-08-15 13:48 ` [PATCH 10/12] [media] move i2c files into drivers/media/i2c Mauro Carvalho Chehab
2012-08-24 23:44 ` Sylwester Nawrocki [this message]
2012-09-06 14:07 ` Mauro Carvalho Chehab
2012-09-06 20:35 ` Sylwester Nawrocki
2012-09-07 4:33 ` Prabhakar Lad
2012-08-15 13:48 ` [PATCH 11/12] [media] move soc_camera i2c drivers into its own dir Mauro Carvalho Chehab
2012-08-15 13:48 ` [PATCH 12/12] [media] rename drivers/media/video to platform Mauro Carvalho Chehab
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=503811EC.8030808@gmail.com \
--to=sylvester.nawrocki@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
/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).