Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
ds2490.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/mod_devicetable.h>
#include <linux/usb.h>
#include <linux/slab.h>
#include "../w1_int.h"
#include "../w1.h"

Go to the source code of this file.

Data Structures

struct  ds_device
 
struct  ds_status
 

Macros

#define CONTROL_CMD   0x00
 
#define COMM_CMD   0x01
 
#define MODE_CMD   0x02
 
#define CTL_RESET_DEVICE   0x0000
 
#define CTL_START_EXE   0x0001
 
#define CTL_RESUME_EXE   0x0002
 
#define CTL_HALT_EXE_IDLE   0x0003
 
#define CTL_HALT_EXE_DONE   0x0004
 
#define CTL_FLUSH_COMM_CMDS   0x0007
 
#define CTL_FLUSH_RCV_BUFFER   0x0008
 
#define CTL_FLUSH_XMT_BUFFER   0x0009
 
#define CTL_GET_COMM_CMDS   0x000A
 
#define MOD_PULSE_EN   0x0000
 
#define MOD_SPEED_CHANGE_EN   0x0001
 
#define MOD_1WIRE_SPEED   0x0002
 
#define MOD_STRONG_PU_DURATION   0x0003
 
#define MOD_PULLDOWN_SLEWRATE   0x0004
 
#define MOD_PROG_PULSE_DURATION   0x0005
 
#define MOD_WRITE1_LOWTIME   0x0006
 
#define MOD_DSOW0_TREC   0x0007
 
#define COMM_ERROR_ESCAPE   0x0601
 
#define COMM_SET_DURATION   0x0012
 
#define COMM_BIT_IO   0x0020
 
#define COMM_PULSE   0x0030
 
#define COMM_1_WIRE_RESET   0x0042
 
#define COMM_BYTE_IO   0x0052
 
#define COMM_MATCH_ACCESS   0x0064
 
#define COMM_BLOCK_IO   0x0074
 
#define COMM_READ_STRAIGHT   0x0080
 
#define COMM_DO_RELEASE   0x6092
 
#define COMM_SET_PATH   0x00A2
 
#define COMM_WRITE_SRAM_PAGE   0x00B2
 
#define COMM_WRITE_EPROM   0x00C4
 
#define COMM_READ_CRC_PROT_PAGE   0x00D4
 
#define COMM_READ_REDIRECT_PAGE_CRC   0x21E4
 
#define COMM_SEARCH_ACCESS   0x00F4
 
#define COMM_TYPE   0x0008
 
#define COMM_SE   0x0008
 
#define COMM_D   0x0008
 
#define COMM_Z   0x0008
 
#define COMM_CH   0x0008
 
#define COMM_SM   0x0008
 
#define COMM_R   0x0008
 
#define COMM_IM   0x0001
 
#define COMM_PS   0x4000
 
#define COMM_PST   0x4000
 
#define COMM_CIB   0x4000
 
#define COMM_RTS   0x4000
 
#define COMM_DT   0x2000
 
#define COMM_SPU   0x1000
 
#define COMM_F   0x0800
 
#define COMM_NTF   0x0400
 
#define COMM_ICP   0x0200
 
#define COMM_RST   0x0100
 
#define PULSE_PROG   0x01
 
#define PULSE_SPUE   0x02
 
#define BRANCH_MAIN   0xCC
 
#define BRANCH_AUX   0x33
 
#define ST_SPUA   0x01 /* Strong Pull-up is active */
 
#define ST_PRGA   0x02 /* 12V programming pulse is being generated */
 
#define ST_12VP   0x04 /* external 12V programming voltage is present */
 
#define ST_PMOD   0x08 /* DS2490 powered from USB and external sources */
 
#define ST_HALT   0x10 /* DS2490 is currently halted */
 
#define ST_IDLE   0x20 /* DS2490 is currently idle */
 
#define ST_EPOF   0x80
 
#define RR_DETECT   0xA5 /* New device detected */
 
#define RR_NRS   0x01 /* Reset no presence or ... */
 
#define RR_SH   0x02 /* short on reset or set path */
 
#define RR_APP   0x04 /* alarming presence on reset */
 
#define RR_VPP   0x08 /* 12V expected not seen */
 
#define RR_CMP   0x10 /* compare error */
 
#define RR_CRC   0x20 /* CRC error detected */
 
#define RR_RDP   0x40 /* redirected page */
 
#define RR_EOS   0x80 /* end of search error */
 
