<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/media/i2c, branch linux-6.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-09-13T07:48:38Z</updated>
<entry>
<title>media: i2c: Add a camera sensor top level menu</title>
<updated>2023-09-13T07:48:38Z</updated>
<author>
<name>Sakari Ailus</name>
</author>
<published>2023-06-15T08:29:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f9bfc1a3858cebb1f6e3518707e9e688a85fcd37'/>
<id>urn:sha1:f9bfc1a3858cebb1f6e3518707e9e688a85fcd37</id>
<content type='text'>
commit 7d3c7d2a2914e10bec3b9cdacdadb8e1f65f715a upstream.

Select V4L2_FWNODE and VIDEO_V4L2_SUBDEV_API for all sensor drivers. This
also adds the options to drivers that don't specifically need them, these
are still seldom used drivers using old APIs. The upside is that these
should now all compile --- many drivers have had missing dependencies.

The "menu" is replaced by selectable "menuconfig" to select the needed
V4L2_FWNODE and VIDEO_V4L2_SUBDEV_API options.

Also select MEDIA_CONTROLLER which VIDEO_V4L2_SUBDEV_API effectively
depends on, and add the I2C dependency to the menu.

Reported-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Cc: stable@vger.kernel.org # for &gt;= 6.1
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>media: i2c: ccs: Check rules is non-NULL</title>
<updated>2023-09-13T07:48:38Z</updated>
<author>
<name>Sakari Ailus</name>
</author>
<published>2023-07-29T18:59:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=636f4076188cc2e49f318fbf87cfb6bec1cbbe28'/>
<id>urn:sha1:636f4076188cc2e49f318fbf87cfb6bec1cbbe28</id>
<content type='text'>
commit 607bcc4213d998d051541d8f10b5bbb7d546c0be upstream.

Fix the following smatch warning:

drivers/media/i2c/ccs/ccs-data.c:524 ccs_data_parse_rules() warn: address
of NULL pointer 'rules'

The CCS static data rule parser does not check an if rule has been
obtained before checking for other rule types (which depend on the if
rule). In practice this means parsing invalid CCS static data could lead
to dereferencing a NULL pointer.

Reported-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
Fixes: a6b396f410b1 ("media: ccs: Add CCS static data parser library")
Cc: stable@vger.kernel.org # for 5.11 and up
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>media: i2c: rdacm21: Fix uninitialized value</title>
<updated>2023-09-13T07:48:32Z</updated>
<author>
<name>Jacopo Mondi</name>
</author>
<published>2023-08-10T13:33:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d82e45857418e764bcc2d69966aa2b97dfa3c2f9'/>
<id>urn:sha1:d82e45857418e764bcc2d69966aa2b97dfa3c2f9</id>
<content type='text'>
[ Upstream commit 33c7ae8f49e3413c81e879e1fdfcea4c5516e37b ]

Fix the following smatch warning:

drivers/media/i2c/rdacm21.c:373 ov10640_check_id() error: uninitialized
symbol 'val'.

Initialize 'val' to 0 in the ov10640_check_id() function.

Fixes: 2b821698dc73 ("media: i2c: rdacm21: Power up OV10640 before OV490")
Reported-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Jacopo Mondi &lt;jacopo.mondi@ideasonboard.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: ov2680: Fix regulators being left enabled on ov2680_power_on() errors</title>
<updated>2023-09-13T07:48:32Z</updated>
<author>
<name>Hans de Goede</name>
</author>
<published>2023-08-03T09:33:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=49bd577e589748a7c702f0a07070bdce943b2048'/>
<id>urn:sha1:49bd577e589748a7c702f0a07070bdce943b2048</id>
<content type='text'>
[ Upstream commit 84b4bd7e0d98166aa32fd470e672721190492eae ]

When the ov2680_power_on() "sensor soft reset failed" path is hit during
probe() the WARN() about putting an enabled regulator at
drivers/regulator/core.c:2398 triggers 3 times (once for each regulator),
filling dmesg with backtraces.

Fix this by properly disabling the regulators on ov2680_power_on() errors.

