![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0+ */ 0002 /* 0003 * i2c-algo-bit.h: i2c driver algorithms for bit-shift adapters 0004 * 0005 * Copyright (C) 1995-99 Simon G. Vogl 0006 * With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even 0007 * Frodo Looijaard <frodol@dds.nl> 0008 */ 0009 0010 #ifndef _LINUX_I2C_ALGO_BIT_H 0011 #define _LINUX_I2C_ALGO_BIT_H 0012 0013 #include <linux/i2c.h> 0014 0015 /* --- Defines for bit-adapters --------------------------------------- */ 0016 /* 0017 * This struct contains the hw-dependent functions of bit-style adapters to 0018 * manipulate the line states, and to init any hw-specific features. This is 0019 * only used if you have more than one hw-type of adapter running. 0020 */ 0021 struct i2c_algo_bit_data { 0022 void *data; /* private data for lowlevel routines */ 0023 void (*setsda) (void *data, int state); 0024 void (*setscl) (void *data, int state); 0025 int (*getsda) (void *data); 0026 int (*getscl) (void *data); 0027 int (*pre_xfer) (struct i2c_adapter *); 0028 void (*post_xfer) (struct i2c_adapter *); 0029 0030 /* local settings */ 0031 int udelay; /* half clock cycle time in us, 0032 minimum 2 us for fast-mode I2C, 0033 minimum 5 us for standard-mode I2C and SMBus, 0034 maximum 50 us for SMBus */ 0035 int timeout; /* in jiffies */ 0036 bool can_do_atomic; /* callbacks don't sleep, we can be atomic */ 0037 }; 0038 0039 int i2c_bit_add_bus(struct i2c_adapter *); 0040 int i2c_bit_add_numbered_bus(struct i2c_adapter *); 0041 extern const struct i2c_algorithm i2c_bit_algo; 0042 0043 #endif /* _LINUX_I2C_ALGO_BIT_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |