All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-media@vger.kernel.org
Cc: hverkuil@xs4all.nl, mchehab@kernel.org
Subject: [PATCH v2 21/29] ccs: Give all subdevs a function
Date: Fri, 27 Nov 2020 12:33:17 +0200	[thread overview]
Message-ID: <20201127103325.29814-22-sakari.ailus@linux.intel.com> (raw)
In-Reply-To: <20201127103325.29814-1-sakari.ailus@linux.intel.com>

This removes a warning at driver probe time telling that one or two
entities have no function set. The function used for both the binner and
scaler is the scaler.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/media/i2c/ccs/ccs-core.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c
index cc3a81200050..bddfee637f33 100644
--- a/drivers/media/i2c/ccs/ccs-core.c
+++ b/drivers/media/i2c/ccs/ccs-core.c
@@ -2685,7 +2685,7 @@ static void ccs_cleanup(struct ccs_sensor *sensor)
 
 static void ccs_create_subdev(struct ccs_sensor *sensor,
 			      struct ccs_subdev *ssd, const char *name,
-			      unsigned short num_pads)
+			      unsigned short num_pads, u32 function)
 {
 	struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
 
@@ -2696,6 +2696,7 @@ static void ccs_create_subdev(struct ccs_sensor *sensor,
 		v4l2_subdev_init(&ssd->sd, &ccs_ops);
 
 	ssd->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
+	ssd->sd.entity.function = function;
 	ssd->sensor = sensor;
 
 	ssd->npads = num_pads;
@@ -3123,11 +3124,12 @@ static int ccs_probe(struct i2c_client *client)
 	sensor->pll.ext_clk_freq_hz = sensor->hwcfg->ext_clk;
 	sensor->pll.scale_n = CCS_LIM(sensor, SCALER_N_MIN);
 
-	ccs_create_subdev(sensor, sensor->scaler, " scaler", 2);
-	ccs_create_subdev(sensor, sensor->binner, " binner", 2);
-	ccs_create_subdev(sensor, sensor->pixel_array, " pixel_array", 1);
-
-	sensor->pixel_array->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
+	ccs_create_subdev(sensor, sensor->scaler, " scaler", 2,
+			  MEDIA_ENT_F_CAM_SENSOR);
+	ccs_create_subdev(sensor, sensor->binner, " binner", 2,
+			  MEDIA_ENT_F_PROC_VIDEO_SCALER);
+	ccs_create_subdev(sensor, sensor->pixel_array, " pixel_array", 1,
+			  MEDIA_ENT_F_PROC_VIDEO_SCALER);
 
 	rval = ccs_init_controls(sensor);
 	if (rval < 0)
-- 
2.27.0


  parent reply	other threads:[~2020-11-27 10:38 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-27 10:32 [PATCH v2 00/29] Linux CCS driver preparation Sakari Ailus
2020-11-27 10:32 ` [PATCH v2 01/29] ccs: Add the generator for CCS register definitions and limits Sakari Ailus
2020-12-02 14:17   ` Mauro Carvalho Chehab
2020-12-02 14:46     ` Sakari Ailus
2020-11-27 10:32 ` [PATCH v2 02/29] Documentation: ccs: Add CCS driver documentation Sakari Ailus
2020-11-27 10:32 ` [PATCH v2 03/29] smiapp: Import CCS definitions Sakari Ailus
2020-11-27 10:33 ` [PATCH v2 04/29] smiapp: Use CCS register flags Sakari Ailus
2020-11-27 10:33 ` [PATCH v2 05/29] smiapp: Calculate CCS limit offsets and limit buffer size Sakari Ailus
2020-11-27 10:33 ` [PATCH v2 06/29] smiapp: Remove macros for defining registers, merge definitions Sakari Ailus
2020-11-27 10:33 ` [PATCH v2 07/29] smiapp: Add macros for accessing CCS registers Sakari Ailus
2020-11-27 10:33 ` [PATCH v2 08/29] smiapp: Use MIPI CCS version and manufacturer ID information Sakari Ailus
2020-11-27 10:33 ` [PATCH v2 09/29] smiapp: Read CCS limit values Sakari Ailus
2020-11-27 10:33 ` [PATCH v2 10/29] smiapp: Switch to CCS limits Sakari Ailus
2020-11-27 10:33 ` [PATCH v2 11/29] smiapp: Obtain frame descriptor from " Sakari Ailus
2020-11-27 10:33 ` [PATCH v2 12/29] smiapp: Use CCS limits in reading data format descriptors Sakari Ailus
2020-11-27 10:33 ` [PATCH v2 13/29] smiapp: Use CCS limits in reading binning capabilities Sakari Ailus
2020-11-27 10:33 ` [PATCH v2 14/29] smiapp: Use CCS registers Sakari Ailus
2020-11-27 10:33 ` [PATCH v2 15/29] smiapp: Remove quirk function for writing a single 8-bit register Sakari Ailus
2020-11-27 10:33 ` [PATCH v2 16/29] smiapp: Rename register access functions Sakari Ailus
2020-11-27 10:33 ` [PATCH v2 17/29] smiapp: Internal rename to CCS Sakari Ailus
2020-11-27 10:33 ` [PATCH v2 18/29] smiapp: Differentiate CCS sensors from SMIA in subdev naming Sakari Ailus
2020-11-27 10:33 ` [PATCH v2 19/29] smiapp: Rename as "ccs" Sakari Ailus
2020-11-27 10:33 ` [PATCH v2 20/29] ccs: Remove profile concept Sakari Ailus
2020-11-27 10:33 ` Sakari Ailus [this message]
2020-11-27 10:33 ` [PATCH v2 22/29] dt-bindings: nokia,smia: Fix link-frequencies documentation Sakari Ailus
2020-11-27 10:33 ` [PATCH v2 23/29] dt-bindings: nokia,smia: Make vana-supply optional Sakari Ailus
2020-11-27 10:33 ` [PATCH v2 24/29] dt-bindings: nokia,smia: Remove nokia,nvm-size property Sakari Ailus
2020-11-27 10:33 ` [PATCH v2 25/29] dt-bindings: nokia,smia: Convert to YAML Sakari Ailus
2020-11-27 10:33 ` [PATCH v2 26/29] dt-bindings: nokia,smia: Use better active polarity for reset Sakari Ailus
2020-11-27 10:33 ` [PATCH v2 27/29] dt-bindings: nokia,smia: Amend SMIA bindings with MIPI CCS support Sakari Ailus
2020-11-27 10:33 ` [PATCH v2 28/29] dt-bindings: mipi-ccs: Add bus-type for C-PHY support Sakari Ailus
2020-11-27 10:33 ` [PATCH v2 29/29] ccs: Request for "reset" GPIO Sakari Ailus

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=20201127103325.29814-22-sakari.ailus@linux.intel.com \
    --to=sakari.ailus@linux.intel.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.