#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/atomic.h>
#include <linux/clk.h>
#include <linux/completion.h>
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/gpio.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/of.h>
#include <linux/of_gpio.h>
#include <linux/list.h>
#include <linux/mfd/core.h>
#include <linux/mutex.h>
#include <linux/notifier.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/workqueue.h>
#include <mach/clk.h>
#include <mach/iomap.h>
#include "nvec.h"
Go to the source code of this file.
#define I2C_CNFG_DEBOUNCE_CNT_SHIFT 12 |
#define I2C_CNFG_NEW_MASTER_SFM (1<<11) |
#define I2C_CNFG_PACKET_MODE_EN (1<<10) |
#define I2C_SL_ADDR1 0x2c |
#define I2C_SL_ADDR2 0x30 |
#define I2C_SL_DELAY_COUNT 0x3c |
#define I2C_SL_IRQ (1<<3) |
#define I2C_SL_NACK (1<<1) |
#define I2C_SL_NEWSL (1<<2) |
#define I2C_SL_RESP (1<<0) |
#define I2C_SL_STATUS 0x28 |
enum nvec_msg_category - Message categories for nvec_msg_alloc() : The message is an incoming message (from EC) : The message is an outgoing message (to EC)
- Enumerator:
-
Definition at line 71 of file nvec.c.
MODULE_ALIAS |
( |
"platform:nvec" |
| ) |
|
MODULE_DEVICE_TABLE |
( |
of |
, |
|
|
nvidia_nvec_of_match |
|
|
) |
| |
module_platform_driver |
( |
nvec_device_driver |
| ) |
|
nvec_msg_free: : A &struct nvec_chip : A message (must be allocated by nvec_msg_alloc() and belong to )
Free the given message
Definition at line 183 of file nvec.c.
nvec_register_notifier - Register a notifier with nvec : A &struct nvec_chip : The notifier block to register
Registers a notifier with . The notifier will be added to an atomic notifier chain that is called for all received messages except those that correspond to a request initiated by nvec_write_sync().
Definition at line 114 of file nvec.c.
nvec_write_async - Asynchronously write a message to NVEC : An nvec_chip instance : The message data, starting with the request type : The size of
Queue a single message to be transferred to the embedded controller and return immediately.
Returns: 0 on success, a negative error code on failure. If a failure occured, the nvec driver may print an error.
Definition at line 248 of file nvec.c.
nvec_write_sync - Write a message to nvec and read the response : An &struct nvec_chip : The data to write : The size of
This is similar to nvec_write_async(), but waits for the request to be answered before returning. This function uses a mutex and can thus not be called from e.g. interrupt handlers.
Returns: A pointer to the response message on success, NULL on failure. Free with nvec_msg_free() once no longer used.
Definition at line 288 of file nvec.c.