Re: HID battery strength does not emit power_suppy udev events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, I've sent this message a while ago but forgot to add
linux-input, I'm really willing to give it a final fix to the issue
but I need directions, I really can't see what's wrong with
the udev thing, so again (with linux-input):

The problem is that when a HID device that has a battery
is added to the system it doesn't emit the udev events
for the battery added or removed, which breaks upower..

I reviewed all my previous patch, looked at input-wacom
to see if they did it differently for the battery issue, but
I couldn't find any problem, since I don't have a wacom
tablet maybe it also has the udev bug.

Well I looked through a lots of kernel code paths,
but the best I could find was:

"int kobject_uevent(struct kobject *kobj, enum kobject_action action);

Use the KOBJ_ADD action for when the kobject is first added to the kernel.
This should be done only after any attributes or children of the kobject
have been initialized properly, as userspace will instantly start to look
for them when this call happens."

Which might mean that a call like
kobject_uevent(&dev->kobj, KOBJ_ADD);
that I could only find in base/core.c is called
before the hid power_supply is registered,
I'm not a kernel dev so I might be totally wrong,
I also don't know the exact code path when the
device is added, could someone please give me
a hand on this?

Thanks,

--
Daniel Nicoletti

KDE Developer - http://dantti.wordpress.com
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux