Re: [PATCH 06/14] net: dsa: Add support for hardware monitoring

2014-10-26 Thread Guenter Roeck
On 10/25/2014 11:00 AM, Andrew Lunn wrote: On Sat, Oct 25, 2014 at 10:23:27AM -0700, Florian Fainelli wrote: On 10/25/14 07:01, Andrew Lunn wrote: Here is another naming option: em1dsa0-virtual-0 I prefer this over isa. However, i think there should be some sort of separator between the net

Re: [PATCH 06/14] net: dsa: Add support for hardware monitoring

2014-10-25 Thread Guenter Roeck
On 10/25/2014 07:01 AM, Andrew Lunn wrote: Here is another naming option: em1dsa0-virtual-0 I prefer this over isa. However, i think there should be some sort of separator between the network device name and dsa. Fine with me. Any preference ? Note that '-' is not permitted. Guenter -- T

Re: [PATCH 06/14] net: dsa: Add support for hardware monitoring

2014-10-25 Thread Andrew Lunn
On Sat, Oct 25, 2014 at 10:23:27AM -0700, Florian Fainelli wrote: > On 10/25/14 07:01, Andrew Lunn wrote: > >> Here is another naming option: > >> > >> em1dsa0-virtual-0 > > > > I prefer this over isa. > > > > However, i think there should be some sort of separator between the > > network device

Re: [PATCH 06/14] net: dsa: Add support for hardware monitoring

2014-10-25 Thread Andrew Lunn
> Here is another naming option: > > em1dsa0-virtual-0 I prefer this over isa. However, i think there should be some sort of separator between the network device name and dsa. Andrew -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to m

Re: [PATCH 06/14] net: dsa: Add support for hardware monitoring

2014-10-25 Thread Florian Fainelli
On 10/25/14 07:01, Andrew Lunn wrote: >> Here is another naming option: >> >> em1dsa0-virtual-0 > > I prefer this over isa. > > However, i think there should be some sort of separator between the > network device name and dsa. Considering that network devices can be renamed, do we want it to be

Re: [PATCH 06/14] net: dsa: Add support for hardware monitoring

2014-10-25 Thread Florian Fainelli
On 10/25/14 07:01, Andrew Lunn wrote: >> Here is another naming option: >> >> em1dsa0-virtual-0 > > I prefer this over isa. > > However, i think there should be some sort of separator between the > network device name and dsa. Considering that network devices can be renamed, do we want it to be

Re: [PATCH 06/14] net: dsa: Add support for hardware monitoring

2014-10-24 Thread Guenter Roeck
On 10/23/2014 12:55 PM, Andrew Lunn wrote: [ ... ] Does hwmon offer a function to sanitise a string? No, that wasn't necessary so far. The 'name' string is a constant string provided by the driver. The switch index definitely should be used and i would probably combine that with a sanitised

Re: [PATCH 06/14] net: dsa: Add support for hardware monitoring

2014-10-24 Thread Guenter Roeck
On Thu, Oct 23, 2014 at 09:55:26PM +0200, Andrew Lunn wrote: > On Thu, Oct 23, 2014 at 11:43:22AM -0700, Guenter Roeck wrote: > > On Thu, Oct 23, 2014 at 08:03:57PM +0200, Andrew Lunn wrote: > > > > No, I am not saying that. The hwmon device's parent device will tell, > > > > which is how it works

Re: [PATCH 06/14] net: dsa: Add support for hardware monitoring

2014-10-23 Thread David Miller
From: Guenter Roeck Date: Thu, 23 Oct 2014 22:40:59 -0700 > I see two options for that: > > - Add > select HWMON > to the NET_DSA Kconfig entry. > Example is Broadcom TIGON3 driver. > > - Add a DSA_HWMON Kconfig entry to define the dependencies and > to let the user select if the fu

Re: [PATCH 06/14] net: dsa: Add support for hardware monitoring

2014-10-23 Thread Guenter Roeck
On 10/24/2014 05:52 AM, Florian Fainelli wrote: Le 23/10/2014 22:40, Guenter Roeck a écrit : On 10/23/2014 10:03 PM, David Miller wrote: From: Guenter Roeck Date: Wed, 22 Oct 2014 22:06:41 -0700 On 10/22/2014 09:37 PM, Florian Fainelli wrote: 2014-10-22 21:03 GMT-07:00 Guenter Roeck : Some

Re: [PATCH 06/14] net: dsa: Add support for hardware monitoring

2014-10-23 Thread Florian Fainelli
Le 23/10/2014 22:40, Guenter Roeck a écrit : On 10/23/2014 10:03 PM, David Miller wrote: From: Guenter Roeck Date: Wed, 22 Oct 2014 22:06:41 -0700 On 10/22/2014 09:37 PM, Florian Fainelli wrote: 2014-10-22 21:03 GMT-07:00 Guenter Roeck : Some Marvell switches provide chip temperature data.

Re: [PATCH 06/14] net: dsa: Add support for hardware monitoring

2014-10-23 Thread Guenter Roeck
On 10/23/2014 10:03 PM, David Miller wrote: From: Guenter Roeck Date: Wed, 22 Oct 2014 22:06:41 -0700 On 10/22/2014 09:37 PM, Florian Fainelli wrote: 2014-10-22 21:03 GMT-07:00 Guenter Roeck : Some Marvell switches provide chip temperature data. Add support for reporting it to the dsa infras

Re: [PATCH 06/14] net: dsa: Add support for hardware monitoring

