Re: [PATCH 8/8] staging: vme: make match() driver specific toimprove non-VME64x support
From: Manohar Vanga
Date: Wed Aug 03 2011 - 08:21:18 EST
Hey Martyn,
> I haven't got any hardware old enough to hand to play with how ISA devices get
> bound into the device model.
Neither do I! I studied the code in drivers/base/isa.c to understand how it is
being done. More specifically, take a look at isa_register_driver() and
isa_bus_match() and you will see the similarities with this patch :)
> I was thinking that we may be able to do vme-$bus_id.$device_id, but this
> would require the $device_id to be unique per bus, which isn't an issue on
> buses such as PCI (or I guess USB) where such enumeration is built into the
> spec. With the exception of VME64x, which I guess we should really be
> treating as a special case (I guess most cards in actual use don't follow
> this standard), we are much closer to the ISA bus.
Exactly. This is great for VME64x but unfortunately makes the rest of the
cases a bit constrained.
> I assume that $driver_name-$bus_id.$device_id is roughly in line with how ISA
> would do this (IIRC, ther would only ever be one ISA bus on a board, so the
> bus entry wouldn't be needed, but we clearly need this)?
Yup. (Most of this code was taken from drivers/base/isa.c)
Thanks!
--
/manohar
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/