From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8AD54473C76 for ; Mon, 5 Oct 2026 10:14:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791195294; cv=none; b=S14tSo3ftEwAXFIpVWihCB70OMlnJJ8hMjgrmoduibfRS71gRkN6ViEa+nxQ0GOQddVP937LlrQb2W6UwBBQ7wcz1gLub5vrqKXuZu1I5vH93pK8gygV2WSjSGEtFrahE/8h5fTfIoraHt44HSPsrpJbq8IJSDRRDWFnW4zEKv0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791195294; c=relaxed/simple; bh=SiCSaNH35Aalw7e03q0enXBs+RMPPX74VeGZyDKg77c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=X6JqOnTyWlKC5rq4w6ReLGvp0Dc+oPRFdhD24YR3TcIqnV6HMCOG1/kiRq1YHWxgzoZ2pGOrHrBaYL1G0hE8jojhWT6CKCEeZI8Hb2q2pha0guQUA289ZUOwLCs4Drk4wDYmP8YHjmdGIIFSrlbQi4lIPGtsf6J2dnVdgry7MPs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=E8z4F4C5; arc=none smtp.client-ip=209.85.221.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="E8z4F4C5" Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-48afe75f055so1305826f8f.2 for ; Mon, 05 Oct 2026 03:14:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1791195290; x=1791800090; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=X6peHqRvKIr35uOnhSLA6otbHrMaTXR/Zz2Q8g3tXsk=; b=E8z4F4C5raHgkCPaxLGTVC0qnmkMTwYp83gmHKoYs+PTOp23wwEM4G2fGm/4p30ByQ /iJgvJdhLnnt3i/B1ouPcQBzN3golvYN8nLAl2xcFwHNzfGsUTxFLG+iRobqUKvUua/G /gfBhz6cCbO9vH94UHgHOXYr5aSueXkYQ1FZaZd7FKYIRYYK/GPbu44e5ye3uquiK239 cLEXQ1GFoHzxbZpZC1Ikg+igmM1Z/kpCZvbafptHJTT87c79/y7coWOEHWjnTtQKq0GJ U3jEeuH9eJUq5t8xTnZXDiAp56K/ieFoeK0NcmXqNqbz2vfxTxH8/zN49DZ9ORjUeXHb ZihA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791195290; x=1791800090; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=X6peHqRvKIr35uOnhSLA6otbHrMaTXR/Zz2Q8g3tXsk=; b=IihGM7WHpuCsD4Yd2cMo2Y/7ej8qWfHwmtJ5KZQisBHaU2a28W+HdG/hui7zBncS87 4SJI6pjBXDJvGjlyKeTzvXbHytGoF2qBffPz9DSnFqCFeBnif3m2nfHOBtu00RoYuesH yCdVCTmlgR0QVeTtJmc+zyTRfe6blaRKWVzNJ32CCWmbJUimIEyPZIeyVhZAVqazlkpa zGdZjTXCzfkZmCU8FaLgsgdPgLDhfZaBfRB5P6euDC6HCj4ieI2+3+9c3KLns1VYh6el U/lWdLZ4eEiGyKx38QAs1AdxOD/d2wfiQ/y8tYwy8tvC05B6JcEJrQ9hT0s35hJb2Huz 66CQ== X-Gm-Message-State: AFq9FYJcYSsSy179N+21pZORn3sZtDOzLpXfXeRuTeDqXx88hx/KGoWY nMOcLQJ0x9JXFMFnwbeUku2huNWRr1W3K68Bf6RpdeFzNNx2YfLau5mZ X-Gm-Gg: AYBFou26l/n0MW+/8hVxelQm/fZZ+Ve6Hmt8OiFRQN9mcQA7KQfqkkaE2a3+KQL+0Hg +yR3vtXf2XQhrWHjH/TOrZXJ2phXuXxGPyEEQAWIX9N+FSCBz5/bPN2XDBxxA7GLn35iR2XPxpv hxLqzkpR40LWnoqGG7Q7ZeqQVQfzPZfKK8sHmR2k/ZQ3n2CYc7RgIgqESU60mV9o612B62U16mY mm3IgPwEEv23T5MiQyQSor8VhKKcSVWcBA5AT01vPvszshjfiTnYmErimJ3Ppv98Ran6MJ7vX/6 GdHF9m3Amr+LOYyFNDE/sR0wZ7bTNV4t8jNMoqA23SSK7duPvfg7xo0ENDCCMTsJP+/N7AGisuZ W2xzzlT8ciz5i9Yl9Oj1ugu3wMxfCg9ntdjR9tg4e7UNVGj9fjZ+UZib5Wp9nEv/EwQcjkAKll3 JSk9qnn9XSilXCE2gPwrewpoj/bijUWRtyUdRyCX2tirWzJwdH0ZOnHfBHXl8TkM6BJJYc9aYwB thHvAWErVXMZu0tICouaj5yR8UU3hmM7TW3vGZnMHIbXy+snVyfpmtMkSZONZTwweuStCxhbF0H uo3UYtsnt/klaCxUkHfGgWFK2w== X-Received: by 2002:a05:6000:2482:b0:486:e707:42eb with SMTP id ffacd0b85a97d-48c47fdff0amr13692245f8f.33.1791195290122; Mon, 05 Oct 2026 03:14:50 -0700 (PDT) Received: from robert-83cx (static-dsl-191.87-197-115.telecom.sk. [87.197.115.191]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48c62270746sm2478145f8f.7.2026.10.05.03.14.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2026 03:14:49 -0700 (PDT) From: Robert Bozik To: sakari.ailus@linux.intel.com Cc: linux-media@vger.kernel.org, mchehab@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, antti.laakso@linux.intel.com Subject: Re: [PATCH v4 2/3] media: i2c: Add driver for OmniVision OV32C4 Date: Mon, 5 Oct 2026 12:14:46 +0200 Message-ID: <20261005101447.15264-1-robertbozik@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: <20261005071010.7191-1-robertbozik@gmail.com> <20261005071010.7191-3-robertbozik@gmail.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi Sakari, Thank you for the review. On Mon, Oct 05, 2026 at 12:23:20PM +0300, Sakari Ailus wrote: > > + { 0x6ad0, 0x00 }, > > + { 0x6ad1, 0x75 }, > > Are there any gaps in this deluge of 0x0 and 0x75? If not, could you write > it programmatically rather than using a huge array? Two contiguous ranges, 0x6ad0-0x6bef and 0x6c00-0x707f, with one gap of 16 bytes between them; every even address holds 0x00 and the odd one 0x75, so it is 720 16-bit registers set to 0x0075. v5 writes them from a loop and the table shrinks to 345 entries. I'll verify the stream and the image after the change, since it alters the bus transactions. > > + ret = acpi_dev_get_resources(adev, &resources, ov32c4_i2c_res_cb, &ctx); > > The presence of additional chips like VCM is very much dependent on the > module, and I think we should have parsing of the I²C address outside the > sensor driver. > > One option could be to stuff it into the reg property in the ipu-bridge, > that way it'd work the same way for the driver on both DT and ACPI. In the > ipu-bridge, I'd use a static value and provide the reg property for this > sensor only (based on _HID). i2c_new_ancillary_device() will only use OF so > the driver will need to dig the address manually still. Agreed, that is better. For v5 I'd give ipu-bridge a small table of sensors whose second I2C address belongs to the sensor itself, { "OVTI32C4", 0x3e }; for a sensor in it the bridge adds reg = to the sensor's software node and does not instantiate the VCM from SSDB - so the no-VCM exception of patch 3 folds into the same table. The driver reads reg with device_property_read_u32_array() on both DT and ACPI and the _CRS walk goes away with its CONFIG_ACPI guard. The property fits into the existing dev_properties slot that lens-focus uses when there is a VCM, so no change to the header. The rest will be in v5 as suggested - the register names, the RGB/IR comments, the function name, the error label and the comments; the HTS define was unused and goes too. Thanks, Robert