2014-10-23 Thread David Miller
From: Guenter Roeck Date: Wed, 22 Oct 2014 22:06:41 -0700 > On 10/22/2014 09:37 PM, Florian Fainelli wrote: >> 2014-10-22 21:03 GMT-07:00 Guenter Roeck : >>> Some Marvell switches provide chip temperature data. >>> Add support for reporting it to the dsa infrastructure. >>> >>> Signed-off-by: Gue

Re: [PATCH 06/14] net: dsa: Add support for hardware monitoring

2014-10-23 Thread Andrew Lunn
On Thu, Oct 23, 2014 at 11:43:22AM -0700, Guenter Roeck wrote: > On Thu, Oct 23, 2014 at 08:03:57PM +0200, Andrew Lunn wrote: > > > No, I am not saying that. The hwmon device's parent device will tell, > > > which is how it works for all other hwmon devices. > > > > O.K, so parent is important. >

Re: [PATCH 06/14] net: dsa: Add support for hardware monitoring

2014-10-23 Thread Guenter Roeck
On Thu, Oct 23, 2014 at 08:03:57PM +0200, Andrew Lunn wrote: > > No, I am not saying that. The hwmon device's parent device will tell, > > which is how it works for all other hwmon devices. > > O.K, so parent is important. > > > Not really. Again, the parent device provides that information. libs

Re: [PATCH 06/14] net: dsa: Add support for hardware monitoring

2014-10-23 Thread Andrew Lunn
> No, I am not saying that. The hwmon device's parent device will tell, > which is how it works for all other hwmon devices. O.K, so parent is important. > Not really. Again, the parent device provides that information. libsensors, > which is the preferred way of accessing sensors information fro

Re: [PATCH 06/14] net: dsa: Add support for hardware monitoring

2014-10-23 Thread Guenter Roeck
On Thu, Oct 23, 2014 at 06:54:59PM +0200, Andrew Lunn wrote: > On Thu, Oct 23, 2014 at 09:27:55AM -0700, Guenter Roeck wrote: > > On Thu, Oct 23, 2014 at 03:47:06PM +0200, Andrew Lunn wrote: > > > > >>+static DEVICE_ATTR_RO(temp1_input); > > > > > > > > > >You probably want the number of temperatur

Re: [PATCH 06/14] net: dsa: Add support for hardware monitoring

2014-10-23 Thread Andrew Lunn
On Thu, Oct 23, 2014 at 09:27:55AM -0700, Guenter Roeck wrote: > On Thu, Oct 23, 2014 at 03:47:06PM +0200, Andrew Lunn wrote: > > > >>+static DEVICE_ATTR_RO(temp1_input); > > > > > > > >You probably want the number of temperature sensors to come from the > > > >switch driver, and support arbitrary

Re: [PATCH 06/14] net: dsa: Add support for hardware monitoring

2014-10-23 Thread Guenter Roeck
On Thu, Oct 23, 2014 at 03:47:06PM +0200, Andrew Lunn wrote: > > >>+static DEVICE_ATTR_RO(temp1_input); > > > > > >You probably want the number of temperature sensors to come from the > > >switch driver, and support arbitrary number of temperature sensors? > > > > In that case we would need the nu

Re: [PATCH 06/14] net: dsa: Add support for hardware monitoring

2014-10-23 Thread Andrew Lunn
> >>+static DEVICE_ATTR_RO(temp1_input); > > > >You probably want the number of temperature sensors to come from the > >switch driver, and support arbitrary number of temperature sensors? > > In that case we would need the number of sensors, pass a sensor index, > and create a dynamic number of at

Re: [PATCH 06/14] net: dsa: Add support for hardware monitoring

2014-10-23 Thread Guenter Roeck
On 10/23/2014 01:24 AM, Richard Cochran wrote: On Wed, Oct 22, 2014 at 10:06:41PM -0700, Guenter Roeck wrote: On 10/22/2014 09:37 PM, Florian Fainelli wrote: You probably want the number of temperature sensors to come from the switch driver, and support arbitrary number of temperature sensors?

Re: [PATCH 06/14] net: dsa: Add support for hardware monitoring

2014-10-23 Thread Richard Cochran
On Wed, Oct 22, 2014 at 10:06:41PM -0700, Guenter Roeck wrote: > On 10/22/2014 09:37 PM, Florian Fainelli wrote: > >You probably want the number of temperature sensors to come from the > >switch driver, and support arbitrary number of temperature sensors? > > In that case we would need the number

Re: [PATCH 06/14] net: dsa: Add support for hardware monitoring

2014-10-22 Thread Guenter Roeck
On 10/22/2014 09:37 PM, Florian Fainelli wrote: 2014-10-22 21:03 GMT-07:00 Guenter Roeck : Some Marvell switches provide chip temperature data. Add support for reporting it to the dsa infrastructure. Signed-off-by: Guenter Roeck --- [snip] +/* hwmon support *

Re: [PATCH 06/14] net: dsa: Add support for hardware monitoring

2014-10-22 Thread Florian Fainelli
2014-10-22 21:03 GMT-07:00 Guenter Roeck : > Some Marvell switches provide chip temperature data. > Add support for reporting it to the dsa infrastructure. > > Signed-off-by: Guenter Roeck > --- [snip] > +/* hwmon support > / > + > +#if

[PATCH 06/14] net: dsa: Add support for hardware monitoring

2014-10-22 Thread Guenter Roeck
Some Marvell switches provide chip temperature data. Add support for reporting it to the dsa infrastructure. Signed-off-by: Guenter Roeck --- include/net/dsa.h | 6 +++ net/dsa/dsa.c | 111 ++ 2 files changed, 117 insertions(+) diff --gi