1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Chapter 1. W1 API internal to the kernel</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="W1: Dallas' 1-wire bus"><link rel="up" href="index.html" title="W1: Dallas' 1-wire bus"><link rel="prev" href="index.html" title="W1: Dallas' 1-wire bus"><link rel="next" href="API-struct-w1-reg-num.html" title="struct w1_reg_num"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 1. W1 API internal to the kernel</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="API-struct-w1-reg-num.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="w1_internal"></a>Chapter 1. W1 API internal to the kernel</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="sect1"><a href="w1_internal.html#w1_internal_api">W1 API internal to the kernel</a></span></dt><dd><dl><dt><span class="sect2"><a href="w1_internal.html#w1.h">drivers/w1/w1.h</a></span></dt><dt><span class="sect2"><a href="w1_internal.html#w1.c">drivers/w1/w1.c</a></span></dt><dt><span class="sect2"><a href="w1_internal.html#w1_family.h">drivers/w1/w1_family.h</a></span></dt><dt><span class="sect2"><a href="w1_internal.html#w1_family.c">drivers/w1/w1_family.c</a></span></dt><dt><span class="sect2"><a href="w1_internal.html#w1_int.c">drivers/w1/w1_int.c</a></span></dt><dt><span class="sect2"><a href="w1_internal.html#w1_netlink.h">drivers/w1/w1_netlink.h</a></span></dt><dt><span class="sect2"><a href="w1_internal.html#w1_io.c">drivers/w1/w1_io.c</a></span></dt></dl></dd></dl></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="w1_internal_api"></a>W1 API internal to the kernel</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="w1_internal.html#w1.h">drivers/w1/w1.h</a></span></dt><dt><span class="sect2"><a href="w1_internal.html#w1.c">drivers/w1/w1.c</a></span></dt><dt><span class="sect2"><a href="w1_internal.html#w1_family.h">drivers/w1/w1_family.h</a></span></dt><dt><span class="sect2"><a href="w1_internal.html#w1_family.c">drivers/w1/w1_family.c</a></span></dt><dt><span class="sect2"><a href="w1_internal.html#w1_int.c">drivers/w1/w1_int.c</a></span></dt><dt><span class="sect2"><a href="w1_internal.html#w1_netlink.h">drivers/w1/w1_netlink.h</a></span></dt><dt><span class="sect2"><a href="w1_internal.html#w1_io.c">drivers/w1/w1_io.c</a></span></dt></dl></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="w1.h"></a>drivers/w1/w1.h</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-struct-w1-reg-num.html"><span class="phrase">struct w1_reg_num</span></a></span><span class="refpurpose"> — 2 broken out slave device id 3 </span></dt><dt><span class="refentrytitle"><a href="API-struct-w1-slave.html"><span class="phrase">struct w1_slave</span></a></span><span class="refpurpose"> — 4 holds a single slave device on the bus 5 </span></dt><dt><span class="refentrytitle"><a href="API-struct-w1-bus-master.html"><span class="phrase">struct w1_bus_master</span></a></span><span class="refpurpose"> — 6 operations available on a bus master 7 </span></dt><dt><span class="refentrytitle"><a href="API-enum-w1-master-flags.html"><span class="phrase">enum w1_master_flags</span></a></span><span class="refpurpose"> — 8 bitfields used in w1_master.flags 9 </span></dt><dt><span class="refentrytitle"><a href="API-struct-w1-master.html"><span class="phrase">struct w1_master</span></a></span><span class="refpurpose"> — 10 one per bus master 11 </span></dt><dt><span class="refentrytitle"><a href="API-struct-w1-async-cmd.html"><span class="phrase">struct w1_async_cmd</span></a></span><span class="refpurpose"> — 12 execute callback from the w1_process kthread 13 </span></dt></dl></div><p>W1 core functions.</p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="w1.c"></a>drivers/w1/w1.c</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-w1-search.html"><span class="phrase">w1_search</span></a></span><span class="refpurpose"> — 14 Performs a ROM Search & registers any devices found. 15 </span></dt><dt><span class="refentrytitle"><a href="API-w1-process-callbacks.html"><span class="phrase">w1_process_callbacks</span></a></span><span class="refpurpose"> — 16 execute each dev->async_list callback entry 17 </span></dt></dl></div><p>W1 core functions.</p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="w1_family.h"></a>drivers/w1/w1_family.h</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-struct-w1-family-ops.html"><span class="phrase">struct w1_family_ops</span></a></span><span class="refpurpose"> — 18 operations for a family type 19 </span></dt><dt><span class="refentrytitle"><a href="API-struct-w1-family.html"><span class="phrase">struct w1_family</span></a></span><span class="refpurpose"> — 20 reference counted family structure. 21 </span></dt></dl></div><p>Allows registering device family operations.</p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="w1_family.c"></a>drivers/w1/w1_family.c</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-w1-register-family.html"><span class="phrase">w1_register_family</span></a></span><span class="refpurpose"> — 22 register a device family driver 23 </span></dt><dt><span class="refentrytitle"><a href="API-w1-unregister-family.html"><span class="phrase">w1_unregister_family</span></a></span><span class="refpurpose"> — 24 unregister a device family driver 25 </span></dt></dl></div><p>Allows registering device family operations.</p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="w1_int.c"></a>drivers/w1/w1_int.c</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-w1-add-master-device.html"><span class="phrase">w1_add_master_device</span></a></span><span class="refpurpose"> — 26 registers a new master device 27 </span></dt><dt><span class="refentrytitle"><a href="API-w1-remove-master-device.html"><span class="phrase">w1_remove_master_device</span></a></span><span class="refpurpose"> — 28 unregister a master device 29 </span></dt></dl></div><p>W1 internal initialization for master devices.</p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="w1_netlink.h"></a>drivers/w1/w1_netlink.h</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-enum-w1-cn-msg-flags.html"><span class="phrase">enum w1_cn_msg_flags</span></a></span><span class="refpurpose"> — 30 bitfield flags for struct cn_msg.flags 31 </span></dt><dt><span class="refentrytitle"><a href="API-enum-w1-netlink-message-types.html"><span class="phrase">enum w1_netlink_message_types</span></a></span><span class="refpurpose"> — 32 message type 33 </span></dt><dt><span class="refentrytitle"><a href="API-struct-w1-netlink-msg.html"><span class="phrase">struct w1_netlink_msg</span></a></span><span class="refpurpose"> — 34 holds w1 message type, id, and result 35 </span></dt><dt><span class="refentrytitle"><a href="API-enum-w1-commands.html"><span class="phrase">enum w1_commands</span></a></span><span class="refpurpose"> — 36 commands available for master or slave operations 37 </span></dt><dt><span class="refentrytitle"><a href="API-struct-w1-netlink-cmd.html"><span class="phrase">struct w1_netlink_cmd</span></a></span><span class="refpurpose"> — 38 holds the command and data 39 </span></dt></dl></div><p>W1 external netlink API structures and commands.</p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="w1_io.c"></a>drivers/w1/w1_io.c</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-w1-write-8.html"><span class="phrase">w1_write_8</span></a></span><span class="refpurpose"> — 40 Writes 8 bits. 41 </span></dt><dt><span class="refentrytitle"><a href="API-w1-read-8.html"><span class="phrase">w1_read_8</span></a></span><span class="refpurpose"> — 42 Reads 8 bits. 43 </span></dt><dt><span class="refentrytitle"><a href="API-w1-write-block.html"><span class="phrase">w1_write_block</span></a></span><span class="refpurpose"> — 44 Writes a series of bytes. 45 </span></dt><dt><span class="refentrytitle"><a href="API-w1-touch-block.html"><span class="phrase">w1_touch_block</span></a></span><span class="refpurpose"> — 46 Touches a series of bytes. 47 </span></dt><dt><span class="refentrytitle"><a href="API-w1-read-block.html"><span class="phrase">w1_read_block</span></a></span><span class="refpurpose"> — 48 Reads a series of bytes. 49 </span></dt><dt><span class="refentrytitle"><a href="API-w1-reset-bus.html"><span class="phrase">w1_reset_bus</span></a></span><span class="refpurpose"> — 50 Issues a reset bus sequence. 51 </span></dt><dt><span class="refentrytitle"><a href="API-w1-reset-select-slave.html"><span class="phrase">w1_reset_select_slave</span></a></span><span class="refpurpose"> — 52 reset and select a slave 53 </span></dt><dt><span class="refentrytitle"><a href="API-w1-reset-resume-command.html"><span class="phrase">w1_reset_resume_command</span></a></span><span class="refpurpose"> — 54 resume instead of another match ROM 55 </span></dt><dt><span class="refentrytitle"><a href="API-w1-next-pullup.html"><span class="phrase">w1_next_pullup</span></a></span><span class="refpurpose"> — 56 register for a strong pullup 57 </span></dt><dt><span class="refentrytitle"><a href="API-w1-touch-bit.html"><span class="phrase">w1_touch_bit</span></a></span><span class="refpurpose"> — 58 Generates a write-0 or write-1 cycle and samples the level. 59 </span></dt><dt><span class="refentrytitle"><a href="API-w1-write-bit.html"><span class="phrase">w1_write_bit</span></a></span><span class="refpurpose"> — 60 Generates a write-0 or write-1 cycle. 61 </span></dt><dt><span class="refentrytitle"><a href="API-w1-pre-write.html"><span class="phrase">w1_pre_write</span></a></span><span class="refpurpose"> — 62 pre-write operations 63 </span></dt><dt><span class="refentrytitle"><a href="API-w1-post-write.html"><span class="phrase">w1_post_write</span></a></span><span class="refpurpose"> — 64 post-write options 65 </span></dt><dt><span class="refentrytitle"><a href="API-w1-read-bit.html"><span class="phrase">w1_read_bit</span></a></span><span class="refpurpose"> — 66 Generates a write-1 cycle and samples the level. 67 </span></dt><dt><span class="refentrytitle"><a href="API-w1-triplet.html"><span class="phrase">w1_triplet</span></a></span><span class="refpurpose"> — 68 * Does a triplet - used for searching ROM addresses. 69 </span></dt></dl></div><p>W1 input/output.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="API-struct-w1-reg-num.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">W1: Dallas' 1-wire bus </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">struct w1_reg_num</span></td></tr></table></div></body></html> 70