From: Krzysztof Kozlowski <krzk@kernel.org>
To: Hardevsinh Palaniya <hardevsinh.palaniya@siliconsignals.io>
Cc: "sakari.ailus@linux.intel.com" <sakari.ailus@linux.intel.com>,
"andriy.shevchenko@linux.intel.com"
<andriy.shevchenko@linux.intel.com>,
"laurent.pinchart@ideasonboard.com"
<laurent.pinchart@ideasonboard.com>,
"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
"Himanshu Bhavani" <himanshu.bhavani@siliconsignals.io>,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Hans Verkuil" <hverkuil@xs4all.nl>,
"Bryan O'Donoghue" <bryan.odonoghue@linaro.org>,
"André Apitzsch" <git@apitzsch.eu>,
"Ricardo Ribalda" <ribalda@chromium.org>,
"Heimir Thor Sverrisson" <heimir.sverrisson@gmail.com>,
"Matthias Fend" <matthias.fend@emfend.at>,
"Sylvain Petinot" <sylvain.petinot@foss.st.com>,
"Jingjing Xiong" <jingjing.xiong@intel.com>,
"Benjamin Mugnier" <benjamin.mugnier@foss.st.com>,
"Dongcheng Yan" <dongcheng.yan@intel.com>,
"Arnd Bergmann" <arnd@arndb.de>,
"Hans de Goede" <hansg@kernel.org>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 1/2] dt-bindings: media: i2c: Add ov2735 sensor
Date: Thu, 17 Jul 2025 15:00:52 +0200 [thread overview]
Message-ID: <8cdea7c7-739a-4101-9e2f-1bb36632ff5a@kernel.org> (raw)
In-Reply-To: <PN3P287MB3519907E3C113D6CD9D564E3FF51A@PN3P287MB3519.INDP287.PROD.OUTLOOK.COM>
On 17/07/2025 13:55, Hardevsinh Palaniya wrote:
>> On 17/07/2025 09:28, Hardevsinh Palaniya wrote:
>>> Hi Krzysztof,
>>>
>>>> On Wed, Jul 16, 2025 at 07:14:16PM +0530, Hardevsinh Palaniya wrote:
>>>>> + properties:
>>>>> + data-lanes:
>>>>> + items:
>>>>> + - const: 1
>>>>> + - const: 2
>>>>> + link-frequencies: true
>>>>
>>>> Drop
>>>>
>>>> I don't understand why this appeared. I don't think anyone asked for it?
>>>
>>> Laurent suggested validating the link frequency in the Device Tree.
>>>
>>> Link[1]: https://lore.kernel.org/linux-media/20250710212131.GG22436@pendragon.ideasonboard.com/
>>
>> ... and I do not see here validation "that the link frequencies
>> specified in DT match".
>>
>> How do you validate that 1111 Hz is not / is a valid link frequency? How
>> did you exactly resolve the comment about validating?
>
> In the ov2735_parse_endpoint() function, the driver validates the link frequency
> from DT using `v4l2_link_freq_to_bitmap()`. If an unsupported value like 1111 Hz is
> provided, it returns an error:
But that's driver. You said that you added this property based on
feedback on validation. There is no validation here, thus the reason of
this property is not fulfilled and that's why I was asking. I know now
the answer...
>
> ret = v4l2_link_freq_to_bitmap(ov2735->dev, bus_cfg.link_frequencies,
> bus_cfg.nr_of_link_frequencies,
> link_freq_menu_items,
> ARRAY_SIZE(link_freq_menu_items),
> &link_freq_bitmap);
> if (ret) {
> ret = dev_err_probe(ov2735->dev,
> -EINVAL, "only 420MHz frequency is available\n");
> goto error_out;
> }
>
> So, validation is already done in the driver.
>
> I understand that `link-frequencies: true` in the schema only declares the property
> without restricting values. Would you prefer the schema to explicitly allow only
> 420MHz like this?
You missed the last paragraph of my last email. I don't want to have
here what the driver is doing, but what the hardware is/needs/requires.
It can also be missing completely, because we don't enforce such rules
on other bindings.
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-07-17 13:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-16 13:44 [PATCH v4 0/2] media: i2c: Add ov2735 camera sensor driver Hardevsinh Palaniya
2025-07-16 13:44 ` [PATCH v4 1/2] dt-bindings: media: i2c: Add ov2735 sensor Hardevsinh Palaniya
2025-07-16 13:58 ` Hardevsinh Palaniya
2025-07-17 6:26 ` Krzysztof Kozlowski
2025-07-17 6:30 ` Krzysztof Kozlowski
2025-07-17 7:28 ` Hardevsinh Palaniya
2025-07-17 11:00 ` Krzysztof Kozlowski
2025-07-17 11:55 ` Hardevsinh Palaniya
2025-07-17 13:00 ` Krzysztof Kozlowski [this message]
2025-07-17 13:30 ` Hardevsinh Palaniya
2025-07-16 13:44 ` [PATCH v4 2/2] media: i2c: add ov2735 image sensor driver Hardevsinh Palaniya
2025-07-16 14:46 ` Andy Shevchenko
2025-07-17 7:26 ` Hardevsinh Palaniya
2025-07-17 12:37 ` Andy Shevchenko
2025-07-17 13:11 ` Hardevsinh Palaniya
2025-07-21 17:21 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8cdea7c7-739a-4101-9e2f-1bb36632ff5a@kernel.org \
--to=krzk@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=benjamin.mugnier@foss.st.com \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dongcheng.yan@intel.com \
--cc=git@apitzsch.eu \
--cc=hansg@kernel.org \
--cc=hardevsinh.palaniya@siliconsignals.io \
--cc=heimir.sverrisson@gmail.com \
--cc=himanshu.bhavani@siliconsignals.io \
--cc=hverkuil@xs4all.nl \
--cc=jingjing.xiong@intel.com \
--cc=krzk+dt@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=matthias.fend@emfend.at \
--cc=mchehab@kernel.org \
--cc=ribalda@chromium.org \
--cc=robh@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=sylvain.petinot@foss.st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).