Fixes: 3ee47cad3e69 ("media: ov2680: Add Omnivision OV2680 sensor driver")
Reviewed-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
Acked-by: Rui Miguel Silva &lt;rmfrfs@gmail.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: ov2680: Fix ov2680_set_fmt() which == V4L2_SUBDEV_FORMAT_TRY not working</title>
<updated>2023-09-13T07:48:32Z</updated>
<author>
<name>Hans de Goede</name>
</author>
<published>2023-08-03T09:33:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=38b0ebc048eb2ed44ed90ee14b042b609c6ed897'/>
<id>urn:sha1:38b0ebc048eb2ed44ed90ee14b042b609c6ed897</id>
<content type='text'>
[ Upstream commit c0e97a4b4f20639f74cd5809b42ba6cbf9736a7d ]

ov2680_set_fmt() which == V4L2_SUBDEV_FORMAT_TRY was getting
the try_fmt v4l2_mbus_framefmt struct from the passed in sd_state
and then storing the contents of that into the return by reference
format-&gt;format struct.

While the right thing to do would be filling format-&gt;format based on
the just looked up mode and then store the results of that in
sd_state-&gt;pads[0].try_fmt .

Before the previous change introducing ov2680_fill_format() this
resulted in ov2680_set_fmt() which == V4L2_SUBDEV_FORMAT_TRY always
returning the zero-ed out sd_state-&gt;pads[0].try_fmt in format-&gt;format
breaking callers using this.

After the introduction of ov2680_fill_format() which at least
initializes sd_state-&gt;pads[0].try_fmt properly, format-&gt;format
is now always being filled with the default 800x600 mode set by
ov2680_init_cfg() independent of the actual requested mode.

Move the filling of format-&gt;format with ov2680_fill_format() to
before the if (which == V4L2_SUBDEV_FORMAT_TRY) and then store
the filled in format-&gt;format in sd_state-&gt;pads[0].try_fmt to
fix this.

Note this removes the fmt local variable because IMHO having a local
variable which points to a sub-struct of one of the function arguments
just leads to confusion when reading the code.

Fixes: 3ee47cad3e69 ("media: ov2680: Add Omnivision OV2680 sensor driver")
Acked-by: Rui Miguel Silva &lt;rmfrfs@gmail.com&gt;
Reviewed-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: ov2680: Add ov2680_fill_format() helper function</title>
<updated>2023-09-13T07:48:32Z</updated>
<author>
<name>Hans de Goede</name>
</author>
<published>2023-08-03T09:33:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b8bc7bc64819d7d201b59bc683fcc70a7e71429c'/>
<id>urn:sha1:b8bc7bc64819d7d201b59bc683fcc70a7e71429c</id>
<content type='text'>
[ Upstream commit 6d6849b2203f3244b575ba01d3e41ee19aa2cadf ]

Add a ov2680_fill_format() helper function and use this everywhere were
a v4l2_mbus_framefmt struct needs to be filled in so that the driver always
fills it consistently.

This is a preparation patch for fixing ov2680_set_fmt()
which == V4L2_SUBDEV_FORMAT_TRY calls not properly filling in
the passed in v4l2_mbus_framefmt struct.

Note that for ov2680_init_cfg() this now simply always fills
the try_fmt struct of the passed in sd_state. This is correct because
ov2680_init_cfg() is never called with a NULL sd_state so the old
sd_state check is not necessary.

Fixes: 3ee47cad3e69 ("media: ov2680: Add Omnivision OV2680 sensor driver")
Acked-by: Rui Miguel Silva &lt;rmfrfs@gmail.com&gt;
Reviewed-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: ov2680: Don't take the lock for try_fmt calls</title>
<updated>2023-09-13T07:48:32Z</updated>
<author>
<name>Hans de Goede</name>
</author>
<published>2023-08-03T09:33:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=279a562c4af26a44020ed6df41a90f4ded78a74b'/>
<id>urn:sha1:279a562c4af26a44020ed6df41a90f4ded78a74b</id>
<content type='text'>
[ Upstream commit e521b9cc1a49de677f4fc65909ce4877fbf7b113 ]

