Anyone?
I would welcome any suggestions as to how I can communicate with the GPIO-pins, it doesn't have to be through /sys (my ultimate goal is to create a char device driver, and I thought /sys/class/gpio would be a nice place to start in order to verify that GPIO worked as expected).
My (somewhat vague) theory is that I have to add something to <..>/arch/powerpc/platforms/83xx/mpc830x_rdb.c, but I have no idea what I need to add.
Extensive googling led me to try the driver found here:
http://docs.blackfin.uclinux.org/dok...rs:simple-gpio, and I added this to mpc830x_rdb.c:
Code:
static struct resource foo_resources[] = {
{.start = 0},
{.end = 5},
{.flags = IORESOURCE_IRQ},
};
static struct platform_device foo_dev = {
.name = "simple-gpio",
.num_resources = 1,
.resource = &foo_resources
};
When insmod'ing (after recompiling the kernel) nothing happens (the init-method is executed, but the device does not show up in /proc/devices). Also, its probe-method is never executed (I tested with adding print-statements to the code).
All this leads me to suspect that the source of the problem lies in either mpc8308erdb.dts or mpc830x_rdb.c, but I have no idea whatsoever as to how I should debug this any further..
More details: kernel is compiled with both CONFIG_QUICC_ENGINE and CONFIG_SIMPLE_GPIO set to yes (and also various relevant SYSFS-flags).