Hi
I'm developing a kernel driver for the relay8 board based on kernel 2.6.33 -
I'm quite new to this and I am finding some of the calls in drivers hard to
understand.
I need to do i/o on 3 registers - offset at {0, 1, 2} from base (after I have
located the base of the board 0x11e00000 + {0x140,0x150,0x160,0x170} depending
on board jumper).
This location should be done in the probe routine of the driver. Yet on all the
other drivers I have examined, I can't see how they locate specific locations
in memory.
Most drivers seem to have
static __devinit int mydrv_probe(struct platform_device *pdev)
{
...
r_data = platform_get_resource(pdev, IORESOURCE_MEM, 0);
followed by something like
ioport = ioremap(r_data->start, r_data->end - r_data->start + 1);
...
so I am getting the feeling that something in the kernel which is calling
mydrv_probe with the pdev structure filled out magically with the right address
mappings. Yet I can't seem to find any configuration file anywhere else that
would indicate this.
Google searches on platform driver development don't seem to return anything
useful. Anyone got a source of enlightening information?
thanks Dominic
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|