00001
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef AXIS_W1_H
00033 #define AXIS_W1_H
00034 #ifndef _LINUX_KERNEL_H
00035
00036 #include <linux/kernel.h>
00037 #include <linux/sched.h>
00038 #include <linux/version.h>
00039 #include <linux/module.h>
00040 #include <linux/proc_fs.h>
00041 #include <linux/delay.h>
00042 #include <linux/pci.h>
00043 #include <linux/list.h>
00044 #include <linux/ioport.h>
00045 #include <linux/serial.h>
00046 #include <linux/interrupt.h>
00047 #include <linux/string.h>
00048 #include <linux/spinlock.h>
00049 #include <linux/crypto.h>
00050 #include <asm/uaccess.h>
00051
00052 #endif //_LINUX_KERNEL_H
00053
00054
00055 #ifndef AXIS_HARDWARE_H
00056 #include "axis_hardware.h"
00057 #endif //AXIS_HARDWARE_H
00058 #define _SOCK_H //bodge to remove warnings caused by signed /unsigned mismatch in socket code not sure why w1.h
00059 #include "linux/../../drivers/w1/w1.h"
00060
00061 #define IBUTTON_RX_BIT (1<<31)
00062 #define IBUTTON_TX_BIT (1<<30)
00063 #define SERIAL_NUMBER_RX_BIT (1<<29)
00064 #define SERIAL_NUMBER_TX_BIT (1<<28)
00065
00066 #define AXIS_SERIAL_NUMBER_OFFSET (0x14+CONTROL_OFFSET)
00067 #define AXIS_IBUTTONOFFSET (0x14+CONTROL_OFFSET)
00068
00069 struct axis_w1
00070 {
00071 unsigned long tx_mask ;
00072 unsigned long rx_mask ;
00073 unsigned long register_offset ;
00074 struct axis_pci_device_entry* device ;
00075 struct w1_bus_master *bus_master;
00076 struct w1_bus_master master ;
00077 } ;
00078
00079
00080 int build_w1_config(struct axis_pci_device_entry * device);
00081 void delete_w1_config(struct axis_pci_device_entry * device);
00082
00083
00084
00085 void create_serial_number_entries(struct axis_pci_device_entry* device);
00086 void delete_serial_number_entries(struct axis_pci_device_entry* device);
00087
00088 #endif //AXIS_W1_H
00089