Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1730245 > unrolled thread

Re: [PATCH v2] Add driver to force WMI Thunderbolt controller power status

Started byDarren Hart <dvhart@infradead.org>
First post2017-09-11 11:50 +0200
Last post2017-09-11 23:50 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v2] Add driver to force WMI Thunderbolt controller power  status Darren Hart <dvhart@infradead.org> - 2017-09-11 11:50 +0200
    Re: [PATCH v2] Add driver to force WMI Thunderbolt controller power  status Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-09-11 11:50 +0200
      Re: [PATCH v2] Add driver to force WMI Thunderbolt controller power  status Darren Hart <dvhart@infradead.org> - 2017-09-11 23:50 +0200

#1730245 — Re: [PATCH v2] Add driver to force WMI Thunderbolt controller power status

FromDarren Hart <dvhart@infradead.org>
Date2017-09-11 11:50 +0200
SubjectRe: [PATCH v2] Add driver to force WMI Thunderbolt controller power status
Message-ID<uotvP-19R-7@gated-at.bofh.it>
On Sat, Sep 09, 2017 at 10:05:58AM +0300, Mika Westerberg wrote:
> 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.

Which device are you referring to? This attribute is bound to the device
identified by the WMI GUID, and should be independent from the controller or any
thunderbolt connected physical device.

-- 
Darren Hart
VMware Open Source Technology Center

[toc] | [next] | [standalone]


#1730249

FromMika Westerberg <mika.westerberg@linux.intel.com>
Date2017-09-11 11:50 +0200
Message-ID<uotvP-19R-15@gated-at.bofh.it>
In reply to#1730245
On Mon, Sep 11, 2017 at 02:39:55AM -0700, Darren Hart wrote:
> Which device are you referring to? This attribute is bound to the device
> identified by the WMI GUID, and should be independent from the controller or any
> thunderbolt connected physical device.

I refer to "wdev->dev" whatever that is. That device has been created
long time before this driver is probed and thus userspace already got
the KOBJ_ADD uevent.

[toc] | [prev] | [next] | [standalone]


#1730565

FromDarren Hart <dvhart@infradead.org>
Date2017-09-11 23:50 +0200
Message-ID<uoEKB-rj-3@gated-at.bofh.it>
In reply to#1730249
On Mon, Sep 11, 2017 at 12:46:14PM +0300, Mika Westerberg wrote:
> On Mon, Sep 11, 2017 at 02:39:55AM -0700, Darren Hart wrote:
> > Which device are you referring to? This attribute is bound to the device
> > identified by the WMI GUID, and should be independent from the controller or any
> > thunderbolt connected physical device.
> 
> I refer to "wdev->dev" whatever that is. That device has been created
> long time before this driver is probed and thus userspace already got
> the KOBJ_ADD uevent.
> 

Ah yes, I see - at the time of device_register. Thanks Mika.

-- 
Darren Hart
VMware Open Source Technology Center

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web