#define SPEED_NORMAL   0x00
 
#define SPEED_FLEXIBLE   0x01
 
#define SPEED_OVERDRIVE   0x02
 
#define NUM_EP   4
 
#define EP_CONTROL   0
 
#define EP_STATUS   1
 
#define EP_DATA_OUT   2
 
#define EP_DATA_IN   3
 

Functions

 MODULE_DEVICE_TABLE (usb, ds_id_table)
 
 module_usb_driver (ds_driver)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Evgeniy Polyakov <[email protected]>")
 
 MODULE_DESCRIPTION ("DS2490 USB <-> W1 bus master driver (DS9490*)")
 

Macro Definition Documentation

#define BRANCH_AUX   0x33

Definition at line 100 of file ds2490.c.

#define BRANCH_MAIN   0xCC

Definition at line 99 of file ds2490.c.

#define COMM_1_WIRE_RESET   0x0042

Definition at line 62 of file ds2490.c.

#define COMM_BIT_IO   0x0020

Definition at line 60 of file ds2490.c.

#define COMM_BLOCK_IO   0x0074

Definition at line 65 of file ds2490.c.

#define COMM_BYTE_IO   0x0052

Definition at line 63 of file ds2490.c.

#define COMM_CH   0x0008

Definition at line 80 of file ds2490.c.

#define COMM_CIB   0x4000

Definition at line 87 of file ds2490.c.

#define COMM_CMD   0x01

Definition at line 33 of file ds2490.c.

#define COMM_D   0x0008

Definition at line 78 of file ds2490.c.

#define COMM_DO_RELEASE   0x6092

Definition at line 67 of file ds2490.c.

#define COMM_DT   0x2000

Definition at line 89 of file ds2490.c.

#define COMM_ERROR_ESCAPE   0x0601

Definition at line 58 of file ds2490.c.

#define COMM_F   0x0800

Definition at line 91 of file ds2490.c.

#define COMM_ICP   0x0200

Definition at line 93 of file ds2490.c.

#define COMM_IM   0x0001

Definition at line 83 of file ds2490.c.

#define COMM_MATCH_ACCESS   0x0064

Definition at line 64 of file ds2490.c.

#define COMM_NTF   0x0400

Definition at line 92 of file ds2490.c.

#define COMM_PS   0x4000

Definition at line 85 of file ds2490.c.

#define COMM_PST   0x4000

Definition at line 86 of file ds2490.c.

#define COMM_PULSE   0x0030

Definition at line 61 of file ds2490.c.

#define COMM_R   0x0008

Definition at line 82 of file ds2490.c.

#define COMM_READ_CRC_PROT_PAGE   0x00D4

Definition at line 71 of file ds2490.c.

#define COMM_READ_REDIRECT_PAGE_CRC   0x21E4

Definition at line 72 of file ds2490.c.

#define COMM_READ_STRAIGHT   0x0080

Definition at line 66 of file ds2490.c.

#define COMM_RST   0x0100

Definition at line 94 of file ds2490.c.

#define COMM_RTS   0x4000

Definition at line 88 of file ds2490.c.

#define COMM_SE   0x0008

Definition at line 77 of file ds2490.c.

#define COMM_SEARCH_ACCESS   0x00F4

Definition at line 73 of file ds2490.c.

#define COMM_SET_DURATION   0x0012

Definition at line 59 of file ds2490.c.

#define COMM_SET_PATH   0x00A2

Definition at line 68 of file ds2490.c.

#define COMM_SM   0x0008

Definition at line 81 of file ds2490.c.

#define COMM_SPU   0x1000

Definition at line 90 of file ds2490.c.

#define COMM_TYPE   0x0008

Definition at line 76 of file ds2490.c.

#define COMM_WRITE_EPROM   0x00C4

Definition at line 70 of file ds2490.c.

#define COMM_WRITE_SRAM_PAGE   0x00B2

Definition at line 69 of file ds2490.c.

#define COMM_Z   0x0008

Definition at line 79 of file ds2490.c.

#define CONTROL_CMD   0x00

Definition at line 32 of file ds2490.c.

#define CTL_FLUSH_COMM_CMDS   0x0007

Definition at line 42 of file ds2490.c.

#define CTL_FLUSH_RCV_BUFFER   0x0008

Definition at line 43 of file ds2490.c.

#define CTL_FLUSH_XMT_BUFFER   0x0009

Definition at line 44 of file ds2490.c.

