Main Page | Modules | Data Structures | File List | Data Fields | Related Pages

I2C
[Linux 2.6 support]

I2C. More...

Functions

char * i2c_compute_udi (HalDevice *d, int append_num)
 This function will compute the device uid based on other properties of the device.

void visit_device_i2c_got_parent (HalDevice *parent, void *data1, void *data2)
 Callback when the parent is found or if there is no parent..

void visit_device_i2c (const char *path, struct sysfs_device *device)
 Visitor function for I2C device.

void linux_i2c_init ()
 Init function for I2C handling.

void linux_i2c_detection_done ()
 This function is called when all device detection on startup is done in order to perform optional batch processing on devices.

void linux_i2c_shutdown ()
 Shutdown function for I2C handling.


Detailed Description

I2C.


Function Documentation

char* i2c_compute_udi HalDevice d,
int  append_num
[static]
 

This function will compute the device uid based on other properties of the device.

Specifically, the following properties are required:

  • i2c.product

Other properties may also be used.

Requirements for uid:

  • do not rely on bus, port etc.; we want this id to be as unique for the device as we can
  • make sure it doesn't rely on properties that cannot be obtained from the minimal information we can obtain on an unplug event

Parameters:
d HalDevice object
append_num Number to append to name if not -1
Returns:
New unique device id; only good until the next invocation of this function

Definition at line 70 of file linux_i2c.c.

References ds_property_get_string(), and HalDevice.

Referenced by visit_device_i2c_got_parent().

void visit_device_i2c const char *  path,
struct sysfs_device *  device
 

Visitor function for I2C device.

This function parses the attributes present and creates a new HAL device based on this information.

Parameters:
path Sysfs-path for device
device libsysfs object for device

Note:
We also set the path here, because otherwise we can't handle two identical devices per algorithm used in a rename_and_merge() The point is that we need something unique in the Bus namespace

Definition at line 99 of file linux_i2c.c.

References drivers_lookup(), ds_device_async_find_by_key_value_string(), ds_device_new(), ds_property_get_string(), ds_property_set_string(), get_parent_sysfs_path(), HAL_LINUX_HOTPLUG_TIMEOUT, HalDevice, is_probing, and visit_device_i2c_got_parent().

Referenced by visit_device().

void visit_device_i2c_got_parent HalDevice parent,
void *  data1,
void *  data2
[static]
 

Callback when the parent is found or if there is no parent..

This is where we get added to the GDL..

Parameters:
parent Async Return value from the find call
data1 User data
data2 User data

Definition at line 182 of file linux_i2c.c.

References ds_device_find(), ds_gdl_add(), ds_property_set_string(), HalDevice, i2c_compute_udi(), rename_and_merge(), and HalDevice_s::udi.

Referenced by visit_device_i2c().


Generated on Thu Mar 11 21:32:26 2004 for HAL by doxygen 1.3.6-20040222