Re: [PATCH v2] media: i2c: Add OV05C10 camera sensor driver
From: Krzysztof Kozlowski
Date: Sat Mar 29 2025 - 00:30:32 EST
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.
> + 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.
There is no second GPIO, otherwise would be present here.
NAK.
Best regards,
Krzysztof