Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions
i2c-smbus.h File Reference
#include <linux/i2c.h>

Go to the source code of this file.

Data Structures

struct  i2c_smbus_alert_setup
 

Functions

struct i2c_clienti2c_setup_smbus_alert (struct i2c_adapter *adapter, struct i2c_smbus_alert_setup *setup)
 
int i2c_handle_smbus_alert (struct i2c_client *ara)
 

Function Documentation

int i2c_handle_smbus_alert ( struct i2c_client ara)

i2c_handle_smbus_alert - Handle an SMBus alert : the ARA client on the relevant adapter Context: can't sleep

Helper function to be called from an I2C bus driver's interrupt handler. It will schedule the alert work, in turn calling the corresponding I2C device driver's alert function.

It is assumed that ara is a valid i2c client previously returned by i2c_setup_smbus_alert().

Definition at line 237 of file i2c-smbus.c.

struct i2c_client* i2c_setup_smbus_alert ( struct i2c_adapter adapter,
struct i2c_smbus_alert_setup setup 
)
read

i2c_setup_smbus_alert - Setup SMBus alert support : the target adapter : setup data for the SMBus alert handler Context: can sleep

Setup handling of the SMBus alert protocol on a given I2C bus segment.

Handling can be done either through our IRQ handler, or by the adapter (from its handler, periodic polling, or whatever).

NOTE that if we manage the IRQ, we MUST know if it's level or edge triggered in order to hand it to the workqueue correctly. If triggering the alert seems to wedge the system, you probably should have said it's level triggered.

This returns the ara client, which should be saved for later use with i2c_handle_smbus_alert() and ultimately i2c_unregister_device(); or NULL to indicate an error.

Definition at line 213 of file i2c-smbus.c.