On ov2680_set_fmt() calls with format-&gt;which == V4L2_SUBDEV_FORMAT_TRY,
ov2680_set_fmt() does not talk to the sensor.

So in this case there is no need to lock the sensor-&gt;lock mutex or
to check that the sensor is streaming.

Fixes: 3ee47cad3e69 ("media: ov2680: Add Omnivision OV2680 sensor driver")
Acked-by: Rui Miguel Silva &lt;rmfrfs@gmail.com&gt;
Reviewed-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: ov2680: Remove VIDEO_V4L2_SUBDEV_API ifdef-s</title>
<updated>2023-09-13T07:48:32Z</updated>
<author>
<name>Hans de Goede</name>
</author>
<published>2023-08-03T09:33:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=039e14a17a1b92912333f4608e6d34d6fd3a04c4'/>
<id>urn:sha1:039e14a17a1b92912333f4608e6d34d6fd3a04c4</id>
<content type='text'>
[ Upstream commit 49c282d5a8c5f4d1d9088622bec792294c716010 ]

VIDEO_V4L2_SUBDEV_API is now automatically selected in Kconfig
for all sensor drivers. Remove the ifdef CONFIG_VIDEO_V4L2_SUBDEV_API
checks.

This is a preparation patch for fixing ov2680_set_fmt()
which == V4L2_SUBDEV_FORMAT_TRY calls not properly filling in
the passed in v4l2_mbus_framefmt struct.

Fixes: 3ee47cad3e69 ("media: ov2680: Add Omnivision OV2680 sensor driver")
Reviewed-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
Acked-by: Rui Miguel Silva &lt;rmfrfs@gmail.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: ov2680: Fix vflip / hflip set functions</title>
<updated>2023-09-13T07:48:32Z</updated>
<author>
<name>Hans de Goede</name>
</author>
<published>2023-08-03T09:33:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=42ac1c0d7fa3f6f34b0d723ec23f0922752e365f'/>
<id>urn:sha1:42ac1c0d7fa3f6f34b0d723ec23f0922752e365f</id>
<content type='text'>
[ Upstream commit d5d08ad330c9ccebc5e066fda815423a290f48b0 ]

ov2680_vflip_disable() / ov2680_hflip_disable() pass BIT(0) instead of
0 as value to ov2680_mod_reg().

While fixing this also:

1. Stop having separate enable/disable functions for hflip / vflip
2. Move the is_streaming check, which is unique to hflip / vflip
   into the ov2680_set_?flip() functions.

for a nice code cleanup.

Fixes: 3ee47cad3e69 ("media: ov2680: Add Omnivision OV2680 sensor driver")
Reviewed-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
Acked-by: Rui Miguel Silva &lt;rmfrfs@gmail.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: ov2680: Fix ov2680_bayer_order()</title>
<updated>2023-09-13T07:48:31Z</updated>
<author>
<name>Hans de Goede</name>
</author>
<published>2023-08-03T09:33:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f3ac838162d3a89b6e7d4a17f620ccb35e24c222'/>
<id>urn:sha1:f3ac838162d3a89b6e7d4a17f620ccb35e24c222</id>
<content type='text'>
[ Upstream commit 50a7bad4e0a37d7018ab6fe843dd84bc6b2ecf72 ]

The index into ov2680_hv_flip_bayer_order[] should be 0-3, but
ov2680_bayer_order() was using 0 + BIT(2) + (BIT(2) &lt;&lt; 1) as
max index, while the intention was to use: 0 + 1 + 2 as max index.

Fix the index calculation in ov2680_bayer_order(), while at it
also just use the ctrl values rather then reading them back using
a slow i2c-read transaction.

This also allows making the function void, since there now are
no more i2c-reads to error check.

Note the check for the ctrls being NULL is there to allow
adding an ov2680_fill_format() helper later, which will call
ov2680_set_bayer_order() during probe() before the ctrls are created.

[Sakari Ailus: Change all users of ov2680_set_bayer_order() here]

Fixes: 3ee47cad3e69 ("media: ov2680: Add Omnivision OV2680 sensor driver")
Reviewed-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
Acked-by: Rui Miguel Silva &lt;rmfrfs@gmail.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
