Hi Vladimir, On Wed, 4 Mar 2026 at 19:03, Vladimir Oltean <[email protected]> wrote: > The major goal is to hide the contents of struct phy from consumer > drivers. > > The idea with "phy-props.h" is that both consumers and providers make > use of some data types. So both headers include "phy-props.h". > > Two slight points of contention. > > 1. phy_set_bus_width(): Vinod explains that despite the current caller > situation (9 providers, 1 consumer), it is a consumer API function. > > The use case is that the controller (for example UFS) may have > limitations and should set the expected lanes to be used and width on > those lanes. A number of Generic PHYs can support multiple lanes and > multiple width so this is way for controller telling I am using this > configuration. > > 2. phy-provider.h should go to include/linux/phy/ or to drivers/phy/? > We do have 3 PHY providers outside of drivers/phy/: > > drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_dphy.c > drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c > drivers/pinctrl/tegra/pinctrl-tegra-xusb.c > > but the practice is not encouraged, and with time, these should be > moved to the subsystem. This is not something that I can do now. > > For temporary compatibility, keep including the provider header. This > will be removed when abuses are all gotten rid of. > > Signed-off-by: Vladimir Oltean <[email protected]>
Thanks for your patch! > --- /dev/null > +++ b/drivers/phy/phy-provider.h > --- a/include/linux/phy/phy.h > +++ b/include/linux/phy/phy.h > @@ -1,246 +1,38 @@ > /* SPDX-License-Identifier: GPL-2.0-or-later */ > /* > - * phy.h -- generic phy header file > + * phy.h -- Generic PHY consumer API > * > * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com > * > * Author: Kishon Vijay Abraham I <[email protected]> > */ > > -#ifndef __DRIVERS_PHY_H > -#define __DRIVERS_PHY_H > +#ifndef __PHY_CONSUMER_H > +#define __PHY_CONSUMER_H > > -#include <linux/err.h> > -#include <linux/of.h> > -#include <linux/device.h> > -#include <linux/pm_runtime.h> > -#include <linux/regulator/consumer.h> > +#include <linux/phy/phy-props.h> > > -#include <linux/phy/phy-dp.h> > -#include <linux/phy/phy-hdmi.h> > -#include <linux/phy/phy-lvds.h> > -#include <linux/phy/phy-mipi-dphy.h> > +#include "../../drivers/phy/phy-provider.h" Shouldn't there be one more "../"? Interestingly, it compiles with/without. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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
