All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Darren Hart <dvhart@infradead.org>
Cc: Mario.Limonciello@dell.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: Sat, 9 Sep 2017 10:05:58 +0300	[thread overview]
Message-ID: <20170909070558.GG2477@lahna.fi.intel.com> (raw)
In-Reply-To: <20170909041452.GA1084@fury>

On Fri, Sep 08, 2017 at 09:14:52PM -0700, Darren Hart wrote:
> 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

At this point the KOBJ_ADD event has already been send to the userspace
when the device was added to the system.

  reply	other threads:[~2017-09-09  7:08 UTC|newest]

Thread overview: 13+ 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-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-08 15:15     ` Mario.Limonciello
2017-09-09  4:14     ` Darren Hart
2017-09-09  7:05       ` Mika Westerberg [this message]
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=20170909070558.GG2477@lahna.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=Mario.Limonciello@dell.com \
    --cc=dvhart@infradead.org \
    --cc=hughsient@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.