From: Volodymyr Kharuk <vkh@melexis.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
linux-media@vger.kernel.org, Andrii Kyselov <ays@melexis.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Hyun Kwon <hyun.kwon@xilinx.com>,
Michal Simek <michal.simek@xilinx.com>,
Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
devicetree@vger.kernel.org
Subject: Re: [PATCH v2 5/6] media: dt-bindings: media: i2c: Add mlx7502x camera sensor binding
Date: Wed, 20 Jul 2022 17:54:16 +0300 [thread overview]
Message-ID: <20220720145416.GA46182@melexis.com> (raw)
In-Reply-To: <85cb8f2d-5d8b-ffa9-9f53-0e8bc1233e69@linaro.org>
Hi Krzysztof,
On Thu, Jul 14, 2022 at 01:56:13PM +0200, Krzysztof Kozlowski wrote:
> On 14/07/2022 13:29, Laurent Pinchart wrote:
> > On Thu, Jul 14, 2022 at 01:23:41PM +0200, Krzysztof Kozlowski wrote:
> >> On 14/07/2022 13:12, Laurent Pinchart wrote:
> >>>>>>> One option would be to support the following three compatible values:
> >>>>>>>
> >>>>>>> compatible = "melexis,mlx75026", "melexis,mlx7502x";
> >>>>>>> compatible = "melexis,mlx75027", "melexis,mlx7502x";
> >>>>>>> compatible = "melexis,mlx7502x";
> >>>>>>>
> >>>>>>> The last one only would trigger autodetection. I'm still not sure how to
> >>>>>>> document that properly in bindings though.
> >>>>>>
> >>>>>> I missed that part of binding.
> >>>>>>
> >>>>>> Wildcards are not allowed in compatible, so mlx7502x has to go.
> >>>>>
> >>>>> Really ? We've had fallback generic compatible strings since the
> >>>>> beginning.
> >>>>
> >>>> Fallback generic compatibles are allowed. Wildcards not. Wildcards were
> >>>> actually never explicitly allowed, they just slipped in to many
> >>>> bindings... We have several discussions on this on mailing list, so no
> >>>> real point to repeat the arguments.
> >>>>
> >>>> There is a difference between generic fallback. If the device follows
> >>>> clear specification and version, e.g. "foo-bar-v4", you can use it for
> >>>> generic compatible. This is more common in SoC components. Requirement -
> >>>> there is a clear mapping between versions and SoCs.
> >>>
> >>> I'm not sure to see a clear difference between the two concepts.
> >>
> >> The clear difference is that you have a versioned and re-usable hardware
> >> block plus clear mapping which version goes to which SoC. Version
> >> numbers usually start with 1, not with 75025. 75025 is a model name.
> >
> > How about Documentation/devicetree/bindings/serial/renesas,scif.yaml for
> > instance, where the version number isn't known and the SoC name is used
> > instead ? Is that acceptable ?
>
> This is the second case I mentioned - family of devices where the family
> fallback is not allowed to be alone. You cannot use just "renesas,scif"
> in DTS.
>
> >
> > How should we deal with devices that have different models, where the
> > model is irrelevant to the kernel driver, but relevant to userspace ?
> > Imagine, for instance, a light sensor with 10 models than only differ by
> > the filter they use to tune the sensitivity to different light spectrums
> > ? They are all "compatible" from a software point of view, would the
> > driver need to list all 10 compatible strings ?
>
> I don't understand that example, I mean, what's the problem here? If
> they are all compatible, you can use only one comaptible, e.g.
> melexis,mlx75026.
>
> If you ever need to differentiate it for user-space, you add specific
> compatible for the model and you have:
>
> melexis,mlx75027, melexis,mlx75026
>
> If user-space needs dedicated compatibles - add them, no one here argues
> to not to use specific compatibles.
Thanks for explanation. Now I understand the device tree better and
the whole idea behind it. I'll remove wildcard and autodetect.
Instead I will use of_match_table only.
>
>
> >>> For cameras, we often deal with complex pipelines with multiple external
> >>> devices and multiple IP cores, with drivers that need to communicate
> >>> with each other to initialize the complete camera system. For instance,
> >>> each camera-related component in the system registers itself in a media
> >>> graph that can be queried from userspace and exposes information about
> >>> all devices, including their model. There's no power up of any device
> >>> when this query is being performed from userspace. It could possibly be
> >>> changed (and maybe it should, for reasons unrelated to this discussion),
> >>> but we're looking at pretty much a complete redesign of V4L2 and MC
> >>> then.
> >>
> >> Is then autodetection a real use case since you have to power up the
> >> sensor each time system boots and this violates privacy? Several I2C
> >> sensors do not care about this and they always do it on power up, so
> >> aren't we solving here something unimportant?
> >
> > In a laptop or tablet with a camera sensor, you likely don't want
> > autodetection. In an industrial device, you don't care, and having the
> > ability to auto-detect the exact sensor model when booting saves cost in
> > the production chain as a single image can work across different models.
>
> We talk about the case here, not generic. Do you want to have
> autodetection possible here or not?
>
> Best regards,
> Krzysztof
--
--
Volodymyr Kharuk
Embedded Software Engineer
Melexis-Ukraine
Mykhaila Kotel'nykova St, 4, Kyiv
Mobile phone: +38 050 346 5527
www.melexis.com
---
The contents of this e-mail are CONFIDENTIAL AND PROPRIETARY. Please read
our disclaimer at http://www.melexis.com/mailpolicy
next prev parent reply other threads:[~2022-07-20 14:54 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-14 8:34 [PATCH v2 0/6] media: i2c: mlx7502x ToF camera support Volodymyr Kharuk
2022-07-14 8:34 ` [PATCH v2 1/6] media: xilinx: csi2rxss: Add 1X12 greyscale format Volodymyr Kharuk
2022-07-14 10:32 ` Laurent Pinchart
2022-07-14 8:34 ` [PATCH v2 2/6] media: xilinx: video: " Volodymyr Kharuk
2022-07-14 10:36 ` Laurent Pinchart
2022-07-14 8:34 ` [PATCH v2 3/6] media: v4l: ctrls: Add user control base for mlx7502x Volodymyr Kharuk
2022-07-14 8:34 ` [PATCH v2 4/6] media: uapi: Add mlx7502x header file Volodymyr Kharuk
2022-07-14 10:31 ` Laurent Pinchart
2022-07-15 8:57 ` Volodymyr Kharuk
2022-07-15 9:36 ` Laurent Pinchart
2022-07-15 15:03 ` Volodymyr Kharuk
2022-07-19 15:20 ` Benjamin Mugnier
2022-07-19 15:31 ` Dave Stevenson
2022-07-20 14:44 ` Volodymyr Kharuk
2022-07-21 9:58 ` Benjamin Mugnier
2022-07-14 8:34 ` [PATCH v2 5/6] media: dt-bindings: media: i2c: Add mlx7502x camera sensor binding Volodymyr Kharuk
2022-07-14 8:41 ` Krzysztof Kozlowski
2022-07-14 10:06 ` Laurent Pinchart
2022-07-14 10:35 ` Krzysztof Kozlowski
2022-07-14 10:45 ` Laurent Pinchart
2022-07-14 11:00 ` Krzysztof Kozlowski
2022-07-14 11:11 ` Krzysztof Kozlowski
2022-07-14 11:12 ` Laurent Pinchart
2022-07-14 11:23 ` Krzysztof Kozlowski
2022-07-14 11:29 ` Laurent Pinchart
2022-07-14 11:56 ` Krzysztof Kozlowski
2022-07-20 14:54 ` Volodymyr Kharuk [this message]
2023-02-06 10:45 ` Laurent Pinchart
2023-02-06 18:20 ` Krzysztof Kozlowski
2023-02-06 18:35 ` Laurent Pinchart
2022-07-15 15:32 ` Volodymyr Kharuk
2023-02-06 10:36 ` Laurent Pinchart
2022-07-14 8:34 ` [PATCH v2 6/6] media: i2c: Add driver for mlx7502x ToF sensor Volodymyr Kharuk
2022-07-17 1:33 ` kernel test robot
2022-07-17 23:52 ` kernel test robot
2022-07-18 6:20 ` kernel test robot
2022-07-19 8:16 ` kernel test robot
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=20220720145416.GA46182@melexis.com \
--to=vkh@melexis.com \
--cc=ays@melexis.com \
--cc=devicetree@vger.kernel.org \
--cc=hyun.kwon@xilinx.com \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=michal.simek@xilinx.com \
--cc=robh+dt@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.