From nobody Mon Dec 1 21:32:54 2025 Received: from mail.mainlining.org (mail.mainlining.org [5.75.144.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F2262D949E; Mon, 1 Dec 2025 12:41:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=5.75.144.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764592894; cv=none; b=ZwkjNxPEMErX9XlLGyCG7EDeBxz+QHHos2DNVurujl/X2KvaslU76tF3kJZgCU70lnTy4Ltjd7CyujqK4ZyPVlrQWEXfHEO8bYr/veErGIY7LBmtAssEutlnhCN5fyIeAyQyfN5vEV0E9jYqnhZKrOIGYRJcNRunL+VFuBlgHvk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764592894; c=relaxed/simple; bh=jX7R4zqULy2ZtpmBelEfGiXBpgw4Bf6JuN5dlkcVu3I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=o7im9UYUy7s/vPXl9yQFM6r5kTx6UMjJnK6XPSyVPJgyXVzxsTngTYWLwSLUWUpPGhNTzfkw5WJ2T1wDNik47YInCBgBPBNdxk8woSZ9Z2WxxkkmWIKYjK0WwPVQ+2XAxP2iU8QBHyq6NMA7GqCyVgztvmKOjpu8RsGITDHOaOI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mainlining.org; spf=pass smtp.mailfrom=mainlining.org; dkim=pass (2048-bit key) header.d=mainlining.org header.i=@mainlining.org header.b=Gp8OrIvA; dkim=permerror (0-bit key) header.d=mainlining.org header.i=@mainlining.org header.b=T+Z3GGVX; arc=none smtp.client-ip=5.75.144.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mainlining.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mainlining.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mainlining.org header.i=@mainlining.org header.b="Gp8OrIvA"; dkim=permerror (0-bit key) header.d=mainlining.org header.i=@mainlining.org header.b="T+Z3GGVX" DKIM-Signature: v=1; a=rsa-sha256; s=202507r; d=mainlining.org; c=relaxed/relaxed; h=To:Message-Id:Subject:Date:From; t=1764592856; bh=To6GQbR7FsdWDXvPxvJdkiU jxIvPgbRBWHqMm4aMzFo=; b=Gp8OrIvASXXhFYoEBrnOggFU5bNamZNFmvwK7p1aOgzerG5yxI UMc7x1f/ChXkYLxN15xYyia/P1AhqXPW4Bsm+hLUY6d2qIoHCHhP0iPrbJ5/3pg8JHEwJPw67Fi On6JaqCToWWtsGA8QoWzA6sjX/bu+fFw+sXSHGz33eaziUpjdusZOpx4LJgwSEHJFsghpyZJTVo t63UVn3cfEQuXyDXUhOrs44GcLTEnD8K83n3hgbIoprhH9I7CRhAdVcaEwHVPJR+gz9zgqSN+V/ EaH94bo3Yq47D/WdDtTdK7x3jUN2efj8GmQ3hSjcIpXLsJz5LpsrCyGejf/p+FFftwQ==; DKIM-Signature: v=1; a=ed25519-sha256; s=202507e; d=mainlining.org; c=relaxed/relaxed; h=To:Message-Id:Subject:Date:From; t=1764592856; bh=To6GQbR7FsdWDXvPxvJdkiU jxIvPgbRBWHqMm4aMzFo=; b=T+Z3GGVX8RSWbznnulXKSuAxpprIFF4FTuKnrLExXrhNI3uKW6 mhMCNI5/2CP6uWFqoAtSicYaVgrOuxN0LTCQ==; From: Vasiliy Doylov Date: Mon, 01 Dec 2025 15:40:43 +0300 Subject: [PATCH v3 1/3] media: dt-bindings: Add LC898217XC documentation Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251201-media-i2c-lc898217xc-initial-driver-v3-1-46e23897e921@mainlining.org> References: <20251201-media-i2c-lc898217xc-initial-driver-v3-0-46e23897e921@mainlining.org> In-Reply-To: <20251201-media-i2c-lc898217xc-initial-driver-v3-0-46e23897e921@mainlining.org> To: Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , david@ixit.cz Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, Vitalii Skorkin , Antonio Rische , Vasiliy Doylov , Krzysztof Kozlowski X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2022; i=nekocwd@mainlining.org; h=from:subject:message-id; bh=jX7R4zqULy2ZtpmBelEfGiXBpgw4Bf6JuN5dlkcVu3I=; b=owGbwMvMwCXGd//xporA/cmMp9WSGDJ1e64zrH9vHOzElLXJYo42496AeN6SLNETmf6vrOZ8t 388a4NoRykLgxgXg6yYIst/w0VyB24oe9blpj6DmcPKBDaEi1MAJhKygOF/WuoE268Xe5a/Lb7f ujh10mGjpGvXku7L7Kg7kp/grqzIw8jQyJ9wbYv9PatgHf1Zx2criH2PD736m7NVYcPT38eVBTb yAAA= X-Developer-Key: i=nekocwd@mainlining.org; a=openpgp; fpr=FF31A21EC0D823497E6D65E60EDFE3B27851BF63 Add device tree bindings documentation for ON Semiconductor LC898217XC voice coil motor. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Vasiliy Doylov --- .../bindings/media/i2c/onnn,lc898217xc.yaml | 53 ++++++++++++++++++= ++++ 1 file changed, 53 insertions(+) diff --git a/Documentation/devicetree/bindings/media/i2c/onnn,lc898217xc.ya= ml b/Documentation/devicetree/bindings/media/i2c/onnn,lc898217xc.yaml new file mode 100644 index 000000000000..cadd14c4381f --- /dev/null +++ b/Documentation/devicetree/bindings/media/i2c/onnn,lc898217xc.yaml @@ -0,0 +1,53 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright 2025 Vasiliy Doylov +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/i2c/onnn,lc898217xc.yaml## +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ON Semiconductor LC898217XC Voice Coil Motor (VCM) Lens + +maintainers: + - Vasiliy Doylov + +description: + The LC898217XC is a 11-bit digital-to-analog (DAC) converter. + VCM current is controlled with a linear mode driver.The DAC is controlled + via a 2-wire (I2C-compatible) serial interface that operates at clock + rates up to 1MHz. This chip integrates Advanced Actuator Control (AAC) + technology and is intended for driving voice coil lenses in camera modul= es. + +properties: + compatible: + enum: + - onnn,lc898217xc + + reg: + maxItems: 1 + + vcc-supply: + description: + Definition of the regulator used as voltage supply. + +required: + - compatible + - reg + - vcc-supply + +additionalProperties: false + +examples: + - | + i2c { + #address-cells =3D <1>; + #size-cells =3D <0>; + + camera-lens@74 { + compatible =3D "onnn,lc898217xc"; + reg =3D <0x74>; + + vcc-supply =3D <&mt6358_vcamio_reg>; + }; + }; + +... --=20 2.52.0 From nobody Mon Dec 1 21:32:54 2025 Received: from mail.mainlining.org (mail.mainlining.org [5.75.144.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A6B9E2550AF; Mon, 1 Dec 2025 12:41:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=5.75.144.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764592891; cv=none; b=BOodaMi9JDJNFiVmvcTPdnRd3FvccZufPVmGyzJYyyp4KOn4PrnI+uejw+64tsuHFNsRiVfreXWp2qlQS+j9tNjtEeszCb3AGH8OE9Elqfjugmyl7yiShA8/UiHpZHnwKoDriQaDbiaSjJveqyhFJJM/IWJGOpGRmtLbpulJiek= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764592891; c=relaxed/simple; bh=OYdDEDwnJEDj578kwXWAXYO+Z3HwQ+ux9C5Q0UN7geg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=sASKsXETYILOBo+mvW1fVF++BjD9MIIdpS37B8FYcmJeF6BXjIHqjKvw9twDMMA22nDj25DjlxIxnJe0Lphyou+8tsSuQNBz2hIDJBKIkNzqRSCr37jcjtRU29ri+Z5eSP1XYMenufZ4xBLngEi/ZFaOxIMN139jkK1AJGqLjfs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mainlining.org; spf=pass smtp.mailfrom=mainlining.org; dkim=pass (2048-bit key) header.d=mainlining.org header.i=@mainlining.org header.b=Ty+NHwCS; dkim=permerror (0-bit key) header.d=mainlining.org header.i=@mainlining.org header.b=aBWkb8x6; arc=none smtp.client-ip=5.75.144.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mainlining.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mainlining.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mainlining.org header.i=@mainlining.org header.b="Ty+NHwCS"; dkim=permerror (0-bit key) header.d=mainlining.org header.i=@mainlining.org header.b="aBWkb8x6" DKIM-Signature: v=1; a=rsa-sha256; s=202507r; d=mainlining.org; c=relaxed/relaxed; h=To:Message-Id:Subject:Date:From; t=1764592856; bh=JN+ZmCkufByL3XuEAc9xzM1 yFwWcEP3po6y+bdDdEy0=; b=Ty+NHwCSPcGZ6X9VxyeUSecHvu08k+LRi4m6WMUyGiQnCKIWyD gbqnuEC5tJVIVpZ1D3YHsDLF9AUUbI4Ss/nuKfZOBLFC5Pwq3H5rNyvZSWQROJvrwA7QybnWOYB w6msvQVjS+cdc5MbXvkX6zWa8KRIzm2hhcPXq8BhCcKxP6hbjDneeEZDqMWphcvF9ZMySb8nxTC hN96B8jw/+myLsI4lwOA2EgxKFohf+0KuhZMDLgcFWEyMjM3jI8xw7INQMKzk8CYetwuy7m5jZw B85etRPFp9XEvxr05KJ2uvXdhpoE5zzZM7m4ae7idP61RkTUWsbOKXAKXISxu8X5IQA==; DKIM-Signature: v=1; a=ed25519-sha256; s=202507e; d=mainlining.org; c=relaxed/relaxed; h=To:Message-Id:Subject:Date:From; t=1764592856; bh=JN+ZmCkufByL3XuEAc9xzM1 yFwWcEP3po6y+bdDdEy0=; b=aBWkb8x6grSGOCxGBYpEleaLg2/8AXgefk1igtGpWD3W529sjE 7+bD08xUqVh7pYCMDYdhma3eTFWznm6h5zAQ==; From: Vasiliy Doylov Date: Mon, 01 Dec 2025 15:40:44 +0300 Subject: [PATCH v3 2/3] media: i2c: Add driver for LC898217XC VCM Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251201-media-i2c-lc898217xc-initial-driver-v3-2-46e23897e921@mainlining.org> References: <20251201-media-i2c-lc898217xc-initial-driver-v3-0-46e23897e921@mainlining.org> In-Reply-To: <20251201-media-i2c-lc898217xc-initial-driver-v3-0-46e23897e921@mainlining.org> To: Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , david@ixit.cz Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, Vitalii Skorkin , Antonio Rische , Vasiliy Doylov X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=9154; i=nekocwd@mainlining.org; h=from:subject:message-id; bh=OYdDEDwnJEDj578kwXWAXYO+Z3HwQ+ux9C5Q0UN7geg=; b=owGbwMvMwCXGd//xporA/cmMp9WSGDJ1e65H/bpXs/L+3cX7FINsJzDIbOlwq1oWpKy2/v1nz Xq5E15HO0pZGMS4GGTFFFn+Gy6SO3BD2bMuN/UZzBxWJpAhDFycAjAR/ypGhq9vdM4HLkzY2VB4 t/pjn4TX1tiT37buKxLKnC+2XKMoTp+RYbNe4XLNGXosGyUmKW/bFVbfpfCG54z/nq02jF/YsrL iGAE= X-Developer-Key: i=nekocwd@mainlining.org; a=openpgp; fpr=FF31A21EC0D823497E6D65E60EDFE3B27851BF63 LC898217XC is a 11 bit DAC, designed for linear control of voice coil motor. This driver creates a V4L2 subdevice and provides control to set the desired focus. Tested on Oneplus 6 (oneplus-enchilada) Signed-off-by: Vasiliy Doylov --- drivers/media/i2c/Kconfig | 9 ++ drivers/media/i2c/Makefile | 1 + drivers/media/i2c/lc898217xc.c | 254 +++++++++++++++++++++++++++++++++++++= ++++ 3 files changed, 264 insertions(+) diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig index 4b4db8c4f496..ee071505223f 100644 --- a/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig @@ -866,6 +866,15 @@ config VIDEO_DW9807_VCM capability. This is designed for linear control of voice coil motors, controlled via I2C serial interface. =20 +config VIDEO_LC898217XC + tristate "LC898217XC lens voice coil support" + select V4L2_CCI_I2C + help + This is a driver for the LC898217XC camera lens voice coil. + LC898217XC is a 11 bit DAC with 110mA output current sink + capability. This is designed for linear control of + voice coil motors, controlled via I2C serial interface. + endif =20 menu "Flash devices" diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile index c5f17602454f..a17774eeb43c 100644 --- a/drivers/media/i2c/Makefile +++ b/drivers/media/i2c/Makefile @@ -64,6 +64,7 @@ obj-$(CONFIG_VIDEO_IMX415) +=3D imx415.o obj-$(CONFIG_VIDEO_IR_I2C) +=3D ir-kbd-i2c.o obj-$(CONFIG_VIDEO_ISL7998X) +=3D isl7998x.o obj-$(CONFIG_VIDEO_KS0127) +=3D ks0127.o +obj-$(CONFIG_VIDEO_LC898217XC) +=3D lc898217xc.o obj-$(CONFIG_VIDEO_LM3560) +=3D lm3560.o obj-$(CONFIG_VIDEO_LM3646) +=3D lm3646.o obj-$(CONFIG_VIDEO_LT6911UXE) +=3D lt6911uxe.o diff --git a/drivers/media/i2c/lc898217xc.c b/drivers/media/i2c/lc898217xc.c new file mode 100644 index 000000000000..c2d75bd36ddb --- /dev/null +++ b/drivers/media/i2c/lc898217xc.c @@ -0,0 +1,254 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +// Copyright (c) 2025 Vasiliy Doylov + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define LC898217XC_NAME "lc898217xc" +/* Actuator has 11 bit resolution */ +#define LC898217XC_MAX_FOCUS_POS (2048 - 1) +#define LC898217XC_MIN_FOCUS_POS 0 +#define LC898217XC_FOCUS_STEPS 1 +#define LC898217XC_DAC_ADDR CCI_REG16(0x84) + +static const char *const lc898217xc_supply_names[] =3D { + "vcc", +}; + +struct lc898217xc { + struct regulator_bulk_data supplies[ARRAY_SIZE(lc898217xc_supply_names)]; + struct v4l2_ctrl_handler ctrls; + struct v4l2_ctrl *focus; + struct v4l2_subdev sd; + struct regmap *regmap; +}; + +static inline struct lc898217xc *sd_to_lc898217xc(struct v4l2_subdev *subd= ev) +{ + return container_of(subdev, struct lc898217xc, sd); +} + +static int lc898217xc_set_dac(struct lc898217xc *lc898217xc, u16 val) +{ + struct i2c_client *client =3D v4l2_get_subdevdata(&lc898217xc->sd); + int ret; + + ret =3D cci_write(lc898217xc->regmap, LC898217XC_DAC_ADDR, val, NULL); + if (ret) + dev_err(&client->dev, "failed to set DAC: %d\n", ret); + + return ret; +} + +static int __maybe_unused lc898217xc_runtime_suspend(struct device *dev) +{ + struct v4l2_subdev *sd =3D dev_get_drvdata(dev); + struct lc898217xc *lc898217xc =3D sd_to_lc898217xc(sd); + + regulator_bulk_disable(ARRAY_SIZE(lc898217xc_supply_names), + lc898217xc->supplies); + + return 0; +} + +static int __maybe_unused lc898217xc_runtime_resume(struct device *dev) +{ + struct v4l2_subdev *sd =3D dev_get_drvdata(dev); + struct lc898217xc *lc898217xc =3D sd_to_lc898217xc(sd); + int ret; + + ret =3D regulator_bulk_enable(ARRAY_SIZE(lc898217xc_supply_names), + lc898217xc->supplies); + + if (ret < 0) { + dev_err(dev, "failed to enable regulators\n"); + return ret; + } + + usleep_range(8000, 10000); + + return ret; +} + +static int lc898217xc_set_ctrl(struct v4l2_ctrl *ctrl) +{ + struct lc898217xc *lc898217xc =3D container_of(ctrl->handler, + struct lc898217xc, ctrls); + + if (ctrl->id =3D=3D V4L2_CID_FOCUS_ABSOLUTE) + return lc898217xc_set_dac(lc898217xc, ctrl->val); + + return 0; +} + +static const struct v4l2_ctrl_ops lc898217xc_ctrl_ops =3D { + .s_ctrl =3D lc898217xc_set_ctrl, +}; + +static int lc898217xc_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *= fh) +{ + return pm_runtime_resume_and_get(sd->dev); +} + +static int lc898217xc_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh = *fh) +{ + pm_runtime_mark_last_busy(sd->dev); + pm_runtime_put_autosuspend(sd->dev); + + return 0; +} + +static const struct v4l2_subdev_internal_ops lc898217xc_int_ops =3D { + .open =3D lc898217xc_open, + .close =3D lc898217xc_close, +}; + +static const struct v4l2_subdev_core_ops lc898217xc_core_ops =3D { + .log_status =3D v4l2_ctrl_subdev_log_status, + .subscribe_event =3D v4l2_ctrl_subdev_subscribe_event, + .unsubscribe_event =3D v4l2_event_subdev_unsubscribe, +}; + +static const struct v4l2_subdev_ops lc898217xc_ops =3D { + .core =3D &lc898217xc_core_ops, +}; + +static int lc898217xc_init_controls(struct lc898217xc *lc898217xc) +{ + struct v4l2_ctrl_handler *hdl =3D &lc898217xc->ctrls; + const struct v4l2_ctrl_ops *ops =3D &lc898217xc_ctrl_ops; + + v4l2_ctrl_handler_init(hdl, 1); + + lc898217xc->focus =3D v4l2_ctrl_new_std(hdl, ops, V4L2_CID_FOCUS_ABSOLUTE, + LC898217XC_MIN_FOCUS_POS, + LC898217XC_MAX_FOCUS_POS, + LC898217XC_FOCUS_STEPS, 0); + + if (hdl->error) + return hdl->error; + + lc898217xc->sd.ctrl_handler =3D hdl; + + return 0; +} + +static int lc898217xc_probe(struct i2c_client *client) +{ + struct device *dev =3D &client->dev; + struct lc898217xc *lc898217xc; + unsigned int i; + int ret; + + lc898217xc =3D devm_kzalloc(dev, sizeof(*lc898217xc), GFP_KERNEL); + if (!lc898217xc) + return -ENOMEM; + + lc898217xc->regmap =3D devm_cci_regmap_init_i2c(client, 8); + if (IS_ERR(lc898217xc->regmap)) + return dev_err_probe(dev, PTR_ERR(lc898217xc->regmap), + "failed to initialize CCI\n"); + + /* Initialize subdev */ + v4l2_i2c_subdev_init(&lc898217xc->sd, client, &lc898217xc_ops); + + for (i =3D 0; i < ARRAY_SIZE(lc898217xc_supply_names); i++) + lc898217xc->supplies[i].supply =3D lc898217xc_supply_names[i]; + + ret =3D devm_regulator_bulk_get(dev, ARRAY_SIZE(lc898217xc_supply_names), + lc898217xc->supplies); + + if (ret) + return dev_err_probe(dev, ret, "failed to get regulators\n"); + + /* Initialize controls */ + ret =3D lc898217xc_init_controls(lc898217xc); + if (ret) { + dev_err_probe(dev, ret, "failed to init v4l2 controls\n"); + goto err_free_handler; + } + + /* Initialize subdev */ + lc898217xc->sd.flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE | + V4L2_SUBDEV_FL_HAS_EVENTS; + lc898217xc->sd.internal_ops =3D &lc898217xc_int_ops; + + ret =3D media_entity_pads_init(&lc898217xc->sd.entity, 0, NULL); + if (ret < 0) { + dev_err_probe(dev, ret, "failed to init media entity pads"); + goto err_free_handler; + } + + lc898217xc->sd.entity.function =3D MEDIA_ENT_F_LENS; + + pm_runtime_enable(dev); + ret =3D v4l2_async_register_subdev(&lc898217xc->sd); + + if (ret < 0) { + dev_err_probe(dev, ret, "failed to register V4L2 subdev\n"); + goto err_power_off; + } + + pm_runtime_set_autosuspend_delay(dev, 1000); + pm_runtime_use_autosuspend(dev); + pm_runtime_idle(dev); + + return 0; + +err_power_off: + pm_runtime_disable(dev); + media_entity_cleanup(&lc898217xc->sd.entity); +err_free_handler: + v4l2_ctrl_handler_free(&lc898217xc->ctrls); + + return ret; +} + +static void lc898217xc_remove(struct i2c_client *client) +{ + struct v4l2_subdev *sd =3D i2c_get_clientdata(client); + struct lc898217xc *lc898217xc =3D sd_to_lc898217xc(sd); + struct device *dev =3D &client->dev; + + v4l2_async_unregister_subdev(&lc898217xc->sd); + v4l2_ctrl_handler_free(&lc898217xc->ctrls); + media_entity_cleanup(&lc898217xc->sd.entity); + pm_runtime_disable(dev); +} + +static const struct of_device_id lc898217xc_of_table[] =3D { + { .compatible =3D "onnn,lc898217xc" }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, lc898217xc_of_table); + +static const struct dev_pm_ops lc898217xc_pm_ops =3D { + SET_RUNTIME_PM_OPS(lc898217xc_runtime_suspend, + lc898217xc_runtime_resume, NULL) +}; + +static struct i2c_driver lc898217xc_i2c_driver =3D { + .driver =3D { + .name =3D LC898217XC_NAME, + .pm =3D &lc898217xc_pm_ops, + .of_match_table =3D lc898217xc_of_table, + }, + .probe =3D lc898217xc_probe, + .remove =3D lc898217xc_remove, +}; +module_i2c_driver(lc898217xc_i2c_driver); + +MODULE_AUTHOR("Vasiliy Doylov "); +MODULE_DESCRIPTION("Onsemi LC898217XC VCM driver"); +MODULE_LICENSE("GPL"); --=20 2.52.0 From nobody Mon Dec 1 21:32:54 2025 Received: from mail.mainlining.org (mail.mainlining.org [5.75.144.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BCC102550AF; Mon, 1 Dec 2025 12:41:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=5.75.144.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764592885; cv=none; b=E9eSkkzrTgDZKdP5bmalk5rTs1/zjMDzsc0MZdxlanQG3n5OehYr6gmYov4G8IAXLbdV+B4FDuZND37GgWGxy5oSTVi81isxTWsSKCErLbfcACcDzMLm+YrYtChB2xVMnCVZcufsiaTwuYH+qHAMlvPB7hOu/ao6AyuLRbx2upM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764592885; c=relaxed/simple; bh=iYqrlYK75CmMlF5MP8d8/qU+BFPZKFn68XuoE9ljf1E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rhvv26lfViaK4496gKZ/tGSI0DBHKzjRLcNLj2EjbniVWPRUNqvS9ZVia5O9o+KOM/zrNpWFqKrJFBVQYxKMGFRdFRHs0tsnxMd8/qqRFAoMkFyRDP7NNcsmMT6ylf11j7Gff2odg4hgOBruN/y0YOiSoR2ZCsaEC9zkoFxYGYU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mainlining.org; spf=pass smtp.mailfrom=mainlining.org; dkim=pass (2048-bit key) header.d=mainlining.org header.i=@mainlining.org header.b=CqT9sYgt; dkim=permerror (0-bit key) header.d=mainlining.org header.i=@mainlining.org header.b=zpX5eeDo; arc=none smtp.client-ip=5.75.144.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mainlining.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mainlining.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mainlining.org header.i=@mainlining.org header.b="CqT9sYgt"; dkim=permerror (0-bit key) header.d=mainlining.org header.i=@mainlining.org header.b="zpX5eeDo" DKIM-Signature: v=1; a=rsa-sha256; s=202507r; d=mainlining.org; c=relaxed/relaxed; h=To:Message-Id:Subject:Date:From; t=1764592857; bh=REo7ODwV8ajMnQtMZi6zlDs o2DVrquSY/dQ2qFb5zO0=; b=CqT9sYgtRTQ+J8CPqqIClt7A8md0TPuESaaGPG6sh0AIg2ZiYM gylbblMLXoM5DNlz8K9OMBSBHY8lkNRX1ACiqgVUQUs7LBmtvaCMDgQpC2hjV2lY9jT0ndXPDWR PQhXwIXEU/0Gl2gWWvZeHbzt7DP4y9aPLGuvSxpV8fFDlKAtf7lgqdybUf+CxuNgSFyiIzqh8w6 HT3WNJH/WISUijB7njd7fHbidPZR39w9JKh4TTVem9jZ48omqgsdagv6Y8sw4+ZyUQaPGM2bbHE QSMyMNTLp8PW3KUAZDhw4yozjwbhHHCTARYWrYTn3UzMhwpYT+YUTu8/FGtJthfVNig==; DKIM-Signature: v=1; a=ed25519-sha256; s=202507e; d=mainlining.org; c=relaxed/relaxed; h=To:Message-Id:Subject:Date:From; t=1764592857; bh=REo7ODwV8ajMnQtMZi6zlDs o2DVrquSY/dQ2qFb5zO0=; b=zpX5eeDouHCEsxluDTvotfyDrqufQMM4CuRQg0CjT35U/hlMsV SR367Fg6rFzBZRDmPdDLt/MetL0q3bqlYkDw==; From: Vasiliy Doylov Date: Mon, 01 Dec 2025 15:40:45 +0300 Subject: [PATCH v3 3/3] MAINTAINERS: Add entry for Onsemi LC898217XC lens voice coil driver Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251201-media-i2c-lc898217xc-initial-driver-v3-3-46e23897e921@mainlining.org> References: <20251201-media-i2c-lc898217xc-initial-driver-v3-0-46e23897e921@mainlining.org> In-Reply-To: <20251201-media-i2c-lc898217xc-initial-driver-v3-0-46e23897e921@mainlining.org> To: Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , david@ixit.cz Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, Vitalii Skorkin , Antonio Rische , Vasiliy Doylov X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=758; i=nekocwd@mainlining.org; h=from:subject:message-id; bh=iYqrlYK75CmMlF5MP8d8/qU+BFPZKFn68XuoE9ljf1E=; b=owGbwMvMwCXGd//xporA/cmMp9WSGDJ1e67/bF05Z7k7t8T2rQLqnhGzP8bPuHh4W9SEWX9yl ypYSYtu7yhlYRDjYpAVU2T5b7hI7sANZc+63NRnMHNYmUCGMHBxCsBEDrxhZHgltmwG4ywNt/Ct 6zV0brGo3jhbq3c+Tnue7kNBdpk7J+oZfrMk6cZ9joqJm/bwaWfzkczy3xe+31r59O9MhmvfF7Y 8OM4EAA== X-Developer-Key: i=nekocwd@mainlining.org; a=openpgp; fpr=FF31A21EC0D823497E6D65E60EDFE3B27851BF63 Add entry for Onsemi LC898217XC lens voice coil driver Signed-off-by: Vasiliy Doylov --- MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 80dcd13687e6..004ff1ab535b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -19501,6 +19501,13 @@ S: Supported W: http://www.onsemi.com F: drivers/net/phy/ncn* =20 +ONSEMI LC898217XC LENS VOICE COIL DRIVER +M: Vasiliy Doylov +L: linux-media@vger.kernel.org +S: Maintained +F: Documentation/devicetree/bindings/media/i2c/onnn,lc898217xc.yaml +F: drivers/media/i2c/lc898217xc.c + OP-TEE DRIVER M: Jens Wiklander L: op-tee@lists.trustedfirmware.org --=20 2.52.0