forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PATCH] W1: Move w1 bus master code into 'w1/masters' and move w1 sla…
…ve code into 'w1/slaves' Signed-off-by: Ben Gardner <[email protected]> Signed-off-by: Evgeniy Polyakov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information
Showing
13 changed files
with
126 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# | ||
# 1-wire bus master configuration | ||
# | ||
|
||
menu "1-wire Bus Masters" | ||
depends on W1 | ||
|
||
config W1_MASTER_MATROX | ||
tristate "Matrox G400 transport layer for 1-wire" | ||
depends on W1 && PCI | ||
help | ||
Say Y here if you want to communicate with your 1-wire devices | ||
using Matrox's G400 GPIO pins. | ||
|
||
This support is also available as a module. If so, the module | ||
will be called matrox_w1.ko. | ||
|
||
config W1_MASTER_DS9490 | ||
tristate "DS9490R transport layer driver" | ||
depends on W1 && USB | ||
help | ||
Say Y here if you want to have a driver for DS9490R UWB <-> W1 bridge. | ||
|
||
This support is also available as a module. If so, the module | ||
will be called ds9490r.ko. | ||
|
||
config W1_MASTER_DS9490_BRIDGE | ||
tristate "DS9490R USB <-> W1 transport layer for 1-wire" | ||
depends on W1_DS9490 | ||
help | ||
Say Y here if you want to communicate with your 1-wire devices | ||
using DS9490R USB bridge. | ||
|
||
This support is also available as a module. If so, the module | ||
will be called ds_w1_bridge.ko. | ||
|
||
endmenu | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# | ||
# Makefile for 1-wire bus master drivers. | ||
# | ||
|
||
obj-$(CONFIG_W1_MASTER_MATROX) += matrox_w1.o | ||
|
||
obj-$(CONFIG_W1_MASTER_DS9490) += ds9490r.o | ||
ds9490r-objs := dscore.o | ||
|
||
obj-$(CONFIG_W1_MASTER_DS9490_BRIDGE) += ds_w1_bridge.o | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,8 +19,8 @@ | |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
*/ | ||
|
||
#include <asm/atomic.h> | ||
#include <asm/types.h> | ||
#include <asm/atomic.h> | ||
#include <asm/io.h> | ||
|
||
#include <linux/delay.h> | ||
|
@@ -35,9 +35,9 @@ | |
#include <linux/pci.h> | ||
#include <linux/timer.h> | ||
|
||
#include "w1.h" | ||
#include "w1_int.h" | ||
#include "w1_log.h" | ||
#include "../w1.h" | ||
#include "../w1_int.h" | ||
#include "../w1_log.h" | ||
|
||
MODULE_LICENSE("GPL"); | ||
MODULE_AUTHOR("Evgeniy Polyakov <[email protected]>"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# | ||
# 1-wire slaves configuration | ||
# | ||
|
||
menu "1-wire Slaves" | ||
depends on W1 | ||
|
||
config W1_SLAVE_THERM | ||
tristate "Thermal family implementation" | ||
depends on W1 | ||
help | ||
Say Y here if you want to connect 1-wire thermal sensors to you | ||
wire. | ||
|
||
config W1_SLAVE_SMEM | ||
tristate "Simple 64bit memory family implementation" | ||
depends on W1 | ||
help | ||
Say Y here if you want to connect 1-wire | ||
simple 64bit memory rom(ds2401/ds2411/ds1990*) to you wire. | ||
|
||
config W1_SLAVE_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_SLAVE_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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# | ||
# Makefile for the Dallas's 1-wire slaves. | ||
# | ||
|
||
ifeq ($(CONFIG_W1_SLAVE_DS2433_CRC), y) | ||
EXTRA_CFLAGS += -DCONFIG_W1_F23_CRC | ||
endif | ||
|
||
obj-$(CONFIG_W1_SLAVE_THERM) += w1_therm.o | ||
obj-$(CONFIG_W1_SLAVE_SMEM) += w1_smem.o | ||
obj-$(CONFIG_W1_SLAVE_DS2433) += w1_ds2433.o | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,10 +21,10 @@ | |
|
||
#endif | ||
|
||
#include "w1.h" | ||
#include "w1_io.h" | ||
#include "w1_int.h" | ||
#include "w1_family.h" | ||
#include "../w1.h" | ||
#include "../w1_io.h" | ||
#include "../w1_int.h" | ||
#include "../w1_family.h" | ||
|
||
MODULE_LICENSE("GPL"); | ||
MODULE_AUTHOR("Ben Gardner <[email protected]>"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,10 +27,10 @@ | |
#include <linux/device.h> | ||
#include <linux/types.h> | ||
|
||
#include "w1.h" | ||
#include "w1_io.h" | ||
#include "w1_int.h" | ||
#include "w1_family.h" | ||
#include "../w1.h" | ||
#include "../w1_io.h" | ||
#include "../w1_int.h" | ||
#include "../w1_family.h" | ||
|
||
MODULE_LICENSE("GPL"); | ||
MODULE_AUTHOR("Evgeniy Polyakov <[email protected]>"); | ||
|
@@ -51,7 +51,7 @@ static int __init w1_smem_init(void) | |
err = w1_register_family(&w1_smem_family_01); | ||
if (err) | ||
return err; | ||
|
||
err = w1_register_family(&w1_smem_family_81); | ||
if (err) { | ||
w1_unregister_family(&w1_smem_family_01); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,10 +28,10 @@ | |
#include <linux/types.h> | ||
#include <linux/delay.h> | ||
|
||
#include "w1.h" | ||
#include "w1_io.h" | ||
#include "w1_int.h" | ||
#include "w1_family.h" | ||
#include "../w1.h" | ||
#include "../w1_io.h" | ||
#include "../w1_int.h" | ||
#include "../w1_family.h" | ||
|
||
MODULE_LICENSE("GPL"); | ||
MODULE_AUTHOR("Evgeniy Polyakov <[email protected]>"); | ||
|
@@ -123,12 +123,12 @@ static inline int w1_DS18S20_convert_temp(u8 rom[9]) | |
|
||
if (!rom[7]) | ||
return 0; | ||
|
||
if (rom[1] == 0) | ||
t = ((s32)rom[0] >> 1)*1000; | ||
else | ||
t = 1000*(-1*(s32)(0x100-rom[0]) >> 1); | ||
|
||
t -= 250; | ||
h = 1000*((s32)rom[7] - (s32)rom[6]); | ||
h /= (s32)rom[7]; | ||
|
@@ -231,7 +231,7 @@ static ssize_t w1_therm_read_bin(struct kobject *kobj, char *buf, loff_t off, si | |
|
||
for (i = 0; i < 9; ++i) | ||
count += sprintf(buf + count, "%02x ", sl->rom[i]); | ||
|
||
count += sprintf(buf + count, "t=%d\n", w1_convert_temp(rom, sl->family->fid)); | ||
out: | ||
up(&dev->mutex); | ||
|