Thread (7 messages) 7 messages, 5 authors, 2025-03-20

Re: [PATCH] phy: can-transceiver: Re-instate "mux-states" property presence check

From: Vincent Mailhol <hidden>
Date: 2025-03-19 15:48:19
Also in: linux-can, linux-renesas-soc, lkml

On 19/03/2025 at 23:06, Vincent Mailhol wrote:
For some reasons, I received your message twice (with a two minutes
interval between both messages). These look identical. I am answering
the most recent. :)

On 19/03/2025 at 22:27, Geert Uytterhoeven wrote:
quoted
On the Renesas Gray Hawk Single development board:

    can-transceiver-phy can-phy0: /can-phy0: failed to get mux-state (0)

"mux-states" is an optional property for CAN transceivers.  However,
mux_get() always prints an error message in case of an error, including
when the property is not present, confusing the user.
Hmmm, I understand why you are doing this patch. But on the long term,
wouldn't it make more sense to have a devm_mux_state_get_optional()? Or
maybe add a property somewhere to inform devm_mux_state_get() that this
is optional?

Regardless, just see this as an open question. I am OK with the approach
of your patch.
Ah, and I just realized that you mentioned the exact same thing under
the --- cutter, which for some reasons my eyes refused to see.

Sorry for the noise.
quoted
Fix this by re-instating the property presence check.

This is bascially a revert of commit d02dfd4ceb2e9f34 ("phy:
can-transceiver: Drop unnecessary "mux-states" property presence
check"), with two changes:
  1. Use the proper API for checking whether a property is present,
  2. Do not print an error message, as the mux core already takes care
     of that.

Fixes: d02dfd4ceb2e9f34 ("phy: can-transceiver: Drop unnecessary "mux-states" property presence check")> Signed-off-by: Geert Uytterhoeven [off-list ref]
Notwithstanding of above comment:

Reviewed-by: Vincent Mailhol <redacted>
Yours sincerely,
Vincent Mailhol


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help