Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/w1-2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Linus Torvalds committed Sep 8, 2005
2 parents 7bbedd5 + 0a25e4d commit 6d8de3a
Show file tree
Hide file tree
Showing 21 changed files with 871 additions and 313 deletions.
16 changes: 16 additions & 0 deletions drivers/w1/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,20 @@ config W1_SMEM
Say Y here if you want to connect 1-wire
simple 64bit memory rom(ds2401/ds2411/ds1990*) to you wire.

config W1_DS2433
tristate "4kb EEPROM family support (DS2433)"
depends on W1
help
Say Y here if you want to use a 1-wire
4kb EEPROM family device (DS2433).

config W1_DS2433_CRC
bool "Protect DS2433 data with a CRC16"
depends on W1_DS2433
select CRC16
help
Say Y here to protect DS2433 data with a CRC16.
Each block has 30 bytes of data and a two byte CRC16.
Full block writes are only allowed if the CRC is valid.

endmenu
7 changes: 6 additions & 1 deletion drivers/w1/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@ ifneq ($(CONFIG_NET), y)
EXTRA_CFLAGS += -DNETLINK_DISABLED
endif

ifeq ($(CONFIG_W1_DS2433_CRC), y)
EXTRA_CFLAGS += -DCONFIG_W1_F23_CRC
endif

obj-$(CONFIG_W1) += wire.o
wire-objs := w1.o w1_int.o w1_family.o w1_netlink.o w1_io.o

obj-$(CONFIG_W1_MATROX) += matrox_w1.o
obj-$(CONFIG_W1_THERM) += w1_therm.o
obj-$(CONFIG_W1_SMEM) += w1_smem.o

obj-$(CONFIG_W1_DS9490) += ds9490r.o
obj-$(CONFIG_W1_DS9490) += ds9490r.o
ds9490r-objs := dscore.o

obj-$(CONFIG_W1_DS9490_BRIDGE) += ds_w1_bridge.o

obj-$(CONFIG_W1_DS2433) += w1_ds2433.o
24 changes: 12 additions & 12 deletions drivers/w1/ds_w1_bridge.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* ds_w1_bridge.c
* ds_w1_bridge.c
*
* Copyright (c) 2004 Evgeniy Polyakov <johnpol@2ka.mipt.ru>
*
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -25,7 +25,7 @@
#include "../w1/w1.h"
#include "../w1/w1_int.h"
#include "dscore.h"

static struct ds_device *ds_dev;
static struct w1_bus_master *ds_bus_master;

Expand Down Expand Up @@ -120,7 +120,7 @@ static u8 ds9490r_reset(unsigned long data)
static int __devinit ds_w1_init(void)
{
int err;

ds_bus_master = kmalloc(sizeof(*ds_bus_master), GFP_KERNEL);
if (!ds_bus_master) {
printk(KERN_ERR "Failed to allocate DS9490R USB<->W1 bus_master structure.\n");
Expand All @@ -136,14 +136,14 @@ static int __devinit ds_w1_init(void)

memset(ds_bus_master, 0, sizeof(*ds_bus_master));

ds_bus_master->data = (unsigned long)ds_dev;
ds_bus_master->touch_bit = &ds9490r_touch_bit;
ds_bus_master->read_bit = &ds9490r_read_bit;
ds_bus_master->write_bit = &ds9490r_write_bit;
ds_bus_master->read_byte = &ds9490r_read_byte;
ds_bus_master->write_byte = &ds9490r_write_byte;
ds_bus_master->read_block = &ds9490r_read_block;
ds_bus_master->write_block = &ds9490r_write_block;
ds_bus_master->data = (unsigned long)ds_dev;
ds_bus_master->touch_bit = &ds9490r_touch_bit;
ds_bus_master->read_bit = &ds9490r_read_bit;
ds_bus_master->write_bit = &ds9490r_write_bit;
ds_bus_master->read_byte = &ds9490r_read_byte;
ds_bus_master->write_byte = &ds9490r_write_byte;
ds_bus_master->read_block = &ds9490r_read_block;
ds_bus_master->write_block = &ds9490r_write_block;
ds_bus_master->reset_bus = &ds9490r_reset;

err = w1_add_master_device(ds_bus_master);
Expand Down
Loading

0 comments on commit 6d8de3a

Please sign in to comment.