Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
pwm-mxs.c File Reference
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h>
#include <linux/pwm.h>
#include <linux/slab.h>
#include <linux/stmp_device.h>

Go to the source code of this file.

Data Structures

struct  mxs_pwm_chip
 

Macros

#define SET   0x4
 
#define CLR   0x8
 
#define TOG   0xc
 
#define PWM_CTRL   0x0
 
#define PWM_ACTIVE0   0x10
 
#define PWM_PERIOD0   0x20
 
#define PERIOD_PERIOD(p)   ((p) & 0xffff)
 
#define PERIOD_PERIOD_MAX   0x10000
 
#define PERIOD_ACTIVE_HIGH   (3 << 16)
 
#define PERIOD_INACTIVE_LOW   (2 << 18)
 
#define PERIOD_CDIV(div)   (((div) & 0x7) << 20)
 
#define PERIOD_CDIV_MAX   8
 
#define to_mxs_pwm_chip(_chip)   container_of(_chip, struct mxs_pwm_chip, chip)
 

Functions

 MODULE_DEVICE_TABLE (of, mxs_pwm_dt_ids)
 
 module_platform_driver (mxs_pwm_driver)
 
 MODULE_ALIAS ("platform:mxs-pwm")
 
 MODULE_AUTHOR ("Shawn Guo <[email protected]>")
 
 MODULE_DESCRIPTION ("Freescale MXS PWM Driver")
 
 MODULE_LICENSE ("GPL v2")
 

Macro Definition Documentation

#define CLR   0x8

Definition at line 26 of file pwm-mxs.c.

#define PERIOD_ACTIVE_HIGH   (3 << 16)

Definition at line 34 of file pwm-mxs.c.

#define PERIOD_CDIV (   div)    (((div) & 0x7) << 20)

Definition at line 36 of file pwm-mxs.c.

#define PERIOD_CDIV_MAX   8

Definition at line 37 of file pwm-mxs.c.

#define PERIOD_INACTIVE_LOW   (2 << 18)

Definition at line 35 of file pwm-mxs.c.

#define PERIOD_PERIOD (   p)    ((p) & 0xffff)

Definition at line 32 of file pwm-mxs.c.

#define PERIOD_PERIOD_MAX   0x10000

Definition at line 33 of file pwm-mxs.c.

#define PWM_ACTIVE0   0x10

Definition at line 30 of file pwm-mxs.c.

#define PWM_CTRL   0x0

Definition at line 29 of file pwm-mxs.c.

#define PWM_PERIOD0   0x20

Definition at line 31 of file pwm-mxs.c.

#define SET   0x4

Definition at line 25 of file pwm-mxs.c.

#define to_mxs_pwm_chip (   _chip)    container_of(_chip, struct mxs_pwm_chip, chip)

Definition at line 46 of file pwm-mxs.c.

#define TOG   0xc

Definition at line 27 of file pwm-mxs.c.

Function Documentation

MODULE_ALIAS ( "platform:mxs-pwm )
MODULE_AUTHOR ( "Shawn Guo <[email protected]>"  )
MODULE_DESCRIPTION ( "Freescale MXS PWM Driver"  )
MODULE_DEVICE_TABLE ( of  ,
mxs_pwm_dt_ids   
)
MODULE_LICENSE ( "GPL v2 )
module_platform_driver ( mxs_pwm_driver  )