#define CTL_GET_COMM_CMDS   0x000A

Definition at line 45 of file ds2490.c.

#define CTL_HALT_EXE_DONE   0x0004

Definition at line 41 of file ds2490.c.

#define CTL_HALT_EXE_IDLE   0x0003

Definition at line 40 of file ds2490.c.

#define CTL_RESET_DEVICE   0x0000

Definition at line 37 of file ds2490.c.

#define CTL_RESUME_EXE   0x0002

Definition at line 39 of file ds2490.c.

#define CTL_START_EXE   0x0001

Definition at line 38 of file ds2490.c.

#define EP_CONTROL   0

Definition at line 127 of file ds2490.c.

#define EP_DATA_IN   3

Definition at line 130 of file ds2490.c.

#define EP_DATA_OUT   2

Definition at line 129 of file ds2490.c.

#define EP_STATUS   1

Definition at line 128 of file ds2490.c.

#define MOD_1WIRE_SPEED   0x0002

Definition at line 50 of file ds2490.c.

#define MOD_DSOW0_TREC   0x0007

Definition at line 55 of file ds2490.c.

#define MOD_PROG_PULSE_DURATION   0x0005

Definition at line 53 of file ds2490.c.

#define MOD_PULLDOWN_SLEWRATE   0x0004

Definition at line 52 of file ds2490.c.

#define MOD_PULSE_EN   0x0000

Definition at line 48 of file ds2490.c.

#define MOD_SPEED_CHANGE_EN   0x0001

Definition at line 49 of file ds2490.c.

#define MOD_STRONG_PU_DURATION   0x0003

Definition at line 51 of file ds2490.c.

#define MOD_WRITE1_LOWTIME   0x0006

Definition at line 54 of file ds2490.c.

#define MODE_CMD   0x02

Definition at line 34 of file ds2490.c.

#define NUM_EP   4

Definition at line 126 of file ds2490.c.

#define PULSE_PROG   0x01

Definition at line 96 of file ds2490.c.

#define PULSE_SPUE   0x02

Definition at line 97 of file ds2490.c.

#define RR_APP   0x04 /* alarming presence on reset */

Definition at line 115 of file ds2490.c.

#define RR_CMP   0x10 /* compare error */

Definition at line 117 of file ds2490.c.

#define RR_CRC   0x20 /* CRC error detected */

Definition at line 118 of file ds2490.c.

#define RR_DETECT   0xA5 /* New device detected */

Definition at line 112 of file ds2490.c.

#define RR_EOS   0x80 /* end of search error */

Definition at line 120 of file ds2490.c.

#define RR_NRS   0x01 /* Reset no presence or ... */

Definition at line 113 of file ds2490.c.

#define RR_RDP   0x40 /* redirected page */

Definition at line 119 of file ds2490.c.

#define RR_SH   0x02 /* short on reset or set path */

Definition at line 114 of file ds2490.c.

#define RR_VPP   0x08 /* 12V expected not seen */

Definition at line 116 of file ds2490.c.

#define SPEED_FLEXIBLE   0x01

Definition at line 123 of file ds2490.c.

#define SPEED_NORMAL   0x00

Definition at line 122 of file ds2490.c.

#define SPEED_OVERDRIVE   0x02

Definition at line 124 of file ds2490.c.

#define ST_12VP   0x04 /* external 12V programming voltage is present */

Definition at line 105 of file ds2490.c.

#define ST_EPOF   0x80

Definition at line 109 of file ds2490.c.

#define ST_HALT   0x10 /* DS2490 is currently halted */

Definition at line 107 of file ds2490.c.

#define ST_IDLE   0x20 /* DS2490 is currently idle */

Definition at line 108 of file ds2490.c.

#define ST_PMOD   0x08 /* DS2490 powered from USB and external sources */

Definition at line 106 of file ds2490.c.

#define ST_PRGA   0x02 /* 12V programming pulse is being generated */

Definition at line 104 of file ds2490.c.

#define ST_SPUA   0x01 /* Strong Pull-up is active */

Definition at line 103 of file ds2490.c.

Function Documentation

MODULE_AUTHOR ( "Evgeniy Polyakov <[email protected]>"  )
MODULE_DESCRIPTION ( "DS2490 USB <-> W1 bus master driver (DS9490*)"  )
MODULE_DEVICE_TABLE ( usb  ,
ds_id_table   
)
MODULE_LICENSE ( "GPL"  )
module_usb_driver ( ds_driver  )