Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
locomo.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/ioport.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/io.h>
#include <mach/hardware.h>
#include <asm/irq.h>
#include <asm/mach/irq.h>
#include <asm/hardware/locomo.h>

Go to the source code of this file.

Data Structures

struct  locomo
 
struct  locomo_dev_info
 

Macros

#define IRQ_LOCOMO_KEY   (0)
 
#define IRQ_LOCOMO_GPIO   (1)
 
#define IRQ_LOCOMO_LT   (2)
 
#define IRQ_LOCOMO_SPI   (3)
 
#define M62332_EVR_CH   1 /* M62332 volume channel number */
 
#define M62332_SLAVE_ADDR   0x4e /* Slave address */
 
#define M62332_W_BIT   0x00 /* W bit (0 only) */
 
#define M62332_SUB_ADDR   0x00 /* Sub address */
 
#define M62332_A_BIT   0x00 /* A bit (0 only) */
 
#define DAC_BUS_FREE_TIME   5 /* 4.7 us */
 
#define DAC_START_SETUP_TIME   5 /* 4.7 us */
 
#define DAC_STOP_SETUP_TIME   4 /* 4.0 us */
 
#define DAC_START_HOLD_TIME   5 /* 4.7 us */
 
#define DAC_SCL_LOW_HOLD_TIME   5 /* 4.7 us */
 
#define DAC_SCL_HIGH_HOLD_TIME   4 /* 4.0 us */
 
#define DAC_DATA_SETUP_TIME   1 /* 250 ns */
 
#define DAC_DATA_HOLD_TIME   1 /* 300 ns */
 
#define DAC_LOW_SETUP_TIME   1 /* 300 ns */
 
#define DAC_HIGH_SETUP_TIME   1 /* 1000 ns */
 

Functions

void locomo_gpio_set_dir (struct device *dev, unsigned int bits, unsigned int dir)
 
 EXPORT_SYMBOL (locomo_gpio_set_dir)
 
int locomo_gpio_read_level (struct device *dev, unsigned int bits)
 
 EXPORT_SYMBOL (locomo_gpio_read_level)
 
int locomo_gpio_read_output (struct device *dev, unsigned int bits)
 
 EXPORT_SYMBOL (locomo_gpio_read_output)
 
void locomo_gpio_write (struct device *dev, unsigned int bits, unsigned int set)
 
 EXPORT_SYMBOL (locomo_gpio_write)
 
void locomo_m62332_senddata (struct locomo_dev *ldev, unsigned int dac_data, int channel)
 
 EXPORT_SYMBOL (locomo_m62332_senddata)
 
void locomo_frontlight_set (struct locomo_dev *dev, int duty, int vr, int bpwf)
 
 EXPORT_SYMBOL (locomo_frontlight_set)
 
int locomo_driver_register (struct locomo_driver *driver)
 
 EXPORT_SYMBOL (locomo_driver_register)
 
void locomo_driver_unregister (struct locomo_driver *driver)
 
 EXPORT_SYMBOL (locomo_driver_unregister)
 
 module_init (locomo_init)
 
 module_exit (locomo_exit)
 
 MODULE_DESCRIPTION ("Sharp LoCoMo core driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("John Lenz <[email protected]>")
 

Variables

struct bus_type locomo_bus_type
 

Macro Definition Documentation

#define DAC_BUS_FREE_TIME   5 /* 4.7 us */

Definition at line 51 of file locomo.c.

#define DAC_DATA_HOLD_TIME   1 /* 300 ns */

Definition at line 58 of file locomo.c.

#define DAC_DATA_SETUP_TIME   1 /* 250 ns */

Definition at line 57 of file locomo.c.

#define DAC_HIGH_SETUP_TIME   1 /* 1000 ns */

Definition at line 60 of file locomo.c.

#define DAC_LOW_SETUP_TIME   1 /* 300 ns */

Definition at line 59 of file locomo.c.

#define DAC_SCL_HIGH_HOLD_TIME   4 /* 4.0 us */

Definition at line 56 of file locomo.c.

#define DAC_SCL_LOW_HOLD_TIME   5 /* 4.7 us */

Definition at line 55 of file locomo.c.

#define DAC_START_HOLD_TIME   5 /* 4.7 us */

Definition at line 54 of file locomo.c.

#define DAC_START_SETUP_TIME   5 /* 4.7 us */

Definition at line 52 of file locomo.c.

#define DAC_STOP_SETUP_TIME   4 /* 4.0 us */

Definition at line 53 of file locomo.c.

#define IRQ_LOCOMO_GPIO   (1)

Definition at line 37 of file locomo.c.

#define IRQ_LOCOMO_KEY   (0)

Definition at line 36 of file locomo.c.

#define IRQ_LOCOMO_LT   (2)

Definition at line 38 of file locomo.c.

#define IRQ_LOCOMO_SPI   (3)

Definition at line 39 of file locomo.c.

#define M62332_A_BIT   0x00 /* A bit (0 only) */

Definition at line 48 of file locomo.c.

#define M62332_EVR_CH   1 /* M62332 volume channel number */

Definition at line 42 of file locomo.c.

#define M62332_SLAVE_ADDR   0x4e /* Slave address */

Definition at line 45 of file locomo.c.

#define M62332_SUB_ADDR   0x00 /* Sub address */

Definition at line 47 of file locomo.c.

#define M62332_W_BIT   0x00 /* W bit (0 only) */

Definition at line 46 of file locomo.c.

Function Documentation

EXPORT_SYMBOL ( locomo_gpio_set_dir  )
EXPORT_SYMBOL ( locomo_gpio_read_level  )
EXPORT_SYMBOL ( locomo_gpio_read_output  )
EXPORT_SYMBOL ( locomo_gpio_write  )
EXPORT_SYMBOL ( locomo_m62332_senddata  )
EXPORT_SYMBOL ( locomo_frontlight_set  )
EXPORT_SYMBOL ( locomo_driver_register  )
EXPORT_SYMBOL ( locomo_driver_unregister  )
int locomo_driver_register ( struct locomo_driver driver)

Definition at line 882 of file locomo.c.

void locomo_driver_unregister ( struct locomo_driver driver)

Definition at line 889 of file locomo.c.

void locomo_frontlight_set ( struct locomo_dev dev,
int  duty,
int  vr,
int  bpwf 
)

Definition at line 796 of file locomo.c.

int locomo_gpio_read_level ( struct device dev,
unsigned int  bits 
)

Definition at line 569 of file locomo.c.

int locomo_gpio_read_output ( struct device dev,
unsigned int  bits 
)

Definition at line 587 of file locomo.c.

void locomo_gpio_set_dir ( struct device dev,
unsigned int  bits,
unsigned int  dir 
)

Definition at line 540 of file locomo.c.

void locomo_gpio_write ( struct device dev,
unsigned int  bits,
unsigned int  set 
)

Definition at line 605 of file locomo.c.

void locomo_m62332_senddata ( struct locomo_dev ldev,
unsigned int  dac_data,
int  channel 
)

Definition at line 662 of file locomo.c.

MODULE_AUTHOR ( "John Lenz <[email protected]>"  )
MODULE_DESCRIPTION ( "Sharp LoCoMo core driver )
module_exit ( locomo_exit  )
module_init ( locomo_init  )
MODULE_LICENSE ( "GPL"  )

Variable Documentation

struct bus_type locomo_bus_type
Initial value:
= {
.name = "locomo-bus",
.match = locomo_match,
.probe = locomo_bus_probe,
.remove = locomo_bus_remove,
.suspend = locomo_bus_suspend,
.resume = locomo_bus_resume,
}

Definition at line 873 of file locomo.c.