All pastes #499988 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-05-21 10:48 UTC
rendered paste body
#include <linux/module.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <linux/random.h>
#include <linux/skbuff.h>
#include <asm/scatterlist.h>
#include <linux/dma-mapping.h>  /* dma_map_single() */
#include <linux/moduleparam.h>
#include <linux/uio.h>

#include <linux/version.h>
#include <asm/of_platform.h>

/* static struct of_device_id talitos_of_match[] = {
        { .type = "crypto", .compatible = "talitos", },
        {},
}; */

static struct of_device_id talitos_of_match[] = {
        { .name= "talitos", .type = "crypto", .compatible = "talitos", },
        {},
};




static int __devinit
talitos_probe(struct of_device *op, const struct of_device_id *match)

{
	printk ("TALITOS PROBE\n");
	return 1;
}

static int
talitos_remove(struct of_device *op)
{
	printk ("TALITOS REMOVE\n");
	return 1;
}

#ifdef CONFIG_PM
static int
talitos_suspend(struct of_device *op, pm_message_t state)
{
	printk ("TALITOS SUSPEND\n");
	return 1;
}

static int
talitos_resume(struct of_device *op)
{
	printk ("TALITOS RESUME\n");
	return 1;
}
#endif

static struct of_platform_driver talitos_driver = {
        .owner          = THIS_MODULE,
	.name		= "talitos",
        .match_table    = talitos_of_match,
	.probe		= talitos_probe,
	.remove		= talitos_remove,
#ifdef CONFIG_PM
        .suspend        = talitos_suspend,
        .resume         = talitos_resume
#endif
};

static int __init talitos_init(void)
{
	printk ("TALITOS INIT\n");
	return of_register_platform_driver(&talitos_driver);
}

static void __exit talitos_exit(void)
{
	printk ("TALITOS EXIT\n");
	of_unregister_platform_driver(&talitos_driver);
}

module_init(talitos_init);
module_exit(talitos_exit);

MODULE_LICENSE("Dual BSD/GPL");
MODULE_AUTHOR("kim.phillips@freescale.com");
MODULE_DESCRIPTION("OCF driver for Freescale SEC (talitos)");