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 15/29] smiapp: Remove quirk function for writing a single 8-bit register
Date: Fri, 27 Nov 2020 12:33:11 +0200	[thread overview]
Message-ID: <20201127103325.29814-16-sakari.ailus@linux.intel.com> (raw)
In-Reply-To: <20201127103325.29814-1-sakari.ailus@linux.intel.com>

This function is no longer needed as the smiapp_write() function can be
used to write 8-bit registers with plain register addresses.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/media/i2c/smiapp/smiapp-quirk.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/media/i2c/smiapp/smiapp-quirk.c b/drivers/media/i2c/smiapp/smiapp-quirk.c
index 24630c7650d2..9422eb61b424 100644
--- a/drivers/media/i2c/smiapp/smiapp-quirk.c
+++ b/drivers/media/i2c/smiapp/smiapp-quirk.c
@@ -14,11 +14,6 @@
 
 #include "smiapp.h"
 
-static int smiapp_write_8(struct smiapp_sensor *sensor, u16 reg, u8 val)
-{
-	return smiapp_write(sensor, reg, val);
-}
-
 static int smiapp_write_8s(struct smiapp_sensor *sensor,
 			   const struct smiapp_reg_8 *regs, int len)
 {
@@ -26,7 +21,7 @@ static int smiapp_write_8s(struct smiapp_sensor *sensor,
 	int rval;
 
 	for (; len > 0; len--, regs++) {
-		rval = smiapp_write_8(sensor, regs->reg, regs->val);
+		rval = smiapp_write(sensor, regs->reg, regs->val);
 		if (rval < 0) {
 			dev_err(&client->dev,
 				"error %d writing reg 0x%4.4x, val 0x%2.2x",
@@ -170,7 +165,7 @@ static int jt8ev1_post_poweron(struct smiapp_sensor *sensor)
 
 static int jt8ev1_pre_streamon(struct smiapp_sensor *sensor)
 {
-	return smiapp_write_8(sensor, 0x3328, 0x00);
+	return smiapp_write(sensor, 0x3328, 0x00);
 }
 
 static int jt8ev1_post_streamoff(struct smiapp_sensor *sensor)
@@ -178,7 +173,7 @@ static int jt8ev1_post_streamoff(struct smiapp_sensor *sensor)
 	int rval;
 
 	/* Workaround: allows fast standby to work properly */
-	rval = smiapp_write_8(sensor, 0x3205, 0x04);
+	rval = smiapp_write(sensor, 0x3205, 0x04);
 	if (rval < 0)
 		return rval;
 
@@ -186,11 +181,11 @@ static int jt8ev1_post_streamoff(struct smiapp_sensor *sensor)
 	usleep_range(2000, 2050);
 
 	/* Restore it */
-	rval = smiapp_write_8(sensor, 0x3205, 0x00);
+	rval = smiapp_write(sensor, 0x3205, 0x00);
 	if (rval < 0)
 		return rval;
 
-	return smiapp_write_8(sensor, 0x3328, 0x80);
+	return smiapp_write(sensor, 0x3328, 0x80);
 }
 
 static int jt8ev1_init(struct smiapp_sensor *sensor)
-- 
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 ` Sakari Ailus [this message]
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 ` [PATCH v2 21/29] ccs: Give all subdevs a function Sakari Ailus
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-16-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.