Re: [PATCH net-next 1/2] phy: marvell: Add support for temperature sensor

2017-01-11 Thread Sergei Shtylyov
Hello! On 01/11/2017 06:09 PM, Andrew Lunn wrote: +static int marvell_hwmon_probe(struct phy_device *phydev, + const struct hwmon_chip_info *chip) +{ + struct marvell_priv *priv = phydev->priv; + struct device *dev = &phydev->mdio.dev; + int err; +

Re: [PATCH net-next 1/2] phy: marvell: Add support for temperature sensor

2017-01-11 Thread Andrew Lunn
> +static int marvell_hwmon_probe(struct phy_device *phydev, > +const struct hwmon_chip_info *chip) > +{ > + struct marvell_priv *priv = phydev->priv; > + struct device *dev = &phydev->mdio.dev; > + int err; > + > + err = marvell_hwmon_name(phydev); > +

[PATCH net-next 1/2] phy: marvell: Add support for temperature sensor

2017-01-10 Thread Andrew Lunn
Some Marvell PHYs have an inbuilt temperature sensor. Add hwmon support for this sensor. There are two different variants. The simpler, older chips have a 5 degree accuracy. The newer devices have 1 degree accuracy. Signed-off-by: Andrew Lunn --- drivers/net/phy/marvell.c | 426