From: Andrzej Hajda <a.hajda@samsung.com>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
Linux Media Mailing List <linux-media@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [PATCH 13/18] s5k5baf: fix subdev type
Date: Fri, 08 May 2015 15:51:16 +0200 [thread overview]
Message-ID: <554CBF54.4050000@samsung.com> (raw)
In-Reply-To: <d37f5695458429869abaae3f7974d296c3fa8349.1431046915.git.mchehab@osg.samsung.com>
Hi Mauro,
On 05/08/2015 03:12 AM, Mauro Carvalho Chehab wrote:
> This sensor driver is abusing MEDIA_ENT_T_V4L2_SUBDEV, creating
> some subdevs with a non-existing type.
>
> As this is a sensor driver, the proper type is likely
> MEDIA_ENT_T_CAM_SENSOR.
This driver exposes two media entities:
- pure camera sensor, it has type
MEDIA_ENT_T_V4L2_SUBDEV_SENSOR/MEDIA_ENT_T_CAM_SENSOR,
- image processing entity, I have assigned to it MEDIA_ENT_T_V4L2_SUBDEV
type,
as there were no better option.
Maybe it would be better to introduce another define for such entities,
for example MEDIA_ENT_T_CAM_ISP?
The same applies to s5c73m3 driver.
Anyway this patch breaks current code as type field is used internally
to distinguish both entities in subdev callbacks -
s5k5baf_is_cis_subdev function.
Of course the function can be rewritten if necessary.
Regards
Andrzej
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
>
> diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c
> index fadd48d35a55..8373552847ab 100644
> --- a/drivers/media/i2c/s5k5baf.c
> +++ b/drivers/media/i2c/s5k5baf.c
> @@ -1919,7 +1919,7 @@ static int s5k5baf_configure_subdevs(struct s5k5baf *state,
>
> state->pads[PAD_CIS].flags = MEDIA_PAD_FL_SINK;
> state->pads[PAD_OUT].flags = MEDIA_PAD_FL_SOURCE;
> - sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV;
> + sd->entity.type = MEDIA_ENT_T_CAM_SENSOR;
> ret = media_entity_init(&sd->entity, NUM_ISP_PADS, state->pads, 0);
>
> if (!ret)
next prev parent reply other threads:[~2015-05-08 13:51 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-08 1:12 [PATCH 00/18] Remove media controller entity subtypes and rename types Mauro Carvalho Chehab
2015-05-08 1:12 ` [PATCH 01/18] media controller: add EXPERIMENTAL to Kconfig option for DVB support Mauro Carvalho Chehab
2015-05-08 11:33 ` Hans Verkuil
2015-05-11 12:46 ` Laurent Pinchart
2015-05-08 1:12 ` [PATCH 02/18] media controller: deprecate entity subtype Mauro Carvalho Chehab
2015-05-08 11:39 ` Hans Verkuil
2015-05-08 1:12 ` [PATCH 03/18] media controller: use MEDIA_ENT_T_AV_DMA for A/V DMA engines Mauro Carvalho Chehab
2015-05-08 11:54 ` Hans Verkuil
2015-05-08 12:32 ` Mauro Carvalho Chehab
2015-05-08 12:57 ` Hans Verkuil
2015-05-08 1:12 ` [PATCH 04/18] media controller: Rename camera entities Mauro Carvalho Chehab
2015-05-08 12:03 ` Hans Verkuil
2015-05-08 12:53 ` Mauro Carvalho Chehab
2015-05-08 13:13 ` Hans Verkuil
2015-05-08 1:12 ` [PATCH 05/18] media controller: rename MEDIA_ENT_T_DEVNODE_DVB entities Mauro Carvalho Chehab
2015-05-08 12:10 ` Hans Verkuil
2015-05-08 12:56 ` Mauro Carvalho Chehab
2015-05-08 1:12 ` [PATCH 06/18] media controller: rename analog TV decoder Mauro Carvalho Chehab
2015-05-08 12:12 ` Hans Verkuil
2015-05-08 1:12 ` [PATCH 07/18] media controller: rename the tuner entity Mauro Carvalho Chehab
2015-05-08 12:13 ` Hans Verkuil
2015-05-08 12:57 ` Mauro Carvalho Chehab
2015-05-08 13:21 ` Hans Verkuil
2015-05-08 14:08 ` Mauro Carvalho Chehab
2015-05-08 14:32 ` Hans Verkuil
2015-05-08 15:46 ` Mauro Carvalho Chehab
2015-05-09 9:31 ` Hans Verkuil
2015-05-11 9:31 ` Mauro Carvalho Chehab
2015-05-11 9:38 ` Hans Verkuil
2015-05-08 1:12 ` [PATCH 08/18] media controller: add comments for the entity types Mauro Carvalho Chehab
2015-05-08 1:12 ` [PATCH 09/18] media controller: add macros to check if subdev or A/V DMA Mauro Carvalho Chehab
2015-05-08 1:12 ` [PATCH 10/18] media controller: use macros to check for V4L2 subdev entities Mauro Carvalho Chehab
2015-05-08 12:46 ` Hans Verkuil
2015-05-08 13:20 ` Mauro Carvalho Chehab
2015-05-08 1:12 ` [PATCH 11/18] omap3/omap4/davinci: get rid of MEDIA_ENT_T_V4L2_SUBDEV abuse Mauro Carvalho Chehab
2015-05-08 1:12 ` [PATCH 12/18] s5c73m3: fix subdev type Mauro Carvalho Chehab
2015-05-08 1:12 ` [PATCH 13/18] s5k5baf: " Mauro Carvalho Chehab
2015-05-08 13:51 ` Andrzej Hajda [this message]
2015-05-08 14:25 ` Mauro Carvalho Chehab
2015-05-08 1:12 ` [PATCH 14/18] davinci_vbpe: stop MEDIA_ENT_T_V4L2_SUBDEV abuse Mauro Carvalho Chehab
2015-05-08 1:12 ` [PATCH 15/18] omap4iss: " Mauro Carvalho Chehab
2015-05-08 1:12 ` [PATCH 16/18] v4l2-subdev: use MEDIA_ENT_T_UNKNOWN for new subdevs Mauro Carvalho Chehab
2015-05-08 1:12 ` [PATCH 17/18] media controller: get rid of entity subtype on Kernel Mauro Carvalho Chehab
2015-05-08 1:12 ` [PATCH 18/18] DocBook: update descriptions for the media controller entities 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=554CBF54.4050000@samsung.com \
--to=a.hajda@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=mchehab@osg.samsung.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