From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH V2] net: phy: tja11xx: Add TJA11xx PHY driver Date: Sat, 15 Dec 2018 18:40:35 +0100 Message-ID: <20181215174035.GD5922@lunn.ch> References: <20181214161149.6493-1-marex@denx.de> <20181215170153.GA5922@lunn.ch> <53643e4a-675a-f5bc-21d6-d0f9b3341f80@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: Marek Vasut , netdev@vger.kernel.org, Heiner Kallweit To: Florian Fainelli Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:48844 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726520AbeLORkh (ORCPT ); Sat, 15 Dec 2018 12:40:37 -0500 Content-Disposition: inline In-Reply-To: <53643e4a-675a-f5bc-21d6-d0f9b3341f80@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: On Sat, Dec 15, 2018 at 09:31:54AM -0800, Florian Fainelli wrote: > Le 12/15/18 à 9:01 AM, Andrew Lunn a écrit : > >> +static struct tja11xx_phy_stats tja11xx_hw_stats[] = { > >> + { "phy_symbol_error_count", 20, 0, 0xffff }, > >> + { "phy_overtemp_error", 21, 1, BIT(1) }, > >> + { "phy_undervolt_error", 21, 3, BIT(3) }, > >> + { "phy_polarity_detect", 25, 6, BIT(6) }, > >> + { "phy_open_detect", 25, 7, BIT(7) }, > >> + { "phy_short_detect", 25, 8, BIT(8) }, > > > > Hi Marek > > > > You have a number of one bit counters here, which is pretty unusual. > > The names also don't really suggest they are counters. > > > > Florian, Heiner, do we want to allow this? > > Would it make sense to register HWMON attributes for "overtemp", > "polarity", "undervolt"? Hi Florian I just had a quick look at the datasheet. There does not appear to be an actual temperature value, nor a voltage value. Can you have a hwmon device with just alarms? > The open/short detect sounds like something we should add once we > finally get to the cable diagnostics support within the netlink > version of ethtool. Yes, that sounds better, Andrew