[lkml]   [2006]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectSysfs architecture question

I'm writing a driver for a smart card reader integrated in a
processor. The hardware have two interfaces (two "buses") to which you
can connect a number of analog adaptors. Each analog adaptors can have
multiple smartcard slots. I'd like to know if the architecture I've
chosen for the sysfs is good, most of all regarding power management.

I first created a platform device that represents the whole
controller, in which I define all the resources needed by the driver.
I also define a platform device_driver for this device.
Under it are two devices that represent the two interfaces of the
hardware. I also created a new sc_bus type, to which these three
devices are linked.
For each analog adaptor I create a device_driver entry, and the
associated device which is a child of my sc_bus device.
Finally, to each analog adaptor device can be attached a number of
smart card slots, represented by a device structure.
Here is an example of what you can see in /sys/device/platform (only
folders appear):
|-- sc_controller
| |-- sc_bus0
| | |-- analog_adaptor0
| | | `-- sc_slot0
| | |-- analog_adaptor1
| | | |-- sc_slot1
| | | `-- sc_slot2
| |-- sc_bus1

So, my questions are:
Is the whole architecture correct ? Is it good to have the sc_bus
under the sc_controller ?
I have some difficulties to understand how power management works. I'd
like to be able to suspend/resume every slots (stop transfers, etc)
and every buses (stop clocks) by suspending/resuming the
sc_controller. Is that possible and how ?

Thanks in advance for your remarks and ideas.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-10-26 10:05    [W:0.018 / U:29.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site