mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org,
	"Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Wolfram Sang" <wsa@kernel.org>,
	"Luca Ceresoli" <luca.ceresoli@bootlin.com>,
	"Matti Vaittinen" <Matti.Vaittinen@fi.rohmeurope.com>,
	"Laurent Pinchart" <laurent.pinchart+renesas@ideasonboard.com>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Peter Rosin" <peda@axentia.se>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Michael Tretter" <m.tretter@pengutronix.de>,
	"Shawn Tu" <shawnx.tu@intel.com>,
	"Hans Verkuil" <hverkuil@xs4all.nl>,
	"Mike Pagano" <mpagano@gentoo.org>,
	"Krzysztof Hałasa" <khalasa@piap.pl>,
	"Marek Vasut" <marex@denx.de>,
	"Satish Nagireddy" <satish.nagireddy@getcruise.com>
Subject: Re: [PATCH v9 0/8] i2c-atr and FPDLink
Date: Thu, 2 Mar 2023 17:52:24 +0200	[thread overview]
Message-ID: <96f8e0f9-d8cf-fa9b-a224-a5caad445992@ideasonboard.com> (raw)
In-Reply-To: <Y++E+Rr54p3vd8Jn@smile.fi.intel.com>

On 17/02/2023 15:45, Andy Shevchenko wrote:
> On Fri, Feb 17, 2023 at 02:57:02PM +0200, Tomi Valkeinen wrote:
>> On 17/02/2023 13:24, Andy Shevchenko wrote:
>>> On Fri, Feb 17, 2023 at 08:57:32AM +0200, Tomi Valkeinen wrote:
>>>> On 16/02/2023 17:53, Andy Shevchenko wrote:
>>>>> On Thu, Feb 16, 2023 at 04:07:39PM +0200, Tomi Valkeinen wrote:
> 
> ...
> 
>>>>>>     	struct i2c_board_info ser_info = {
>>>>>> -		.of_node = to_of_node(rxport->remote_fwnode),
>>>>>> -		.fwnode = rxport->remote_fwnode,
>>>>>
>>>>>> +		.of_node = to_of_node(rxport->ser.fwnode),
>>>>>> +		.fwnode = rxport->ser.fwnode,
>>>>>
>>>>> Why do you need to have both?!
>>>>
>>>> I didn't debug it, but having only fwnode there will break the probing (no
>>>> match).
>>>
>>> This needs to be investigated. The whole fwnode approach, when we have both
>>> fwnode and legacy of_node fields in the same data structure, is that fwnode
>>> _OR_ of_node initialization is enough, when both are defined the fwnode
>>> should take precedence.
>>>
>>> If your testing is correct (and I have no doubts) it means we have a serious
>>> bug lurking somewhere.
>>
>> Having both defined or only of_node defined works for me.
> 
> But of_node is _legacy_ stuff. We should not really consider this option in the
> new code.
> 
>> Perhaps the issue is that these drivers only add of_match_table, and thus
>> having only .fwnode above is not enough.
> 
> No, the code should work with fwnode that carrying DT node or another.
> The matching table shouldn't affect this either.
> 
>> Looking at i2c_device_match(), i2c_of_match_device() only uses of_node, so
>> perhaps I would need CONFIG_ACPI for acpi_driver_match_device to do matching
>> with of_node? Although I don't see the acpi code using fwnode, just of_node.
>> Well, I have to say I have no idea without spending more time on this.
> 
> Again, there is a bug and that bug seems nasty one as it would allow to
> work the device in one environment and not in another.
> 
> Since it's about I²C board files, I believe that an issue is in I²C core.

I don't know if this is related in any way, but I see these when probing:

