* [PATCH next] phy: renesas: rcar-gen3-usb2: Drop local devm_mux_state_get_optional()
@ 2026-02-10 10:53 Geert Uytterhoeven
2026-02-10 11:26 ` Tommaso Merciai
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Geert Uytterhoeven @ 2026-02-10 10:53 UTC (permalink / raw)
To: Yoshihiro Shimoda, Vinod Koul, Neil Armstrong, Josua Mayer,
Ulf Hansson, Wolfram Sang, Tommaso Merciai
Cc: linux-phy, linux-mmc, linux-renesas-soc, linux-next, linux-kernel,
Geert Uytterhoeven
Now the mux core provides devm_mux_state_get_optional():
drivers/phy/renesas/phy-rcar-gen3-usb2.c:944:1: error: static declaration of ‘devm_mux_state_get_optional’ follows non-static
declaration
944 | devm_mux_state_get_optional(struct device *dev, const char *mux_name)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/phy/renesas/phy-rcar-gen3-usb2.c:20:
include/linux/mux/consumer.h:64:19: note: previous declaration of ‘devm_mux_state_get_optional’ with type ‘struct mux_state *(struct device *, const char *)’
64 | struct mux_state *devm_mux_state_get_optional(struct device *dev, const char *mux_name);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Fix this by dropping the temporary local wrapper.
Fixes: ad314348ceb4fe1f ("mux: Add helper functions for getting optional and selected mux-state")
Fixes: 8bb92fd7a0407792 ("phy: renesas: rcar-gen3-usb2: Use mux-state for phyrst management")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
- ad314348ceb4fe1f is in mmc/next, and a PR has already been sent
https://lore.kernel.org/20260209133441.556464-1-ulf.hansson@linaro.org
- 8bb92fd7a0407792 is in phy/next
---
drivers/phy/renesas/phy-rcar-gen3-usb2.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
index cfc2a8d9028d58d0..65cbf330bd8fa10c 100644
--- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
@@ -939,16 +939,6 @@ static int rcar_gen3_phy_usb2_vbus_regulator_register(struct rcar_gen3_chan *cha
return rcar_gen3_phy_usb2_vbus_regulator_get_exclusive_enable(channel, enable);
}
-/* Temporary wrapper until the multiplexer subsystem supports optional muxes */
-static inline struct mux_state *
-devm_mux_state_get_optional(struct device *dev, const char *mux_name)
-{
- if (!of_property_present(dev->of_node, "mux-states"))
- return NULL;
-
- return devm_mux_state_get(dev, mux_name);
-}
-
static void rcar_gen3_phy_mux_state_deselect(void *data)
{
mux_state_deselect(data);
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH next] phy: renesas: rcar-gen3-usb2: Drop local devm_mux_state_get_optional()
2026-02-10 10:53 [PATCH next] phy: renesas: rcar-gen3-usb2: Drop local devm_mux_state_get_optional() Geert Uytterhoeven
@ 2026-02-10 11:26 ` Tommaso Merciai
2026-02-10 13:34 ` Ulf Hansson
` (2 subsequent siblings)
3 siblings, 0 replies; 11+ messages in thread
From: Tommaso Merciai @ 2026-02-10 11:26 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Yoshihiro Shimoda, Vinod Koul, Neil Armstrong, Josua Mayer,
Ulf Hansson, Wolfram Sang, linux-phy, linux-mmc,
linux-renesas-soc, linux-next, linux-kernel
Hi Geert,
Thanks for your patch!
On Tue, Feb 10, 2026 at 11:53:00AM +0100, Geert Uytterhoeven wrote:
> Now the mux core provides devm_mux_state_get_optional():
>
> drivers/phy/renesas/phy-rcar-gen3-usb2.c:944:1: error: static declaration of ‘devm_mux_state_get_optional’ follows non-static
> declaration
> 944 | devm_mux_state_get_optional(struct device *dev, const char *mux_name)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from drivers/phy/renesas/phy-rcar-gen3-usb2.c:20:
> include/linux/mux/consumer.h:64:19: note: previous declaration of ‘devm_mux_state_get_optional’ with type ‘struct mux_state *(struct device *, const char *)’
> 64 | struct mux_state *devm_mux_state_get_optional(struct device *dev, const char *mux_name);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Fix this by dropping the temporary local wrapper.
>
> Fixes: ad314348ceb4fe1f ("mux: Add helper functions for getting optional and selected mux-state")
> Fixes: 8bb92fd7a0407792 ("phy: renesas: rcar-gen3-usb2: Use mux-state for phyrst management")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> - ad314348ceb4fe1f is in mmc/next, and a PR has already been sent
> https://lore.kernel.org/20260209133441.556464-1-ulf.hansson@linaro.org
> - 8bb92fd7a0407792 is in phy/next
Thanks for sharing :)
> ---
> drivers/phy/renesas/phy-rcar-gen3-usb2.c | 10 ----------
> 1 file changed, 10 deletions(-)
>
> diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> index cfc2a8d9028d58d0..65cbf330bd8fa10c 100644
> --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> @@ -939,16 +939,6 @@ static int rcar_gen3_phy_usb2_vbus_regulator_register(struct rcar_gen3_chan *cha
> return rcar_gen3_phy_usb2_vbus_regulator_get_exclusive_enable(channel, enable);
> }
>
> -/* Temporary wrapper until the multiplexer subsystem supports optional muxes */
> -static inline struct mux_state *
> -devm_mux_state_get_optional(struct device *dev, const char *mux_name)
> -{
> - if (!of_property_present(dev->of_node, "mux-states"))
> - return NULL;
> -
> - return devm_mux_state_get(dev, mux_name);
> -}
> -
> static void rcar_gen3_phy_mux_state_deselect(void *data)
> {
> mux_state_deselect(data);
> --
> 2.43.0
LGTM.
Tested on RZ/G3E.
Tested-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Reviewed-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Kind Regards,
Tommaso
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH next] phy: renesas: rcar-gen3-usb2: Drop local devm_mux_state_get_optional()
2026-02-10 10:53 [PATCH next] phy: renesas: rcar-gen3-usb2: Drop local devm_mux_state_get_optional() Geert Uytterhoeven
2026-02-10 11:26 ` Tommaso Merciai
@ 2026-02-10 13:34 ` Ulf Hansson
2026-02-11 16:17 ` Vinod Koul
2026-02-11 16:21 ` kernel test robot
2026-02-12 0:39 ` kernel test robot
3 siblings, 1 reply; 11+ messages in thread
From: Ulf Hansson @ 2026-02-10 13:34 UTC (permalink / raw)
To: Vinod Koul, Geert Uytterhoeven
Cc: Yoshihiro Shimoda, Neil Armstrong, Josua Mayer, Wolfram Sang,
Tommaso Merciai, linux-phy, linux-mmc, linux-renesas-soc,
linux-next, linux-kernel
On Tue, 10 Feb 2026 at 11:53, Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
>
> Now the mux core provides devm_mux_state_get_optional():
>
> drivers/phy/renesas/phy-rcar-gen3-usb2.c:944:1: error: static declaration of ‘devm_mux_state_get_optional’ follows non-static
> declaration
> 944 | devm_mux_state_get_optional(struct device *dev, const char *mux_name)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from drivers/phy/renesas/phy-rcar-gen3-usb2.c:20:
> include/linux/mux/consumer.h:64:19: note: previous declaration of ‘devm_mux_state_get_optional’ with type ‘struct mux_state *(struct device *, const char *)’
> 64 | struct mux_state *devm_mux_state_get_optional(struct device *dev, const char *mux_name);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Fix this by dropping the temporary local wrapper.
>
> Fixes: ad314348ceb4fe1f ("mux: Add helper functions for getting optional and selected mux-state")
> Fixes: 8bb92fd7a0407792 ("phy: renesas: rcar-gen3-usb2: Use mux-state for phyrst management")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Thanks Geert for helping out!
> ---
> - ad314348ceb4fe1f is in mmc/next, and a PR has already been sent
> https://lore.kernel.org/20260209133441.556464-1-ulf.hansson@linaro.org
> - 8bb92fd7a0407792 is in phy/next
Vinod, do you want to pick up the $subject patch as a fix for 7.0-rc1
or do you prefer me to handle it?
Kind regards
Uffe
> ---
> drivers/phy/renesas/phy-rcar-gen3-usb2.c | 10 ----------
> 1 file changed, 10 deletions(-)
>
> diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> index cfc2a8d9028d58d0..65cbf330bd8fa10c 100644
> --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> @@ -939,16 +939,6 @@ static int rcar_gen3_phy_usb2_vbus_regulator_register(struct rcar_gen3_chan *cha
> return rcar_gen3_phy_usb2_vbus_regulator_get_exclusive_enable(channel, enable);
> }
>
> -/* Temporary wrapper until the multiplexer subsystem supports optional muxes */
> -static inline struct mux_state *
> -devm_mux_state_get_optional(struct device *dev, const char *mux_name)
> -{
> - if (!of_property_present(dev->of_node, "mux-states"))
> - return NULL;
> -
> - return devm_mux_state_get(dev, mux_name);
> -}
> -
> static void rcar_gen3_phy_mux_state_deselect(void *data)
> {
> mux_state_deselect(data);
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH next] phy: renesas: rcar-gen3-usb2: Drop local devm_mux_state_get_optional()
2026-02-10 13:34 ` Ulf Hansson
@ 2026-02-11 16:17 ` Vinod Koul
2026-02-11 16:30 ` Geert Uytterhoeven
2026-02-12 10:39 ` Ulf Hansson
0 siblings, 2 replies; 11+ messages in thread
From: Vinod Koul @ 2026-02-11 16:17 UTC (permalink / raw)
To: Ulf Hansson
Cc: Geert Uytterhoeven, Vladimir Oltean, Yoshihiro Shimoda,
Neil Armstrong, Josua Mayer, Wolfram Sang, Tommaso Merciai,
linux-phy, linux-mmc, linux-renesas-soc, linux-next, linux-kernel
On 10-02-26, 14:34, Ulf Hansson wrote:
> On Tue, 10 Feb 2026 at 11:53, Geert Uytterhoeven
> <geert+renesas@glider.be> wrote:
> >
> > Now the mux core provides devm_mux_state_get_optional():
> >
> > drivers/phy/renesas/phy-rcar-gen3-usb2.c:944:1: error: static declaration of ‘devm_mux_state_get_optional’ follows non-static
> > declaration
> > 944 | devm_mux_state_get_optional(struct device *dev, const char *mux_name)
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> > In file included from drivers/phy/renesas/phy-rcar-gen3-usb2.c:20:
> > include/linux/mux/consumer.h:64:19: note: previous declaration of ‘devm_mux_state_get_optional’ with type ‘struct mux_state *(struct device *, const char *)’
> > 64 | struct mux_state *devm_mux_state_get_optional(struct device *dev, const char *mux_name);
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > Fix this by dropping the temporary local wrapper.
> >
> > Fixes: ad314348ceb4fe1f ("mux: Add helper functions for getting optional and selected mux-state")
> > Fixes: 8bb92fd7a0407792 ("phy: renesas: rcar-gen3-usb2: Use mux-state for phyrst management")
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> Thanks Geert for helping out!
>
> > ---
> > - ad314348ceb4fe1f is in mmc/next, and a PR has already been sent
> > https://lore.kernel.org/20260209133441.556464-1-ulf.hansson@linaro.org
> > - 8bb92fd7a0407792 is in phy/next
>
> Vinod, do you want to pick up the $subject patch as a fix for 7.0-rc1
> or do you prefer me to handle it?
Should I drop the 8bb92fd7a0407792 and it makes things easier for
everyone and then we can pick fixed commit for 7.1 cycle..
Does that work for everyone. I was about to send PR, will hold off for a
bit.
Thanks
--
~Vinod
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH next] phy: renesas: rcar-gen3-usb2: Drop local devm_mux_state_get_optional()
2026-02-10 10:53 [PATCH next] phy: renesas: rcar-gen3-usb2: Drop local devm_mux_state_get_optional() Geert Uytterhoeven
2026-02-10 11:26 ` Tommaso Merciai
2026-02-10 13:34 ` Ulf Hansson
@ 2026-02-11 16:21 ` kernel test robot
2026-02-12 0:39 ` kernel test robot
3 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2026-02-11 16:21 UTC (permalink / raw)
To: Geert Uytterhoeven, Yoshihiro Shimoda, Vinod Koul, Neil Armstrong,
Josua Mayer, Ulf Hansson, Wolfram Sang, Tommaso Merciai
Cc: llvm, oe-kbuild-all, linux-phy, linux-mmc, linux-renesas-soc,
linux-next, linux-kernel, Geert Uytterhoeven
Hi Geert,
kernel test robot noticed the following build errors:
[auto build test ERROR on next-20260209]
url: https://github.com/intel-lab-lkp/linux/commits/Geert-Uytterhoeven/phy-renesas-rcar-gen3-usb2-Drop-local-devm_mux_state_get_optional/20260210-185437
base: next-20260209
patch link: https://lore.kernel.org/r/67c8c4f9bf9f09fd0c13daedef27b82ff389ddfb.1770720452.git.geert%2Brenesas%40glider.be
patch subject: [PATCH next] phy: renesas: rcar-gen3-usb2: Drop local devm_mux_state_get_optional()
config: riscv-allyesconfig (https://download.01.org/0day-ci/archive/20260212/202602120031.iupmQxdk-lkp@intel.com/config)
compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260212/202602120031.iupmQxdk-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602120031.iupmQxdk-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/phy/renesas/phy-rcar-gen3-usb2.c:1029:14: error: call to undeclared function 'devm_mux_state_get_optional'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
mux_state = devm_mux_state_get_optional(dev, NULL);
^
drivers/phy/renesas/phy-rcar-gen3-usb2.c:1029:14: note: did you mean 'devm_regulator_get_optional'?
include/linux/regulator/consumer.h:163:32: note: 'devm_regulator_get_optional' declared here
struct regulator *__must_check devm_regulator_get_optional(struct device *dev,
^
>> drivers/phy/renesas/phy-rcar-gen3-usb2.c:1029:12: error: incompatible integer to pointer conversion assigning to 'struct mux_state *' from 'int' [-Wint-conversion]
mux_state = devm_mux_state_get_optional(dev, NULL);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
vim +/devm_mux_state_get_optional +1029 drivers/phy/renesas/phy-rcar-gen3-usb2.c
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 946
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 947 static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 948 {
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 949 struct device *dev = &pdev->dev;
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 950 struct rcar_gen3_chan *channel;
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 951 struct phy_provider *provider;
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 952 struct mux_state *mux_state;
de76809f60cc93 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-05-07 953 int ret = 0, i, irq;
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 954
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 955 if (!dev->of_node) {
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 956 dev_err(dev, "This driver needs device tree\n");
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 957 return -EINVAL;
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 958 }
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 959
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 960 channel = devm_kzalloc(dev, sizeof(*channel), GFP_KERNEL);
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 961 if (!channel)
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 962 return -ENOMEM;
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 963
0b5604affbec02 drivers/phy/renesas/phy-rcar-gen3-usb2.c Chunfeng Yun 2020-11-06 964 channel->base = devm_platform_ioremap_resource(pdev, 0);
801a69c787812f drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-03-03 965 if (IS_ERR(channel->base))
801a69c787812f drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-03-03 966 return PTR_ERR(channel->base);
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 967
549b6b55b00558 drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2019-04-11 968 channel->dr_mode = rcar_gen3_get_dr_mode(dev->of_node);
73801b90a38ff1 drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2018-09-21 969 if (channel->dr_mode != USB_DR_MODE_UNKNOWN) {
979b519c7a1bff drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2018-09-21 970 channel->is_otg_channel = true;
8dde0008ffc9e2 drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2018-09-21 971 channel->uses_otg_pins = !of_property_read_bool(dev->of_node,
8dde0008ffc9e2 drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2018-09-21 972 "renesas,no-otg-pins");
2b38543c8db1c7 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-04-29 973 channel->extcon = devm_extcon_dev_allocate(dev,
2b38543c8db1c7 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-04-29 974 rcar_gen3_phy_cable);
2b38543c8db1c7 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-04-29 975 if (IS_ERR(channel->extcon))
2b38543c8db1c7 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-04-29 976 return PTR_ERR(channel->extcon);
2b38543c8db1c7 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-04-29 977
2b38543c8db1c7 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-04-29 978 ret = devm_extcon_dev_register(dev, channel->extcon);
2b38543c8db1c7 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-04-29 979 if (ret < 0) {
2b38543c8db1c7 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-04-29 980 dev_err(dev, "Failed to register extcon\n");
2b38543c8db1c7 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-04-29 981 return ret;
2b38543c8db1c7 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-04-29 982 }
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 983 }
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 984
942a7a6bf4c6a8 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-11-19 985 channel->rstc = devm_reset_control_array_get_optional_shared(dev);
942a7a6bf4c6a8 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-11-19 986 if (IS_ERR(channel->rstc))
942a7a6bf4c6a8 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-11-19 987 return PTR_ERR(channel->rstc);
942a7a6bf4c6a8 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-11-19 988
942a7a6bf4c6a8 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-11-19 989 ret = reset_control_deassert(channel->rstc);
942a7a6bf4c6a8 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-11-19 990 if (ret)
942a7a6bf4c6a8 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-11-19 991 return ret;
942a7a6bf4c6a8 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-11-19 992
942a7a6bf4c6a8 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-11-19 993 ret = devm_add_action_or_reset(dev, rcar_gen3_reset_assert, channel->rstc);
942a7a6bf4c6a8 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-11-19 994 if (ret)
942a7a6bf4c6a8 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-11-19 995 return ret;
942a7a6bf4c6a8 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-11-19 996
441a681b884347 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2017-03-14 997 /*
441a681b884347 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2017-03-14 998 * devm_phy_create() will call pm_runtime_enable(&phy->dev);
441a681b884347 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2017-03-14 999 * And then, phy-core will manage runtime pm for this device.
441a681b884347 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2017-03-14 1000 */
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1001 ret = devm_pm_runtime_enable(dev);
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1002 if (ret)
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1003 return dev_err_probe(dev, ret, "Failed to enable pm_runtime\n");
b0512a6ec0cd6d drivers/phy/renesas/phy-rcar-gen3-usb2.c Biju Das 2021-07-27 1004
f75806d26318c0 drivers/phy/renesas/phy-rcar-gen3-usb2.c Lad Prabhakar 2025-08-08 1005 channel->phy_data = of_device_get_match_data(dev);
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1006 if (!channel->phy_data)
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1007 return -EINVAL;
5d8042e95fd471 drivers/phy/renesas/phy-rcar-gen3-usb2.c Biju Das 2019-04-10 1008
4eae16375357a2 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2024-08-22 1009 platform_set_drvdata(pdev, channel);
4eae16375357a2 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2024-08-22 1010 channel->dev = dev;
4eae16375357a2 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2024-08-22 1011
4eae16375357a2 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2024-08-22 1012 ret = rcar_gen3_phy_usb2_init_bus(channel);
4eae16375357a2 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2024-08-22 1013 if (ret)
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1014 return ret;
4eae16375357a2 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2024-08-22 1015
55a387ebb9219c drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-05-07 1016 spin_lock_init(&channel->lock);
549b6b55b00558 drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2019-04-11 1017 for (i = 0; i < NUM_OF_PHYS; i++) {
549b6b55b00558 drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2019-04-11 1018 channel->rphys[i].phy = devm_phy_create(dev, NULL,
f75806d26318c0 drivers/phy/renesas/phy-rcar-gen3-usb2.c Lad Prabhakar 2025-08-08 1019 channel->phy_data->phy_usb2_ops);
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1020 if (IS_ERR(channel->rphys[i].phy))
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1021 return dev_err_probe(dev, PTR_ERR(channel->rphys[i].phy),
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1022 "Failed to create USB2 PHY\n");
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1023
549b6b55b00558 drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2019-04-11 1024 channel->rphys[i].ch = channel;
549b6b55b00558 drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2019-04-11 1025 channel->rphys[i].int_enable_bits = rcar_gen3_int_enable[i];
549b6b55b00558 drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2019-04-11 1026 phy_set_drvdata(channel->rphys[i].phy, &channel->rphys[i]);
549b6b55b00558 drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2019-04-11 1027 }
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 1028
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 @1029 mux_state = devm_mux_state_get_optional(dev, NULL);
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1030 if (IS_ERR(mux_state))
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1031 return PTR_ERR(mux_state);
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1032 if (mux_state) {
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1033 ret = mux_state_select(mux_state);
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1034 if (ret)
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1035 return dev_err_probe(dev, ret, "Failed to select USB mux\n");
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1036
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1037 ret = devm_add_action_or_reset(dev, rcar_gen3_phy_mux_state_deselect,
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1038 mux_state);
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1039 if (ret)
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1040 return dev_err_probe(dev, ret,
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1041 "Failed to register USB mux state deselect\n");
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1042 }
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1043
b6d7dd157763e0 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1044 if (channel->phy_data->no_adp_ctrl && channel->is_otg_channel) {
b6d7dd157763e0 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1045 ret = rcar_gen3_phy_usb2_vbus_regulator_register(channel);
b6d7dd157763e0 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1046 if (ret)
b6d7dd157763e0 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1047 return ret;
b6d7dd157763e0 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1048 } else {
6dcfd7c300bf35 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-03-03 1049 channel->vbus = devm_regulator_get_optional(dev, "vbus");
b6d7dd157763e0 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1050 }
6dcfd7c300bf35 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-03-03 1051 if (IS_ERR(channel->vbus)) {
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1052 if (PTR_ERR(channel->vbus) == -EPROBE_DEFER)
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1053 return PTR_ERR(channel->vbus);
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1054
6dcfd7c300bf35 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-03-03 1055 channel->vbus = NULL;
6dcfd7c300bf35 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-03-03 1056 }
6dcfd7c300bf35 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-03-03 1057
de76809f60cc93 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-05-07 1058 irq = platform_get_irq_optional(pdev, 0);
de76809f60cc93 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-05-07 1059 if (irq < 0 && irq != -ENXIO) {
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1060 return irq;
de76809f60cc93 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-05-07 1061 } else if (irq > 0) {
de76809f60cc93 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-05-07 1062 INIT_WORK(&channel->work, rcar_gen3_phy_usb2_work);
de76809f60cc93 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-05-07 1063 ret = devm_request_irq(dev, irq, rcar_gen3_phy_usb2_irq,
de76809f60cc93 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-05-07 1064 IRQF_SHARED, dev_name(dev), channel);
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1065 if (ret < 0)
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1066 return dev_err_probe(dev, ret,
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1067 "Failed to request irq (%d)\n",
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1068 irq);
de76809f60cc93 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-05-07 1069 }
de76809f60cc93 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-05-07 1070
549b6b55b00558 drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2019-04-11 1071 provider = devm_of_phy_provider_register(dev, rcar_gen3_phy_usb2_xlate);
9bb86777fb71ee drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-11-09 1072 if (IS_ERR(provider)) {
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1073 return dev_err_probe(dev, PTR_ERR(provider),
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1074 "Failed to register PHY provider\n");
979b519c7a1bff drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2018-09-21 1075 } else if (channel->is_otg_channel) {
9bb86777fb71ee drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-11-09 1076 ret = device_create_file(dev, &dev_attr_role);
9bb86777fb71ee drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-11-09 1077 if (ret < 0)
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1078 return ret;
9bb86777fb71ee drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-11-09 1079 }
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 1080
441a681b884347 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2017-03-14 1081 return 0;
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 1082 }
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 1083
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH next] phy: renesas: rcar-gen3-usb2: Drop local devm_mux_state_get_optional()
2026-02-11 16:17 ` Vinod Koul
@ 2026-02-11 16:30 ` Geert Uytterhoeven
2026-02-12 4:59 ` Vinod Koul
2026-02-12 10:39 ` Ulf Hansson
1 sibling, 1 reply; 11+ messages in thread
From: Geert Uytterhoeven @ 2026-02-11 16:30 UTC (permalink / raw)
To: Vinod Koul
Cc: Ulf Hansson, Vladimir Oltean, Yoshihiro Shimoda, Neil Armstrong,
Josua Mayer, Wolfram Sang, Tommaso Merciai, linux-phy, linux-mmc,
linux-renesas-soc, linux-next, linux-kernel
Hi Vinod,
On Wed, 11 Feb 2026 at 17:17, Vinod Koul <vkoul@kernel.org> wrote:
> On 10-02-26, 14:34, Ulf Hansson wrote:
> > On Tue, 10 Feb 2026 at 11:53, Geert Uytterhoeven
> > <geert+renesas@glider.be> wrote:
> > > Now the mux core provides devm_mux_state_get_optional():
> > >
> > > drivers/phy/renesas/phy-rcar-gen3-usb2.c:944:1: error: static declaration of ‘devm_mux_state_get_optional’ follows non-static
> > > declaration
> > > 944 | devm_mux_state_get_optional(struct device *dev, const char *mux_name)
> > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > In file included from drivers/phy/renesas/phy-rcar-gen3-usb2.c:20:
> > > include/linux/mux/consumer.h:64:19: note: previous declaration of ‘devm_mux_state_get_optional’ with type ‘struct mux_state *(struct device *, const char *)’
> > > 64 | struct mux_state *devm_mux_state_get_optional(struct device *dev, const char *mux_name);
> > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> > >
> > > Fix this by dropping the temporary local wrapper.
> > >
> > > Fixes: ad314348ceb4fe1f ("mux: Add helper functions for getting optional and selected mux-state")
> > > Fixes: 8bb92fd7a0407792 ("phy: renesas: rcar-gen3-usb2: Use mux-state for phyrst management")
> > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> >
> > Thanks Geert for helping out!
> >
> > > ---
> > > - ad314348ceb4fe1f is in mmc/next, and a PR has already been sent
> > > https://lore.kernel.org/20260209133441.556464-1-ulf.hansson@linaro.org
> > > - 8bb92fd7a0407792 is in phy/next
> >
> > Vinod, do you want to pick up the $subject patch as a fix for 7.0-rc1
> > or do you prefer me to handle it?
>
> Should I drop the 8bb92fd7a0407792 and it makes things easier for
> everyone and then we can pick fixed commit for 7.1 cycle..
>
> Does that work for everyone. I was about to send PR, will hold off for a
> bit.
Alternatively, you can mention the semantic conflict in your PR to Linus,
and ask him to fold my patch into the merge commit.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH next] phy: renesas: rcar-gen3-usb2: Drop local devm_mux_state_get_optional()
2026-02-10 10:53 [PATCH next] phy: renesas: rcar-gen3-usb2: Drop local devm_mux_state_get_optional() Geert Uytterhoeven
` (2 preceding siblings ...)
2026-02-11 16:21 ` kernel test robot
@ 2026-02-12 0:39 ` kernel test robot
3 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2026-02-12 0:39 UTC (permalink / raw)
To: Geert Uytterhoeven, Yoshihiro Shimoda, Vinod Koul, Neil Armstrong,
Josua Mayer, Ulf Hansson, Wolfram Sang, Tommaso Merciai
Cc: oe-kbuild-all, linux-phy, linux-mmc, linux-renesas-soc,
linux-next, linux-kernel, Geert Uytterhoeven
Hi Geert,
kernel test robot noticed the following build errors:
[auto build test ERROR on next-20260209]
url: https://github.com/intel-lab-lkp/linux/commits/Geert-Uytterhoeven/phy-renesas-rcar-gen3-usb2-Drop-local-devm_mux_state_get_optional/20260210-185437
base: next-20260209
patch link: https://lore.kernel.org/r/67c8c4f9bf9f09fd0c13daedef27b82ff389ddfb.1770720452.git.geert%2Brenesas%40glider.be
patch subject: [PATCH next] phy: renesas: rcar-gen3-usb2: Drop local devm_mux_state_get_optional()
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20260212/202602120804.JhBk63IH-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260212/202602120804.JhBk63IH-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602120804.JhBk63IH-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/phy/renesas/phy-rcar-gen3-usb2.c: In function 'rcar_gen3_phy_usb2_probe':
>> drivers/phy/renesas/phy-rcar-gen3-usb2.c:1029:21: error: implicit declaration of function 'devm_mux_state_get_optional'; did you mean 'devm_regulator_get_optional'? [-Wimplicit-function-declaration]
1029 | mux_state = devm_mux_state_get_optional(dev, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| devm_regulator_get_optional
>> drivers/phy/renesas/phy-rcar-gen3-usb2.c:1029:19: error: assignment to 'struct mux_state *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
1029 | mux_state = devm_mux_state_get_optional(dev, NULL);
| ^
vim +1029 drivers/phy/renesas/phy-rcar-gen3-usb2.c
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 946
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 947 static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 948 {
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 949 struct device *dev = &pdev->dev;
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 950 struct rcar_gen3_chan *channel;
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 951 struct phy_provider *provider;
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 952 struct mux_state *mux_state;
de76809f60cc93 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-05-07 953 int ret = 0, i, irq;
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 954
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 955 if (!dev->of_node) {
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 956 dev_err(dev, "This driver needs device tree\n");
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 957 return -EINVAL;
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 958 }
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 959
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 960 channel = devm_kzalloc(dev, sizeof(*channel), GFP_KERNEL);
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 961 if (!channel)
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 962 return -ENOMEM;
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 963
0b5604affbec02 drivers/phy/renesas/phy-rcar-gen3-usb2.c Chunfeng Yun 2020-11-06 964 channel->base = devm_platform_ioremap_resource(pdev, 0);
801a69c787812f drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-03-03 965 if (IS_ERR(channel->base))
801a69c787812f drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-03-03 966 return PTR_ERR(channel->base);
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 967
549b6b55b00558 drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2019-04-11 968 channel->dr_mode = rcar_gen3_get_dr_mode(dev->of_node);
73801b90a38ff1 drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2018-09-21 969 if (channel->dr_mode != USB_DR_MODE_UNKNOWN) {
979b519c7a1bff drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2018-09-21 970 channel->is_otg_channel = true;
8dde0008ffc9e2 drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2018-09-21 971 channel->uses_otg_pins = !of_property_read_bool(dev->of_node,
8dde0008ffc9e2 drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2018-09-21 972 "renesas,no-otg-pins");
2b38543c8db1c7 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-04-29 973 channel->extcon = devm_extcon_dev_allocate(dev,
2b38543c8db1c7 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-04-29 974 rcar_gen3_phy_cable);
2b38543c8db1c7 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-04-29 975 if (IS_ERR(channel->extcon))
2b38543c8db1c7 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-04-29 976 return PTR_ERR(channel->extcon);
2b38543c8db1c7 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-04-29 977
2b38543c8db1c7 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-04-29 978 ret = devm_extcon_dev_register(dev, channel->extcon);
2b38543c8db1c7 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-04-29 979 if (ret < 0) {
2b38543c8db1c7 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-04-29 980 dev_err(dev, "Failed to register extcon\n");
2b38543c8db1c7 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-04-29 981 return ret;
2b38543c8db1c7 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-04-29 982 }
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 983 }
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 984
942a7a6bf4c6a8 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-11-19 985 channel->rstc = devm_reset_control_array_get_optional_shared(dev);
942a7a6bf4c6a8 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-11-19 986 if (IS_ERR(channel->rstc))
942a7a6bf4c6a8 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-11-19 987 return PTR_ERR(channel->rstc);
942a7a6bf4c6a8 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-11-19 988
942a7a6bf4c6a8 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-11-19 989 ret = reset_control_deassert(channel->rstc);
942a7a6bf4c6a8 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-11-19 990 if (ret)
942a7a6bf4c6a8 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-11-19 991 return ret;
942a7a6bf4c6a8 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-11-19 992
942a7a6bf4c6a8 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-11-19 993 ret = devm_add_action_or_reset(dev, rcar_gen3_reset_assert, channel->rstc);
942a7a6bf4c6a8 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-11-19 994 if (ret)
942a7a6bf4c6a8 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-11-19 995 return ret;
942a7a6bf4c6a8 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-11-19 996
441a681b884347 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2017-03-14 997 /*
441a681b884347 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2017-03-14 998 * devm_phy_create() will call pm_runtime_enable(&phy->dev);
441a681b884347 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2017-03-14 999 * And then, phy-core will manage runtime pm for this device.
441a681b884347 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2017-03-14 1000 */
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1001 ret = devm_pm_runtime_enable(dev);
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1002 if (ret)
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1003 return dev_err_probe(dev, ret, "Failed to enable pm_runtime\n");
b0512a6ec0cd6d drivers/phy/renesas/phy-rcar-gen3-usb2.c Biju Das 2021-07-27 1004
f75806d26318c0 drivers/phy/renesas/phy-rcar-gen3-usb2.c Lad Prabhakar 2025-08-08 1005 channel->phy_data = of_device_get_match_data(dev);
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1006 if (!channel->phy_data)
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1007 return -EINVAL;
5d8042e95fd471 drivers/phy/renesas/phy-rcar-gen3-usb2.c Biju Das 2019-04-10 1008
4eae16375357a2 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2024-08-22 1009 platform_set_drvdata(pdev, channel);
4eae16375357a2 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2024-08-22 1010 channel->dev = dev;
4eae16375357a2 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2024-08-22 1011
4eae16375357a2 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2024-08-22 1012 ret = rcar_gen3_phy_usb2_init_bus(channel);
4eae16375357a2 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2024-08-22 1013 if (ret)
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1014 return ret;
4eae16375357a2 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2024-08-22 1015
55a387ebb9219c drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-05-07 1016 spin_lock_init(&channel->lock);
549b6b55b00558 drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2019-04-11 1017 for (i = 0; i < NUM_OF_PHYS; i++) {
549b6b55b00558 drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2019-04-11 1018 channel->rphys[i].phy = devm_phy_create(dev, NULL,
f75806d26318c0 drivers/phy/renesas/phy-rcar-gen3-usb2.c Lad Prabhakar 2025-08-08 1019 channel->phy_data->phy_usb2_ops);
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1020 if (IS_ERR(channel->rphys[i].phy))
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1021 return dev_err_probe(dev, PTR_ERR(channel->rphys[i].phy),
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1022 "Failed to create USB2 PHY\n");
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1023
549b6b55b00558 drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2019-04-11 1024 channel->rphys[i].ch = channel;
549b6b55b00558 drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2019-04-11 1025 channel->rphys[i].int_enable_bits = rcar_gen3_int_enable[i];
549b6b55b00558 drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2019-04-11 1026 phy_set_drvdata(channel->rphys[i].phy, &channel->rphys[i]);
549b6b55b00558 drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2019-04-11 1027 }
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 1028
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 @1029 mux_state = devm_mux_state_get_optional(dev, NULL);
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1030 if (IS_ERR(mux_state))
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1031 return PTR_ERR(mux_state);
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1032 if (mux_state) {
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1033 ret = mux_state_select(mux_state);
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1034 if (ret)
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1035 return dev_err_probe(dev, ret, "Failed to select USB mux\n");
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1036
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1037 ret = devm_add_action_or_reset(dev, rcar_gen3_phy_mux_state_deselect,
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1038 mux_state);
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1039 if (ret)
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1040 return dev_err_probe(dev, ret,
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1041 "Failed to register USB mux state deselect\n");
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1042 }
8bb92fd7a04077 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1043
b6d7dd157763e0 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1044 if (channel->phy_data->no_adp_ctrl && channel->is_otg_channel) {
b6d7dd157763e0 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1045 ret = rcar_gen3_phy_usb2_vbus_regulator_register(channel);
b6d7dd157763e0 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1046 if (ret)
b6d7dd157763e0 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1047 return ret;
b6d7dd157763e0 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1048 } else {
6dcfd7c300bf35 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-03-03 1049 channel->vbus = devm_regulator_get_optional(dev, "vbus");
b6d7dd157763e0 drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1050 }
6dcfd7c300bf35 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-03-03 1051 if (IS_ERR(channel->vbus)) {
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1052 if (PTR_ERR(channel->vbus) == -EPROBE_DEFER)
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1053 return PTR_ERR(channel->vbus);
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1054
6dcfd7c300bf35 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-03-03 1055 channel->vbus = NULL;
6dcfd7c300bf35 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-03-03 1056 }
6dcfd7c300bf35 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-03-03 1057
de76809f60cc93 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-05-07 1058 irq = platform_get_irq_optional(pdev, 0);
de76809f60cc93 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-05-07 1059 if (irq < 0 && irq != -ENXIO) {
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1060 return irq;
de76809f60cc93 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-05-07 1061 } else if (irq > 0) {
de76809f60cc93 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-05-07 1062 INIT_WORK(&channel->work, rcar_gen3_phy_usb2_work);
de76809f60cc93 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-05-07 1063 ret = devm_request_irq(dev, irq, rcar_gen3_phy_usb2_irq,
de76809f60cc93 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-05-07 1064 IRQF_SHARED, dev_name(dev), channel);
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1065 if (ret < 0)
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1066 return dev_err_probe(dev, ret,
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1067 "Failed to request irq (%d)\n",
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1068 irq);
de76809f60cc93 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-05-07 1069 }
de76809f60cc93 drivers/phy/renesas/phy-rcar-gen3-usb2.c Claudiu Beznea 2025-05-07 1070
549b6b55b00558 drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2019-04-11 1071 provider = devm_of_phy_provider_register(dev, rcar_gen3_phy_usb2_xlate);
9bb86777fb71ee drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-11-09 1072 if (IS_ERR(provider)) {
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1073 return dev_err_probe(dev, PTR_ERR(provider),
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1074 "Failed to register PHY provider\n");
979b519c7a1bff drivers/phy/renesas/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2018-09-21 1075 } else if (channel->is_otg_channel) {
9bb86777fb71ee drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-11-09 1076 ret = device_create_file(dev, &dev_attr_role);
9bb86777fb71ee drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-11-09 1077 if (ret < 0)
230c817a1601af drivers/phy/renesas/phy-rcar-gen3-usb2.c Tommaso Merciai 2025-12-22 1078 return ret;
9bb86777fb71ee drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2016-11-09 1079 }
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 1080
441a681b884347 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2017-03-14 1081 return 0;
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 1082 }
f3b5a8d9b50d71 drivers/phy/phy-rcar-gen3-usb2.c Yoshihiro Shimoda 2015-11-30 1083
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH next] phy: renesas: rcar-gen3-usb2: Drop local devm_mux_state_get_optional()
2026-02-11 16:30 ` Geert Uytterhoeven
@ 2026-02-12 4:59 ` Vinod Koul
2026-02-12 9:31 ` Vladimir Oltean
0 siblings, 1 reply; 11+ messages in thread
From: Vinod Koul @ 2026-02-12 4:59 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Ulf Hansson, Vladimir Oltean, Yoshihiro Shimoda, Neil Armstrong,
Josua Mayer, Wolfram Sang, Tommaso Merciai, linux-phy, linux-mmc,
linux-renesas-soc, linux-next, linux-kernel
Hi Geert,
On 11-02-26, 17:30, Geert Uytterhoeven wrote:
> Hi Vinod,
>
> On Wed, 11 Feb 2026 at 17:17, Vinod Koul <vkoul@kernel.org> wrote:
> > On 10-02-26, 14:34, Ulf Hansson wrote:
> > > On Tue, 10 Feb 2026 at 11:53, Geert Uytterhoeven
> > > <geert+renesas@glider.be> wrote:
> > > > Now the mux core provides devm_mux_state_get_optional():
> > > >
> > > > drivers/phy/renesas/phy-rcar-gen3-usb2.c:944:1: error: static declaration of ‘devm_mux_state_get_optional’ follows non-static
> > > > declaration
> > > > 944 | devm_mux_state_get_optional(struct device *dev, const char *mux_name)
> > > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > > In file included from drivers/phy/renesas/phy-rcar-gen3-usb2.c:20:
> > > > include/linux/mux/consumer.h:64:19: note: previous declaration of ‘devm_mux_state_get_optional’ with type ‘struct mux_state *(struct device *, const char *)’
> > > > 64 | struct mux_state *devm_mux_state_get_optional(struct device *dev, const char *mux_name);
> > > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > >
> > > > Fix this by dropping the temporary local wrapper.
> > > >
> > > > Fixes: ad314348ceb4fe1f ("mux: Add helper functions for getting optional and selected mux-state")
> > > > Fixes: 8bb92fd7a0407792 ("phy: renesas: rcar-gen3-usb2: Use mux-state for phyrst management")
> > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > >
> > > Thanks Geert for helping out!
> > >
> > > > ---
> > > > - ad314348ceb4fe1f is in mmc/next, and a PR has already been sent
> > > > https://lore.kernel.org/20260209133441.556464-1-ulf.hansson@linaro.org
> > > > - 8bb92fd7a0407792 is in phy/next
> > >
> > > Vinod, do you want to pick up the $subject patch as a fix for 7.0-rc1
> > > or do you prefer me to handle it?
> >
> > Should I drop the 8bb92fd7a0407792 and it makes things easier for
> > everyone and then we can pick fixed commit for 7.1 cycle..
> >
> > Does that work for everyone. I was about to send PR, will hold off for a
> > bit.
>
> Alternatively, you can mention the semantic conflict in your PR to Linus,
> and ask him to fold my patch into the merge commit.
Hmmm, that is also a good option but might leave Linus a bit grumpy so
bit reluctant. Dropping and getting right implementation would be
better. I think it was a mistake to pick or this all could have gone
thru mux tree.
Thanks
--
~Vinod
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH next] phy: renesas: rcar-gen3-usb2: Drop local devm_mux_state_get_optional()
2026-02-12 4:59 ` Vinod Koul
@ 2026-02-12 9:31 ` Vladimir Oltean
0 siblings, 0 replies; 11+ messages in thread
From: Vladimir Oltean @ 2026-02-12 9:31 UTC (permalink / raw)
To: Vinod Koul, Geert Uytterhoeven
Cc: Ulf Hansson, Yoshihiro Shimoda, Neil Armstrong, Josua Mayer,
Wolfram Sang, Tommaso Merciai, linux-phy, linux-mmc,
linux-renesas-soc, linux-next, linux-kernel
On Thu, Feb 12, 2026 at 10:29:12AM +0530, Vinod Koul wrote:
> Hi Geert,
>
> On 11-02-26, 17:30, Geert Uytterhoeven wrote:
> > Hi Vinod,
> >
> > On Wed, 11 Feb 2026 at 17:17, Vinod Koul <vkoul@kernel.org> wrote:
> > > On 10-02-26, 14:34, Ulf Hansson wrote:
> > > > On Tue, 10 Feb 2026 at 11:53, Geert Uytterhoeven
> > > > <geert+renesas@glider.be> wrote:
> > > > > Now the mux core provides devm_mux_state_get_optional():
> > > > >
> > > > > drivers/phy/renesas/phy-rcar-gen3-usb2.c:944:1: error: static declaration of ‘devm_mux_state_get_optional’ follows non-static
> > > > > declaration
> > > > > 944 | devm_mux_state_get_optional(struct device *dev, const char *mux_name)
> > > > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > > > In file included from drivers/phy/renesas/phy-rcar-gen3-usb2.c:20:
> > > > > include/linux/mux/consumer.h:64:19: note: previous declaration of ‘devm_mux_state_get_optional’ with type ‘struct mux_state *(struct device *, const char *)’
> > > > > 64 | struct mux_state *devm_mux_state_get_optional(struct device *dev, const char *mux_name);
> > > > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > > >
> > > > > Fix this by dropping the temporary local wrapper.
> > > > >
> > > > > Fixes: ad314348ceb4fe1f ("mux: Add helper functions for getting optional and selected mux-state")
> > > > > Fixes: 8bb92fd7a0407792 ("phy: renesas: rcar-gen3-usb2: Use mux-state for phyrst management")
> > > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > >
> > > > Thanks Geert for helping out!
> > > >
> > > > > ---
> > > > > - ad314348ceb4fe1f is in mmc/next, and a PR has already been sent
> > > > > https://lore.kernel.org/20260209133441.556464-1-ulf.hansson@linaro.org
> > > > > - 8bb92fd7a0407792 is in phy/next
> > > >
> > > > Vinod, do you want to pick up the $subject patch as a fix for 7.0-rc1
> > > > or do you prefer me to handle it?
> > >
> > > Should I drop the 8bb92fd7a0407792 and it makes things easier for
> > > everyone and then we can pick fixed commit for 7.1 cycle..
> > >
> > > Does that work for everyone. I was about to send PR, will hold off for a
> > > bit.
> >
> > Alternatively, you can mention the semantic conflict in your PR to Linus,
> > and ask him to fold my patch into the merge commit.
>
> Hmmm, that is also a good option but might leave Linus a bit grumpy so
> bit reluctant. Dropping and getting right implementation would be
> better. I think it was a mistake to pick or this all could have gone
> thru mux tree.
>
> Thanks
> --
> ~Vinod
I think with Linus' refusal of the mmc/next PR, there is no longer any
need either for this patch or for the revert of 8bb92fd7a040 ("phy:
renesas: rcar-gen3-usb2: Use mux-state for phyrst management").
http://lore.kernel.org/lkml/CAHk-=wgnRQiKqWVrO_uF1btYM2K8r8xL95RGdKU3QLe8B58nrw@mail.gmail.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH next] phy: renesas: rcar-gen3-usb2: Drop local devm_mux_state_get_optional()
2026-02-11 16:17 ` Vinod Koul
2026-02-11 16:30 ` Geert Uytterhoeven
@ 2026-02-12 10:39 ` Ulf Hansson
2026-02-12 11:17 ` Vinod Koul
1 sibling, 1 reply; 11+ messages in thread
From: Ulf Hansson @ 2026-02-12 10:39 UTC (permalink / raw)
To: Vinod Koul
Cc: Geert Uytterhoeven, Vladimir Oltean, Yoshihiro Shimoda,
Neil Armstrong, Josua Mayer, Wolfram Sang, Tommaso Merciai,
linux-phy, linux-mmc, linux-renesas-soc, linux-next, linux-kernel
On Wed, 11 Feb 2026 at 17:17, Vinod Koul <vkoul@kernel.org> wrote:
>
> On 10-02-26, 14:34, Ulf Hansson wrote:
> > On Tue, 10 Feb 2026 at 11:53, Geert Uytterhoeven
> > <geert+renesas@glider.be> wrote:
> > >
> > > Now the mux core provides devm_mux_state_get_optional():
> > >
> > > drivers/phy/renesas/phy-rcar-gen3-usb2.c:944:1: error: static declaration of ‘devm_mux_state_get_optional’ follows non-static
> > > declaration
> > > 944 | devm_mux_state_get_optional(struct device *dev, const char *mux_name)
> > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > In file included from drivers/phy/renesas/phy-rcar-gen3-usb2.c:20:
> > > include/linux/mux/consumer.h:64:19: note: previous declaration of ‘devm_mux_state_get_optional’ with type ‘struct mux_state *(struct device *, const char *)’
> > > 64 | struct mux_state *devm_mux_state_get_optional(struct device *dev, const char *mux_name);
> > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> > >
> > > Fix this by dropping the temporary local wrapper.
> > >
> > > Fixes: ad314348ceb4fe1f ("mux: Add helper functions for getting optional and selected mux-state")
> > > Fixes: 8bb92fd7a0407792 ("phy: renesas: rcar-gen3-usb2: Use mux-state for phyrst management")
> > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> >
> > Thanks Geert for helping out!
> >
> > > ---
> > > - ad314348ceb4fe1f is in mmc/next, and a PR has already been sent
> > > https://lore.kernel.org/20260209133441.556464-1-ulf.hansson@linaro.org
> > > - 8bb92fd7a0407792 is in phy/next
> >
> > Vinod, do you want to pick up the $subject patch as a fix for 7.0-rc1
> > or do you prefer me to handle it?
>
> Should I drop the 8bb92fd7a0407792 and it makes things easier for
> everyone and then we can pick fixed commit for 7.1 cycle..
Well, my pull request for MMC was broken (the mux patches didn't get
properly tested in linux-next, until it was too late), so Linus will
not take it.
At this point I would say that 8bb92fd7a0407792 is still a bit
problematic as it uses the same name of the helper that the mux core
intends to use. It would be better with a phy specific name for it, so
it becomes easier to convert to the common mux helper, later on.
Although, at this point it's still okay as is, as we will need to
defer the mux core changes to v7.1 anyway.
So up to you!
Kind regards
Uffe
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH next] phy: renesas: rcar-gen3-usb2: Drop local devm_mux_state_get_optional()
2026-02-12 10:39 ` Ulf Hansson
@ 2026-02-12 11:17 ` Vinod Koul
0 siblings, 0 replies; 11+ messages in thread
From: Vinod Koul @ 2026-02-12 11:17 UTC (permalink / raw)
To: Ulf Hansson
Cc: Geert Uytterhoeven, Vladimir Oltean, Yoshihiro Shimoda,
Neil Armstrong, Josua Mayer, Wolfram Sang, Tommaso Merciai,
linux-phy, linux-mmc, linux-renesas-soc, linux-next, linux-kernel
On 12-02-26, 11:39, Ulf Hansson wrote:
> On Wed, 11 Feb 2026 at 17:17, Vinod Koul <vkoul@kernel.org> wrote:
> > Should I drop the 8bb92fd7a0407792 and it makes things easier for
> > everyone and then we can pick fixed commit for 7.1 cycle..
>
> Well, my pull request for MMC was broken (the mux patches didn't get
> properly tested in linux-next, until it was too late), so Linus will
> not take it.
Yeah I saw that one, sorry for that
> At this point I would say that 8bb92fd7a0407792 is still a bit
> problematic as it uses the same name of the helper that the mux core
> intends to use. It would be better with a phy specific name for it, so
> it becomes easier to convert to the common mux helper, later on.
> Although, at this point it's still okay as is, as we will need to
> defer the mux core changes to v7.1 anyway.
>
> So up to you!
In that case, I can keep as is for now. We can rename the api as a fix
and proper changes can go in for 7.1
--
~Vinod
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2026-02-12 11:26 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-10 10:53 [PATCH next] phy: renesas: rcar-gen3-usb2: Drop local devm_mux_state_get_optional() Geert Uytterhoeven
2026-02-10 11:26 ` Tommaso Merciai
2026-02-10 13:34 ` Ulf Hansson
2026-02-11 16:17 ` Vinod Koul
2026-02-11 16:30 ` Geert Uytterhoeven
2026-02-12 4:59 ` Vinod Koul
2026-02-12 9:31 ` Vladimir Oltean
2026-02-12 10:39 ` Ulf Hansson
2026-02-12 11:17 ` Vinod Koul
2026-02-11 16:21 ` kernel test robot
2026-02-12 0:39 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox