linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@infradead.org>
To: Mario.Limonciello@dell.com
Cc: mika.westerberg@linux.intel.com, linux-kernel@vger.kernel.org,
	platform-driver-x86@vger.kernel.org, hughsient@gmail.com,
	yehezkelshb@gmail.com
Subject: Re: [PATCH v2] Add driver to force WMI Thunderbolt controller power status
Date: Fri, 8 Sep 2017 21:14:52 -0700	[thread overview]
Message-ID: <20170909041452.GA1084@fury> (raw)
In-Reply-To: <339f06ce8efd42409bf5f91dfd064e7a@ausx13mpc120.AMER.DELL.COM>

On Fri, Sep 08, 2017 at 03:15:10PM +0000, Mario.Limonciello@dell.com wrote:
> > -----Original Message-----
> > From: Mika Westerberg [mailto:mika.westerberg@linux.intel.com]
> > Sent: Friday, September 8, 2017 3:07 AM
> > To: Limonciello, Mario <Mario_Limonciello@Dell.com>
> > Cc: dvhart@infradead.org; LKML <linux-kernel@vger.kernel.org>; platform-driver-
> > x86@vger.kernel.org; Richard Hughes <hughsient@gmail.com>; Yehezkel Bernat
> > <yehezkelshb@gmail.com>
> > Subject: Re: [PATCH v2] Add driver to force WMI Thunderbolt controller power
> > status
> > 
> > On Thu, Sep 07, 2017 at 01:47:22PM -0500, Mario Limonciello wrote:
> > 
> > I have a small comment which you might want to consider.
> > 
> > > +static int intel_wmi_thunderbolt_probe(struct wmi_device *wdev)
> > > +{
> > > +	return sysfs_create_group(&wdev->dev.kobj, &tbt_attribute_group);
> > > +}
> > > +
> > > +static int intel_wmi_thunderbolt_remove(struct wmi_device *wdev)
> > > +{
> > > +	sysfs_remove_group(&wdev->dev.kobj, &tbt_attribute_group);
> > > +	return 0;
> > > +}
> > 
> > In order to notify userspace about this, what if you send KOBJ_CHANGE
> > for the wdev when you add/remove this attribute?
> 
> Sure, makes sense to me.   I'll send a follow up patch.

Hrm, what am I missing.... the reason I recommended Mario add the attribute
group was so this would be automatically taken care of prior to the KOBJ_ADD
event, per the device documentation:

driver-model/device.txt

-- 
Darren Hart
VMware Open Source Technology Center

  reply	other threads:[~2017-09-09  4:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-07 18:47 [PATCH v2] Add driver to force WMI Thunderbolt controller power status Mario Limonciello
     [not found] ` <CA+CmpXvX=iF6R1G6Z-tifi-Nx0uXhfYZzDHFUekOCzbuPBCkrA@mail.gmail.com>
2017-09-07 19:14   ` Bernat, Yehezkel
2017-09-07 20:09     ` Mario.Limonciello
2017-09-08  0:06       ` Darren Hart
2017-09-08  8:07 ` Mika Westerberg
2017-09-08 15:15   ` Mario.Limonciello
2017-09-09  4:14     ` Darren Hart [this message]
2017-09-09  7:05       ` Mika Westerberg
2017-09-11  9:39         ` Darren Hart
2017-09-11  9:46           ` Mika Westerberg
2017-09-11 21:40             ` Darren Hart

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=20170909041452.GA1084@fury \
    --to=dvhart@infradead.org \
    --cc=Mario.Limonciello@dell.com \
    --cc=hughsient@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=yehezkelshb@gmail.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).