From nobody Thu Apr 9 09:04:08 2026 Received: from mail-244116.protonmail.ch (mail-244116.protonmail.ch [109.224.244.116]) (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 DD3EC211A05; Tue, 10 Mar 2026 04:21:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=109.224.244.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773116499; cv=none; b=I9wWipxQv+PCDFOJHEAMBTV8XGa2Pb3s2/OHhnzrq0FtKiDM3vrIH7fV9uKlZCFdaFDe6nfiL3ExEDaLL+qdkRcJ6Dtw3x1e8KfJF2lqQ5bFmuhM7rPhonULLxhNOWaG4V4VsE2nbC0sntb618uIy/ZapanHu7uOMfYjCUyPnU0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773116499; c=relaxed/simple; bh=ptChQJtr5D7SZfCHDeVzqNLC0C+XZLoykLQhbmdJCyQ=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Gp5zR/yXwQgl9Sgjs4nupeMAI+ZRW1mdOedm4L+2D+cEnm9scu/+N9RVjOS9JKyXOrCbWWx0M/X82tVl0II7yIG/gI1urjwRhm18DYiEpQKZb7EpUgY50DvFTjA1wJTBFElzKs8YzeWHa/T/4XD1KIXj4AqC+mFxMkXlm57VWsI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pm.me; spf=pass smtp.mailfrom=pm.me; dkim=pass (2048-bit key) header.d=pm.me header.i=@pm.me header.b=XQHfZvRf; arc=none smtp.client-ip=109.224.244.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pm.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pm.me Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pm.me header.i=@pm.me header.b="XQHfZvRf" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail3; t=1773116496; x=1773375696; bh=qj+jNA2G+n0/7Su1xuSsbRWs+nuupzTStBckacHK2as=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=XQHfZvRfycw0/svcqjADs3Lu35rsOd1C713h8+UzUfhFFTStypmPhcWY6a0WCVWer VMJTkRqN+KWUQn1waaYkPpkAsIsVQ+/WKjD59/XMTNoquEOhh6+VPS+TAL8VFOy25j L6MnYH2CjcrHVl046q7XBoDYG7ANcPl7Z2MKGGAITU+yKq/3ZW83XjcbB8Zd7wW5DP IOQSX+9ZoXvKV4w5A3VEXvqBaZC5Tr7Ljs/mYKOG500FV+n5XFDP3jxhT2CR5hXcpi s/GmPkpbykCb9VI9qXUQoYWqVmVVqt0mz/xq2KkxQLkCOWciE628iirCcTKUfsrRdN g39RFkLMbIfHQ== Date: Tue, 10 Mar 2026 04:21:31 +0000 To: Sakari Ailus , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley From: Alexander Koskovich Cc: Laurent Pinchart , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Alexander Koskovich Subject: [PATCH v2 1/2] media: dt-bindings: ovti,ov8856: Allow orientation & rotation props Message-ID: <20260310-ov8856-v4l2-props-v2-1-2717404ed045@pm.me> In-Reply-To: <20260310-ov8856-v4l2-props-v2-0-2717404ed045@pm.me> References: <20260310-ov8856-v4l2-props-v2-0-2717404ed045@pm.me> Feedback-ID: 37836894:user:proton X-Pm-Message-ID: 89df57fe2620ab6b7de43c27dfd459b759380108 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Allow the orientation and rotation properties from video-interface-devices to be specified. The sensor can be front or rear facing and can be mounted at any rotation. Signed-off-by: Alexander Koskovich Reviewed-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/media/i2c/ovti,ov8856.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/media/i2c/ovti,ov8856.yaml b= /Documentation/devicetree/bindings/media/i2c/ovti,ov8856.yaml index fa71f24823f2..24d4161a293b 100644 --- a/Documentation/devicetree/bindings/media/i2c/ovti,ov8856.yaml +++ b/Documentation/devicetree/bindings/media/i2c/ovti,ov8856.yaml @@ -18,6 +18,9 @@ description: |- through I2C and two-wire SCCB. The sensor output is available via CSI-2 serial data output (up to 4-lane). =20 +allOf: + - $ref: /schemas/media/video-interface-devices.yaml# + properties: compatible: const: ovti,ov8856 @@ -57,6 +60,10 @@ properties: This corresponds to the hardware pin XSHUTDOWN which is physically active low. =20 + orientation: true + + rotation: true + port: $ref: /schemas/graph.yaml#/$defs/port-base additionalProperties: false --=20 2.53.0 From nobody Thu Apr 9 09:04:08 2026 Received: from mail-106118.protonmail.ch (mail-106118.protonmail.ch [79.135.106.118]) (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 9C6EE3C6A58 for ; Tue, 10 Mar 2026 04:21:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.135.106.118 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773116504; cv=none; b=Js9+7Ix9exgxACX/0fnNPqmv3pTyjhqFMLM3tA8/cljuBvDDBXifsGBwvPi53lNp3FjLMUGr+4i7Wh/VNAkzo5QJK+dGReAyslf5GkBDhi5RH2OpI+BdHirbxOvjsb6zH/9fX4GAygMpQzvjeqDi6tkgWTduR2w/3Jzay+qmYbo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773116504; c=relaxed/simple; bh=bcCfDhJMuFO9LQmoPDmK4ZbWID8mungHniC/M/CthFI=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=t/vFG+w3VOUCTMlbO+etZhfygkDPG/42lrBCN6sefoVQT61hQ6dRQ3NF0HtvHihYoI2kdawo0kTOXdBDD0RE6Ij8JfXSFNoAbIks/om6X/NeklKLfbzefZpxGVQL9rdV7weNqlbShz/R2b8BId0jXl//ZPHM3BsI2GTdEnJlDYQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pm.me; spf=pass smtp.mailfrom=pm.me; dkim=pass (2048-bit key) header.d=pm.me header.i=@pm.me header.b=TxVFpHfQ; arc=none smtp.client-ip=79.135.106.118 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pm.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pm.me Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pm.me header.i=@pm.me header.b="TxVFpHfQ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail3; t=1773116500; x=1773375700; bh=ebBnmgoocAzhOW+k1R3Jn9juCf240BgRJruqDT67ZYo=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=TxVFpHfQKpSrr88BKEjqYAJg0pTaggUlCl8H54EC3GothjUmiRjyUp12EGrWg7nlQ 6FEHfPiw1jkE9K6zzFsYjUw63835REjEYWRO6Z2xED14N5BzLaR77QmGWcfz53bPCM ClWHFwZL+nRSgChq5TH9xj7vE/rAXRz2kU5+eaQAAZexR80mYTGX4RQ8v18PToT8uf EiGO09yn+rnnZOd6DxI3Q2ZIgfiKa4q8ZxUaKMPn+mdO4yMAWh0RouGQUQA3FvJS6x rfVf2JipIefXTGa1hM21hl7Rgept3DSYYaAhRHSzLuTSoIWr36soEEXZHX6f4uCaZg LpfyghQswWdhg== Date: Tue, 10 Mar 2026 04:21:34 +0000 To: Sakari Ailus , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley From: Alexander Koskovich Cc: Laurent Pinchart , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Alexander Koskovich Subject: [PATCH v2 2/2] media: i2c: ov8856: parse and register V4L2 device tree properties Message-ID: <20260310-ov8856-v4l2-props-v2-2-2717404ed045@pm.me> In-Reply-To: <20260310-ov8856-v4l2-props-v2-0-2717404ed045@pm.me> References: <20260310-ov8856-v4l2-props-v2-0-2717404ed045@pm.me> Feedback-ID: 37836894:user:proton X-Pm-Message-ID: 459aab906aa66932aa31ce1b64bcffae0f7f21cf Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Parse V4L2 device tree properties and register controls for them. Signed-off-by: Alexander Koskovich --- drivers/media/i2c/ov8856.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov8856.c b/drivers/media/i2c/ov8856.c index e2998cfa0d18..9d7d16ba8911 100644 --- a/drivers/media/i2c/ov8856.c +++ b/drivers/media/i2c/ov8856.c @@ -1887,12 +1887,14 @@ static const struct v4l2_ctrl_ops ov8856_ctrl_ops = =3D { =20 static int ov8856_init_controls(struct ov8856 *ov8856) { + struct i2c_client *client =3D v4l2_get_subdevdata(&ov8856->sd); + struct v4l2_fwnode_device_properties props; struct v4l2_ctrl_handler *ctrl_hdlr; s64 exposure_max, h_blank; int ret; =20 ctrl_hdlr =3D &ov8856->ctrl_handler; - ret =3D v4l2_ctrl_handler_init(ctrl_hdlr, 8); + ret =3D v4l2_ctrl_handler_init(ctrl_hdlr, 10); if (ret) return ret; =20 @@ -1954,6 +1956,15 @@ static int ov8856_init_controls(struct ov8856 *ov885= 6) if (ctrl_hdlr->error) return ctrl_hdlr->error; =20 + ret =3D v4l2_fwnode_device_parse(&client->dev, &props); + if (ret) + return ret; + + ret =3D v4l2_ctrl_new_fwnode_properties(ctrl_hdlr, &ov8856_ctrl_ops, + &props); + if (ret) + return ret; + ov8856->sd.ctrl_handler =3D ctrl_hdlr; =20 return 0; --=20 2.53.0