Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de141314 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

greybus: uevent: add GREYBUS_ID to uevent



This adds the GREYBUS_ID environment variable to all interface uevents
to let userspace know the vendor/product id of the module interface that
has been added or removed from the system.

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 14006ab2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -110,6 +110,10 @@ static int greybus_uevent(struct device *dev, struct kobj_uevent_env *env)
	if (intf) {
		if (add_uevent_var(env, "INTERFACE=%u", intf->interface_id))
			return -ENOMEM;
		if (add_uevent_var(env, "GREYBUS_ID=%04x/%04x",
				   (u16)(intf->vendor_id & 0xffff),
				   (u16)(intf->product_id & 0xffff)))
			return -ENOMEM;
	}

	if (bundle) {