All of lore.kernel.org
 help / color / mirror / Atom feed
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: Linux Kernel <linux-kernel@vger.kernel.org>, gregkh@linuxfoundation.org
Cc: "Brown, Len" <len.brown@intel.com>, "Rafael J. Wysocki" <rjw@sisk.pl>
Subject: driver model, duplicate names question
Date: Tue, 16 Jul 2013 09:34:57 -0700	[thread overview]
Message-ID: <51E57631.2030805@linux.intel.com> (raw)

Hi Greg,

I would like to create tree like structure using device model (struct 
device, device_register/device_unregister) using parent/child 
relationship while creation. I want to be able to create duplicate 
names, when their parents are different, similar to a directory structure.
I see that I can't create devices with duplicate names (device names), 
even when their parents are different.

How can I allow duplicate names when their parents are different devices?
I want to avoid flat model as I have parent child relationship and there 
will be too many devices using flat model.

Why, I need?
I am going to publish RFC for a new power cap class driver. We have a 
multiple controllers under power cap class (they are devices). Under 
which there are multiple power zones, with parent/child relationships. 
Currently I have to use  kobject_init_and_add, which I want to avoid and 
just use device_register. Other places, wherever such relationships are 
required, kobjects are used like cpufreq.

Thanks,
Srinivas Pandruvada
Open Source Technology Center,
Intel Corp.







             reply	other threads:[~2013-07-16 16:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-16 16:34 Srinivas Pandruvada [this message]
2013-07-16 16:44 ` driver model, duplicate names question Greg KH
2013-07-16 18:29   ` Srinivas Pandruvada
2013-07-16 18:31     ` Greg KH
2013-07-16 18:54       ` Srinivas Pandruvada
2013-07-16 19:04         ` Greg KH
2013-07-16 19:33           ` Srinivas Pandruvada
2013-07-16 19:32             ` Greg KH
2013-07-16 20:11               ` Srinivas Pandruvada
     [not found]               ` <51E6D95B.1070203@linux.intel.com>
2013-07-17 17:48                 ` Greg KH
2013-07-17 18:09               ` Srinivas Pandruvada
2013-07-17 18:31                 ` Greg KH
2013-07-17 18:55                   ` Srinivas Pandruvada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51E57631.2030805@linux.intel.com \
    --to=srinivas.pandruvada@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.