[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170911093955.GA123566@localhost.localdomain>
Date: Mon, 11 Sep 2017 02:39:55 -0700
From: Darren Hart <dvhart@...radead.org>
To: Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc: Mario.Limonciello@...l.com, linux-kernel@...r.kernel.org,
platform-driver-x86@...r.kernel.org, hughsient@...il.com,
yehezkelshb@...il.com
Subject: Re: [PATCH v2] Add driver to force WMI Thunderbolt controller power
status
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@...l.com wrote:
> > > > -----Original Message-----
> > > > From: Mika Westerberg [mailto:mika.westerberg@...ux.intel.com]
> > > > Sent: Friday, September 8, 2017 3:07 AM
> > > > To: Limonciello, Mario <Mario_Limonciello@...l.com>
> > > > Cc: dvhart@...radead.org; LKML <linux-kernel@...r.kernel.org>; platform-driver-
> > > > x86@...r.kernel.org; Richard Hughes <hughsient@...il.com>; Yehezkel Bernat
> > > > <yehezkelshb@...il.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
Powered by blists - more mailing lists