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

pmic_light.c File Reference


Detailed Description

This is the main file of PMIC(mc13783) Light and Backlight driver.

Definition in file pmic_light.c.

#include <linux/platform_device.h>
#include <linux/delay.h>
#include <linux/fs.h>
#include <linux/pmic_light.h>
#include <linux/pmic_status.h>

Go to the source code of this file.

Defines

#define BIT_BP_BLUE_LSH   0
#define BIT_BP_BLUE_WID   2
#define BIT_BP_GREEN_LSH   12
#define BIT_BP_GREEN_WID   2
#define BIT_BP_RED_LSH   0
#define BIT_BP_RED_WID   2
#define BIT_CL_AUX_LSH   21
#define BIT_CL_AUX_WID   3
#define BIT_CL_BLUE_LSH   9
#define BIT_CL_BLUE_WID   3
#define BIT_CL_GREEN_LSH   21
#define BIT_CL_GREEN_WID   3
#define BIT_CL_KEY_LSH   9
#define BIT_CL_KEY_WID   3
#define BIT_CL_MAIN_LSH   9
#define BIT_CL_MAIN_WID   3
#define BIT_CL_RED_LSH   9
#define BIT_CL_RED_WID   3
#define BIT_DC_AUX_LSH   15
#define BIT_DC_AUX_WID   6
#define BIT_DC_BLUE_LSH   3
#define BIT_DC_BLUE_WID   6
#define BIT_DC_GREEN_LSH   15
#define BIT_DC_GREEN_WID   6
#define BIT_DC_KEY_LSH   3
#define BIT_DC_KEY_WID   6
#define BIT_DC_MAIN_LSH   3
#define BIT_DC_MAIN_WID   6
#define BIT_DC_RED_LSH   3
#define BIT_DC_RED_WID   6
#define BIT_HC_AUX_LSH   13
#define BIT_HC_AUX_WID   1
#define BIT_HC_KEY_LSH   1
#define BIT_HC_KEY_WID   1
#define BIT_HC_MAIN_LSH   1
#define BIT_HC_MAIN_WID   1
#define BIT_RP_AUX_LSH   14
#define BIT_RP_AUX_WID   1
#define BIT_RP_BLUE_LSH   2
#define BIT_RP_BLUE_WID   1
#define BIT_RP_GREEN_LSH   14
#define BIT_RP_GREEN_WID   1
#define BIT_RP_KEY_LSH   2
#define BIT_RP_KEY_WID   1
#define BIT_RP_MAIN_LSH   2
#define BIT_RP_MAIN_WID   1
#define BIT_RP_RED_LSH   2
#define BIT_RP_RED_WID   1
#define DEBUG

Enumerations

enum  {
  SET_CURR = 0, SET_DC, SET_RAMP, SET_BP,
  SET_CH, LIT_CMD_MAX
}

Functions

static int cmd (unsigned int index, int value)
static DEVICE_ATTR (lit, 0644, lit_info, lit_ctl)
 EXPORT_SYMBOL (mc13892_bklit_get_blink_p)
 EXPORT_SYMBOL (mc13892_bklit_set_blink_p)
 EXPORT_SYMBOL (mc13892_bklit_get_ramp)
 EXPORT_SYMBOL (mc13892_bklit_set_ramp)
 EXPORT_SYMBOL (mc13892_bklit_get_dutycycle)
 EXPORT_SYMBOL (mc13892_bklit_set_dutycycle)
 EXPORT_SYMBOL (mc13892_bklit_get_current)
 EXPORT_SYMBOL (mc13892_bklit_set_current)
static ssize_t lit_ctl (struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
static ssize_t lit_info (struct device *dev, struct device_attribute *attr, char *buf)
PMIC_STATUS mc13892_bklit_get_blink_p (enum lit_channel channel, int *period)
PMIC_STATUS mc13892_bklit_get_current (enum lit_channel channel, unsigned char *level)
PMIC_STATUS mc13892_bklit_get_dutycycle (enum lit_channel channel, unsigned char *dc)
PMIC_STATUS mc13892_bklit_get_hi_current (enum lit_channel channel, int *mode)
PMIC_STATUS mc13892_bklit_get_ramp (enum lit_channel channel, int *flag)
PMIC_STATUS mc13892_bklit_set_blink_p (enum lit_channel channel, int period)
PMIC_STATUS mc13892_bklit_set_current (enum lit_channel channel, unsigned char level)
PMIC_STATUS mc13892_bklit_set_dutycycle (enum lit_channel channel, unsigned char dc)
PMIC_STATUS mc13892_bklit_set_hi_current (enum lit_channel channel, int mode)
PMIC_STATUS mc13892_bklit_set_ramp (enum lit_channel channel, int flag)
 MODULE_AUTHOR ("Freescale Semiconductor, Inc.")
 MODULE_DESCRIPTION ("PMIC_LIGHT")
 module_exit (pmic_light_exit)
 MODULE_LICENSE ("GPL")
static void __exit pmic_light_exit (void)
static int __init pmic_light_init (void)
int pmic_light_init_reg (void)
static int pmic_light_probe (struct platform_device *pdev)
static int pmic_light_remove (struct platform_device *pdev)
static int pmic_light_resume (struct platform_device *pdev)
static int pmic_light_suspend (struct platform_device *dev, pm_message_t state)
 subsys_initcall (pmic_light_init)

Variables

static const char *const lit_cmd [LIT_CMD_MAX]
static struct platform_driver pmic_light_driver_ldm


Generated by  Doxygen 1.6.0   Back to index