Skip to content
Snippets Groups Projects
Commit b0b0d428 authored by Federico Vaga's avatar Federico Vaga
Browse files

core: ZIO is now based on the bus abstraction


This patch introduces zio_driver and zio_device_id structure,
which are used to define a zio's driver. ZIO uses these
structures to handle the match between devices and drivers
connected on the zio bus.

To make ZIO work on the Linux bus mechanism, ZIO creates two
zio_device structures. The first zio_device is allocated and it is
registered by the module which wants to declare the existence
of a new ZIO device. This first zio_device is only used by
ZIO to match the device with a driver. When the first zio
device matchs with a driver, ZIO creates a new zio device child
of the first one. The new device is filled with all the device
information and sysfs attributes. This second zio device
represents the real device to use; ZIO passes this zio device
as argument to the driver probe function, so the driver can
use the real zio device for its operations.
From the user space point of view, both ZIO devices are
available at /sys/bus/zio/devices/; the first zio device has
the prefix "hwdev-", the second zio device (the real one) has
the prefix "zio-"

Signed-off-by: default avatarFederico Vaga <federico.vaga@gmail.com>
Acked-by: default avatarAlessandro Rubini <rubini@gnudd.com>
parent e4c71205
Branches
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment