LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	netdev <netdev@vger.kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com
Subject: Re: [PATCH] net: dsa: set parent of hwmon device
Date: Wed, 21 Jan 2015 11:26:59 -0500 (EST)	[thread overview]
Message-ID: <1206541390.69577.1421857619949.JavaMail.root@mail> (raw)
In-Reply-To: <CAGVrzcawAF1=RPAJ+0O3B+PA7sDkstTjVjDQL_8C8a8kHL7CoA@mail.gmail.com>

Hi Guenter, Florian,

>>> -               ds->hwmon_dev = hwmon_device_register_with_groups(NULL,
>>> +               ds->hwmon_dev = hwmon_device_register_with_groups(parent,
>>>                                         ds->hwmon_name, ds, dsa_hwmon_groups);
>>>                 if (IS_ERR(ds->hwmon_dev))
>>>                         ds->hwmon_dev = NULL;
>>
>> Looking into my old e-mail, turns out we did not add the parent
>> device because it affected the output of the "sensors" command, and
>> we wanted the device to be handled as 'virtual device' (which implies
>> no parent). That was an explicit part of the patch set (v2 of 'net:
>> dsa: Add support for reporting switch chip temperatures'), compared
>> to v1, which did set the parent device.

I don't know about the "sensors" output, but I found that convenient
from the sysfs side to have a hierarchy of sub-devices logically exposed
at the same place, i.e.:

	# ls /sys/devices/platform/dsa.0
	driver    hwmon    net    ...

>> I would suggest to keep the code as is.

> Maybe follow-up with a comment adding that above the call to
> hwmon_device_register_with_groups()? I suspect the intent is clear if
> you are deep into hwmon devices, but not necessarily for the reader ;)

Thanks,
-v

      reply	other threads:[~2015-01-21 16:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-21  0:13 Vivien Didelot
2015-01-21  0:13 ` [PATCH] net: dsa: set slave MII bus PHY mask Vivien Didelot
2015-01-21  0:37   ` Florian Fainelli
2015-01-26  0:01   ` David Miller
2015-01-21  2:48 ` [PATCH] net: dsa: set parent of hwmon device Guenter Roeck
2015-01-21  3:50 ` Guenter Roeck
2015-01-21  5:58   ` Florian Fainelli
2015-01-21 16:26     ` Vivien Didelot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1206541390.69577.1421857619949.JavaMail.root@mail \
    --to=vivien.didelot@savoirfairelinux.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=kernel@savoirfairelinux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=netdev@vger.kernel.org \
    --subject='Re: [PATCH] net: dsa: set parent of hwmon device' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).