[   36.952697] i2c 4-0044: Fixed dependency cycle(s) with /ocp/interconnect@48000000/segment@0/target-module@7c000/i2c@0/deser@3d/links/link@0/serializer/i2c/sensor@21/port/endpoint
[   36.969268] i2c 4-0044: Fixed dependency cycle(s) with /ocp/interconnect@48000000/segment@0/target-module@7c000/i2c@0/deser@3d/ports/port@0/endpoint
[   36.983001] i2c 4-0044: Failed to create device link with 4-0044
[   36.992828] ds90ub953 4-0044: Found ub953 rev/mask 0x20
[   37.017761] i2c 5-0021: Fixed dependency cycle(s) with /ocp/interconnect@48000000/segment@0/target-module@7c000/i2c@0/deser@3d/links/link@0/serializer/ports/port@0/endpoint
[   37.033843] i2c 5-0021: Fixed dependency cycle(s) with /ocp/interconnect@48000000/segment@0/target-module@7c000/i2c@0/deser@3d/links/link@0/serializer
[   37.117492] i2c 4-0045: Fixed dependency cycle(s) with /ocp/interconnect@48000000/segment@0/target-module@7c000/i2c@0/deser@3d/links/link@1/serializer/i2c/sensor@21/port/endpoint
[   37.134033] i2c 4-0045: Fixed dependency cycle(s) with /ocp/interconnect@48000000/segment@0/target-module@7c000/i2c@0/deser@3d/ports/port@1/endpoint
[   37.147735] i2c 4-0045: Failed to create device link with 4-0045
[   37.156097] ds90ub953 4-0045: Found ub953 rev/mask 0x20
[   37.186584] i2c 6-0021: Fixed dependency cycle(s) with /ocp/interconnect@48000000/segment@0/target-module@7c000/i2c@0/deser@3d/links/link@1/serializer/ports/port@0/endpoint
[   37.202636] i2c 6-0021: Fixed dependency cycle(s) with /ocp/interconnect@48000000/segment@0/target-module@7c000/i2c@0/deser@3d/links/link@1/serializer

Then again, I see similar warnings/errors for some other devices too, when booting up (TI's DRA76 EVM).

  Tomi


  reply	other threads:[~2023-03-02 15:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-16 14:07 Tomi Valkeinen
2023-02-16 14:07 ` [PATCH v9 1/8] i2c: add I2C Address Translator (ATR) support Tomi Valkeinen
2023-02-16 14:07 ` [PATCH v9 2/8] media: subdev: Split V4L2_SUBDEV_ROUTING_NO_STREAM_MIX Tomi Valkeinen
2023-02-16 14:07 ` [PATCH v9 3/8] dt-bindings: media: add TI DS90UB913 FPD-Link III Serializer Tomi Valkeinen
2023-02-16 14:07 ` [PATCH v9 4/8] dt-bindings: media: add TI DS90UB953 " Tomi Valkeinen
2023-02-16 14:07 ` [PATCH v9 5/8] dt-bindings: media: add TI DS90UB960 FPD-Link III Deserializer Tomi Valkeinen
2023-02-16 14:07 ` [PATCH v9 6/8] media: i2c: add DS90UB960 driver Tomi Valkeinen
2023-02-16 14:07 ` [PATCH v9 7/8] media: i2c: add DS90UB913 driver Tomi Valkeinen
2023-02-16 14:07 ` [PATCH v9 8/8] media: i2c: add DS90UB953 driver Tomi Valkeinen
2023-02-16 15:53 ` [PATCH v9 0/8] i2c-atr and FPDLink Andy Shevchenko
2023-02-17  6:57   ` Tomi Valkeinen
2023-02-17 11:24     ` Andy Shevchenko
2023-02-17 12:57       ` Tomi Valkeinen
2023-02-17 13:45         ` Andy Shevchenko
2023-03-02 15:52           ` Tomi Valkeinen [this message]
2023-03-02 16:16             ` 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=96f8e0f9-d8cf-fa9b-a224-a5caad445992@ideasonboard.com \
    --to=tomi.valkeinen@ideasonboard.com \
    --cc=Matti.Vaittinen@fi.rohmeurope.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hverkuil@xs4all.nl \
    --cc=khalasa@piap.pl \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=m.tretter@pengutronix.de \
    --cc=marex@denx.de \
    --cc=mchehab@kernel.org \
    --cc=mpagano@gentoo.org \
    --cc=peda@axentia.se \
    --cc=robh+dt@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=satish.nagireddy@getcruise.com \
    --cc=shawnx.tu@intel.com \
    --cc=wsa@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®