On Wed, Jul 17, 2013 at 11:09:44AM -0700, Srinivas Pandruvada wrote:Sorry, my reply may not be clear here. I am not creating any symlinks.Where are you going to create a symlink from? That doesn't make sense,But thermal devices are not "real" at all. There are just a number ofExperimented by using a device and a bus. As your initial mail pointed
"cooling devices" on a virtual bus and not attached to any type of a
real device at all.
There's also no hierarchy that I can see with the thermal class, but you
want to have this, so you will have to do something different because
classes do not have hierarchies.
So try using a device and a bus and see if that helps out. If not,
please let me know.
out, it still fails.
It will try to create symlink to /sys/bus/BUSTYPE/devices/, which will
prevent duplicate names.
just use a class if you want a link.
<Thanks for your time and help.>Someone suggested to do like usb by creating file system entries, whichSo a separate filesystem alltogether? That would work, but you then
will require me to wear a body armour to post upstream for review.
loose any benifit that the driver core and sysfs provides you, for no
benifit other than looking at a pretty tree in a filesystem. I don't
see the real need for that at all.
So I think the solution is to use prevent duplicate names. So in theThat's what other busses have used for this very reason :)
above example of sys-fs:
"package-0" may be called power_zone#, with attribute "name" =
"package_0". Its children can
be called power_zone#:#. I will still use parent child relationships
during device_register.
For constraints, I will be using attributes like constraint_0_name,
constraint_0_power_limit etc. under each power_zone.
Hope this is an acceptable solution.
Also look at the "type" of device you are creating for your bus, that
will help you differentiate them from each other instead of having to
rely on the names of them to determine what is going on within the
kernel.
good luck,
greg k-h