Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1729382
| From | Darren Hart <dvhart@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] Add driver to force WMI Thunderbolt controller power status |
| Date | 2017-09-09 06:20 +0200 |
| Message-ID | <unFpn-de-3@gated-at.bofh.it> (permalink) |
| References | <una2f-3SJ-51@gated-at.bofh.it> <unmG5-4bi-9@gated-at.bofh.it> <untez-nf-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2] Add driver to force WMI Thunderbolt controller power status Mario Limonciello <mario.limonciello@dell.com> - 2017-09-07 20:50 +0200
Re: [PATCH v2] Add driver to force WMI Thunderbolt controller power status "Bernat, Yehezkel" <yehezkel.bernat@intel.com> - 2017-09-07 21:20 +0200
RE: [PATCH v2] Add driver to force WMI Thunderbolt controller power status <Mario.Limonciello@dell.com> - 2017-09-07 22:20 +0200
Re: [PATCH v2] Add driver to force WMI Thunderbolt controller power status Darren Hart <dvhart@infradead.org> - 2017-09-08 02:10 +0200
Re: [PATCH v2] Add driver to force WMI Thunderbolt controller power status Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-09-08 10:20 +0200
RE: [PATCH v2] Add driver to force WMI Thunderbolt controller power status <Mario.Limonciello@dell.com> - 2017-09-08 17:20 +0200
Re: [PATCH v2] Add driver to force WMI Thunderbolt controller power status Darren Hart <dvhart@infradead.org> - 2017-09-09 06:20 +0200
Re: [PATCH v2] Add driver to force WMI Thunderbolt controller power status Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-09-09 09:10 +0200
csiph-web