Subject: Re: [PATCH 2/2] netdev/phy: add MDIO bus multiplexer driven by a regmap

From: Andrew Lunn <[email-masked]>
Date: Fri, 5 Oct 2018 15:53:17 +0200

> > > +	ret = regmap_update_bits_check(s->regmap,
> > > +				       s->mux_reg,
> > > +				       s->mask,
> > > +				       desired_child,
> > > +				       &change);
> > 
> > When getting the mask from DT, you use be32_to_cpup().
> > When testing the reg value against the mask, you use be32_to_cpup().
> > Here you do not use be32_to_cpup()?
> 
> Can you please tell me for which variable you mean I should use be32_to_cpup?
> I use be32_to_cpup when reading device tree entries.
> After being read, their values are stored in structure. After that no need to do be32_to_cpup

desired_child is read from DT by the mdio-mux core.

I'm just wondering why any of this be32_to_cpup() is needed.  Why not
just use of_property_read_u32()?

     Andrew