my idea for this was to have struct musb_io_ops. something like:
struct musb_io_ops {
u8 (*readb)(const void __iomem *addr, unsigned offset);
void (*writeb)(const void __iomem *addr, unsigned offset, u8 data);
u16 (*readw)(....);
void (*writew)(;...);
u32 (*readl)();
void (writel)();
}
then you have a pointer for that inside the struct musb_platform_ops, or
maybe somewhere else. And you initialize the same way platform_ops, and
if you don't have a field, you fallback to default implementation.
--
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html