27 #if defined(__LITTLE_ENDIAN_BITFIELD)
31 #elif defined(__BIG_ENDIAN_BITFIELD)
36 #error "Please fix <asm/byteorder.h>"
43 #include <linux/device.h>
48 #define W1_MAXNAMELEN 32
50 #define W1_SEARCH 0xF0
51 #define W1_ALARM_SEARCH 0xEC
52 #define W1_CONVERT_TEMP 0x44
53 #define W1_SKIP_ROM 0xCC
54 #define W1_READ_SCRATCHPAD 0xBE
55 #define W1_READ_ROM 0x33
56 #define W1_READ_PSUPPLY 0xB4
57 #define W1_MATCH_ROM 0x55
58 #define W1_RESUME_CMD 0xA5
60 #define W1_SLAVE_ACTIVE 0
65 unsigned char name[W1_MAXNAMELEN];
73 struct w1_master *master;
80 typedef void (*w1_slave_found_callback)(
struct w1_master *,
u64);
102 void (*write_bit)(
void *,
u8);
111 u8 (*touch_bit)(
void *,
u8);
117 u8 (*read_byte)(
void *);
122 void (*write_byte)(
void *,
u8);
128 u8 (*read_block)(
void *,
u8 *,
int);
131 void (*write_block)(
void *,
const u8 *,
int);
137 u8 (*triplet)(
void *,
u8);
143 u8 (*reset_bus)(
void *);
149 u8 (*set_pullup)(
void *,
int);
155 u8, w1_slave_found_callback);
162 unsigned char name[W1_MAXNAMELEN];
164 int max_slave_count, slave_count;
165 unsigned long attempts;
183 struct mutex bus_mutex;
188 struct w1_bus_master *bus_master;
195 void w1_search(
struct w1_master *
dev,
u8 search_type, w1_slave_found_callback
cb);
200 w1_slave_found_callback
cb);
223 static inline struct w1_slave* dev_to_w1_slave(
struct device *
dev)
228 static inline struct w1_slave* kobj_to_w1_slave(
struct kobject *kobj)
233 static inline struct w1_master* dev_to_w1_master(
struct device *
dev)
243 extern struct mutex w1_mlock;