>> "akita_set_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_IR_ON);"

about IrDA on akita, i have to explain:
i hacked a serial uart keyboard (the Apple Newton one) adding it an Ir
transmitter in order to have uart on InfraRed kb. I'd like to hav it
attached to the Ir port of akita

on the software side it's quite easy: every kernels have "newton
keyboard" support in the input/kb section, so you just need a proper
code in user space, in order to properly attach the keyboard

i did this code, i tested it on my apple powerbook g3, which has an
uart on Ir (Zilog uart): it works very nice !

about akita, i need a pretty kernel, and, from my point of view, the
prettiest is the 2.6.23!
it's the one with the less issues for my target apps !

the problem is: akita has a strange support about the Ir chip, it
switch it on/off when you modprobe the IrDA's stuff, IrDA is
networking on Ir, it's much more complex than a simply uart on Ir ...

so i just need to put the Ir chip on, then i could handle the
/dev/ttyS1 as a simply uart port at 9600bps-8bit-1start-1stop-noparity

in order to do it i need to write a simple kernel module which should invoke
 "akita_set_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_IR_ON);"

i am not a kernel module programmer, it's my second kernel module (my
first was a sort of chardev), so i need a bit of help



i integrated it in the kernel tree, drivers/serial/pxa_uart_on_ir.c
it seems there is something wrong about something like this

/*
 * Akita IO Expander
 */
//struct platform_device akitaioexp_device = {
//        .name           = "akita-ioexp",
//        .id             = -1,
//};
//EXPORT_SYMBOL_GPL(akitaioexp_device)??? why has not been exported by
spitz.c ???


i mean the modprobe returns this error
 pxa_uart_on_ir: Unknown symbol akitaioexp_device



suggestions ?



/*
 * pxa_uart_on_ir.c
 * uart on ir for the PXA2xx akita pxa_uart_on_ir.c
 * this module should put on/off the Ir chip
 */


/*
     [*] Notes:
     ==========

     These devices are connected to ioexp
      * IrDA on/off
      * backlight power on/off
      * highest bit of baclight intensity
      * pull-up voltage for remote on/off
      * Microphone bias on/off

     These devices use I2C
      * Akita IOEXP (PXA270 I2C bus)
      * WM8750 audio chip (PXA270 I2S bus)

     Note that there are two I2C busses inside Akita:
      * fast I2S - WM8750 is connected there
      * slow I2C - IOEXP is connected there
                   (and nothing on spitz)

*/


/*
 *  module_init()
 *  module_exit()
 *  macros, this is preferred over using
 *  init_module()
 *  cleanup_module()
 */

#include <linux/module.h>       /* Needed by all modules */
#include <linux/kernel.h>       /* Needed for KERN_INFO */
#include <linux/init.h>         /* Needed for the macros */

#include <linux/types.h>
#include <linux/errno.h>
#include <linux/netdevice.h>
#include <linux/slab.h>
#include <linux/rtnetlink.h>
#include <linux/interrupt.h>
#include <linux/dma-mapping.h>
#include <linux/platform_device.h>
#include <linux/pm.h>

#include <net/irda/irda.h>
#include <net/irda/irmod.h>
#include <net/irda/wrapper.h>
#include <net/irda/irda_device.h>

#include <asm/irq.h>
#include <asm/dma.h>
#include <asm/delay.h>
#include <asm/hardware.h>
#include <asm/arch/irda.h>
#include <asm/arch/pxa-regs.h>

#include <asm/arch/akita.h>

extern struct platform_device akitaioexp_device;






static int __init pxa_uart_on_ir_init(void)
{
        printk(KERN_INFO "pxa_uart_on_ir: ir chip on\n");
        akita_set_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_IR_ON);
        return 0;
}

static void __exit pxa_uart_on_ir_exit(void)
{
        printk(KERN_INFO "pxa_uart_on_ir: ir chip off\n");
        akita_reset_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_IR_ON);
}

module_init(pxa_uart_on_ir_init);
module_exit(pxa_uart_on_ir_exit);

_______________________________________________
Zaurus-devel mailing list
Zaurus-devel@lists.linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/zaurus-devel

Reply via email to