Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

pmic-dev.c File Reference


Detailed Description

This provides /dev interface to the user program. They make it possible to have user-space programs use or control PMIC. Mainly its useful for notifying PMIC events to user-space programs.

Definition in file pmic-dev.c.

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/kdev_t.h>
#include <linux/circ_buf.h>
#include <linux/major.h>
#include <linux/init.h>
#include <linux/fs.h>
#include <linux/poll.h>
#include <linux/signal.h>
#include <linux/pmic_external.h>
#include <asm/uaccess.h>

Go to the source code of this file.

Defines

#define CIRC_ADD(elem, cir_buf, size)
#define CIRC_BUF_MAX   16
#define CIRC_REMOVE(elem, cir_buf, size)
#define PMIC_NAME   "pmic"

Functions

static void callbackfn (void *event)
static DECLARE_MUTEX (event_mutex)
 MODULE_AUTHOR ("FreeScale")
 MODULE_DESCRIPTION ("PMIC Protocol /dev entries driver")
 module_exit (pmic_dev_exit)
 module_init (pmic_dev_init)
 MODULE_LICENSE ("GPL")
static void __exit pmic_dev_exit (void)
static int pmic_dev_fasync (int fd, struct file *filp, int mode)
static int pmic_dev_free (struct inode *inode, struct file *file)
static int __init pmic_dev_init (void)
static int pmic_dev_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
static int pmic_dev_open (struct inode *inode, struct file *file)
static void user_notify_callback (void *event)

Variables

static struct class * pmic_class
static struct fasync_struct * pmic_dev_queue
static struct circ_buf pmic_events
static struct file_operations pmic_fops
static int pmic_major


Generated by  Doxygen 1.6.0   Back to index