lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <a59861030610260102i35e86943qaa0425a5996a0ba1@mail.gmail.com>
Date:	Thu, 26 Oct 2006 10:02:58 +0200
From:	"Ivan Korzakow" <ivan.korzakow@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: Sysfs architecture question

Hi,

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.

Ivan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