Re: [PATCH v2] media: i2c: Add OV05C10 camera sensor driver

From: Nirujogi, Pratap
Date: Mon Mar 31 2025 - 15:19:36 EST


Hi Krzysztof,

Thanks for the review.

Thanks,
Pratap

On 3/29/2025 12:30 AM, Krzysztof Kozlowski wrote:
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.


On 28/03/2025 22:42, Pratap Nirujogi wrote:
+static int ov05c10_probe(struct i2c_client *client)
+{
+ struct ov05c10 *ov05c10;
+ u32 refclk;
+ int ret;
+
+ ov05c10 = devm_kzalloc(&client->dev, sizeof(*ov05c10), GFP_KERNEL);
+ if (!ov05c10)
+ return -ENOMEM;
+
+ struct fwnode_handle *fwnode = dev_fwnode(&client->dev);
+
+ ret = fwnode_property_read_u32(fwnode, "refclk", &refclk);

Use existing properties, like clock-frequency. refclk means this is the
clock, not it's frequency.

sure, will replace "refclk" with "clock-frequency" variable in the next V3 patch.

+ if (ret)
+ return dev_err_probe(&client->dev, -EINVAL,
+ "fail to get refclk\n");
+ if (refclk != OV05C10_REF_CLK)
+ return dev_err_probe(&client->dev, -EINVAL,
+ "failbad refclk %u, %lu expected\n",
+ refclk, OV05C10_REF_CLK);
+
+ ret = ov05c10_parse_endpoint(&client->dev, fwnode);
+ if (ret)
+ return dev_err_probe(&client->dev, -EINVAL,
+ "fail to parse endpoint\n");
+
+ ov05c10->enable_gpio = devm_gpiod_get(&client->dev, "sensor0_enable",
+ GPIOD_OUT_LOW);

Nothing improved and you did not bothered to wait for my feedback. You
just sent v2.

sorry, I should have waited for your feedback before submitting V2. I will use the suggested name "enable" in the next V3 submission.

There is no second GPIO, otherwise would be present here.

I rechecked both GPIOs. Only one is relevant for sensor driver and other one is for the ISP driver. Sorry for the confusion caused.

NAK.



Best regards,
Krzysztof