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. More...
Functions | |
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 int | pmic_dev_free (struct inode *inode, struct file *file) |
static int __init | pmic_dev_init (void) |
static void __exit | pmic_dev_exit (void) |
Variables | |
static struct file_operations | pmic_fops |
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.
static void __exit pmic_dev_exit | ( | void | ) | [static] |
This function implements the exit function of the PMIC character device. This function is called when the module is unloaded. It unregisters the PMIC character device.
static int pmic_dev_free | ( | struct inode * | inode, | |
struct file * | file | |||
) | [static] |
This function implements the release method on a PMIC device.
inode | pointer on the node | |
file | pointer on the file |
static int __init pmic_dev_init | ( | void | ) | [static] |
This function implements the init function of the PMIC char device. This function is called when the module is loaded. It registers the character device for PMIC to be used by user-space programs.
References pmic_get_version(), and pmic_version_t::revision.
static int pmic_dev_ioctl | ( | struct inode * | inode, | |
struct file * | file, | |||
unsigned int | cmd, | |||
unsigned long | arg | |||
) | [static] |
This function implements IOCTL controls on a PMIC device.
inode | pointer on the node | |
file | pointer on the file | |
cmd | the command | |
arg | the parameter |
References pmic_event_callback_t::func, pmic_event_callback_t::param, pmic_event_subscribe(), pmic_event_unsubscribe(), pmic_read_reg(), pmic_write_reg(), register_info::reg, and register_info::reg_value.
static int pmic_dev_open | ( | struct inode * | inode, | |
struct file * | file | |||
) | [static] |
This function implements the open method on a PMIC device.
inode | pointer on the node | |
file | pointer on the file |
struct file_operations pmic_fops [static] |
{ .owner = THIS_MODULE, .ioctl = pmic_dev_ioctl, .open = pmic_dev_open, .release = pmic_dev_free, .fasync = pmic_dev_fasync, }
This structure defines file operations for a PMIC device.
© Freescale Semiconductor, Inc., 2007.
All rights reserved. Freescale Confidential Proprietary NDA Required |
![]() |