[PATCH v3 11/11] usb: phy-mxs: Add system suspend/resume API

Shawn Guo shawn.guo at linaro.org
Mon Nov 4 23:04:14 EST 2013


On Tue, Nov 05, 2013 at 10:59:17AM +0800, Peter Chen wrote:
> > > @@ -83,6 +90,15 @@
> > >   */
> > >  #define MXS_PHY_SENDING_SOF_TOO_FAST		BIT(2)
> > >  
> > > +/* imx23 style PHY */
> > > +#define MXS_PHY_IMX23				BIT(3)
> > > +
> > > +/* imx6q style PHY */
> > > +#define MXS_PHY_IMX6Q				BIT(4)
> > > +
> > > +/* imx6sl style PHY */
> > > +#define MXS_PHY_IMX6SL				BIT(5)
> > > +
> > 
> > We will not need these, if we do what I suggested to carry a pointer
> > to mxs_phy_data in mxs_phy.
> > 
> > struct mxs_phy {
> > 	...
> > 	struct mxs_phy_data *data;
> > };
> > 
> > The check then can be done like below.
> > 
> > static inline int is_imx6q_phy(struct mxs_phy *mxs_phy)
> > {
> >         return mxs_phy->data == &imx6q_phy_data;
> > }
> > 
> 
> What's the benefit compared to current one?

Save those pointless flags.

Shawn




More information about the linux-arm-kernel mailing list