Letux Kernel

Issue 594: 3.14: needs to fix udev rule for enabling >500 mA chargers

Reported by Nikolaus Schaller, Apr 12, 2014

The current udev rule

http://git.goldelico.com/?p=gta04-kernel.git;a=blob;f=GTA04/udev-rule
s/charging.rules;h=385a354eb742cfccc6161fe2d2e9993c82b6c905;hb=refs/h
eads/3.15-rc0

hard codes the usb ID pin /sysfs node 
ATTR{../../../twl4030-usb.36/id} because there is no other path 
(symlink) in sysfs that is more generic.

Unfortunately the .36 suffix depends on details in the device tree 
and creation order of nodes within sysfs. So we can't rely on the 
.36 being stable (it might even depend on probing result of 
peripheral devices).

We need a solution that is more general and does not depend on 
kernel changes!

Unfortunately no process (and therefore not udev) can create 
symlinks within /sysfs - and udev can't access files outside.

We can easily create a shortcut for the twl4030-usb.36/id file 
outside of sysfs (e.g. in /dev) but then we can't access it in an 
ATTR{path}=="value" rule.

Created: 10 years 5 months ago by Nikolaus Schaller

Updated: 10 years 4 months ago

Status: Fixed

Labels:
Type:Defect
Priority:Critical
Milestone:3.15