summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2012-04-26 10:10:22 +0000
committerJean Delvare <jdelvare@suse.de>2012-04-26 10:10:22 +0000
commit93caf007f4cbd3dcd0267e4cb8a699288e17d907 (patch)
tree44f8ed60748dc8f37fdd69f10547965cedfcc70f /tools
parent65261912197415b4205f6e6df0f20b22588fb40a (diff)
downloadi2c-tools-git-93caf007f4cbd3dcd0267e4cb8a699288e17d907.tar.gz
i2c-dev: Move SMBus helper functions to include/i2c/smbus.h
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@6048 7894878c-1315-0410-8ee3-d5d059ff63e0
Diffstat (limited to 'tools')
-rw-r--r--tools/Module.mk12
-rw-r--r--tools/i2cbusses.c4
-rw-r--r--tools/i2cdetect.c5
-rw-r--r--tools/i2cdump.c5
-rw-r--r--tools/i2cget.c5
-rw-r--r--tools/i2cset.c5
6 files changed, 25 insertions, 11 deletions
diff --git a/tools/Module.mk b/tools/Module.mk
index 0f9f6fa..33ae774 100644
--- a/tools/Module.mk
+++ b/tools/Module.mk
@@ -1,6 +1,6 @@
# I2C tools for Linux
#
-# Copyright (C) 2007 Jean Delvare <khali@linux-fr.org>
+# Copyright (C) 2007, 2012 Jean Delvare <khali@linux-fr.org>
#
# 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
@@ -35,19 +35,19 @@ $(TOOLS_DIR)/i2cget: $(TOOLS_DIR)/i2cget.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)
# Objects
#
-$(TOOLS_DIR)/i2cdetect.o: $(TOOLS_DIR)/i2cdetect.c $(TOOLS_DIR)/i2cbusses.h $(INCLUDE_DIR)/linux/i2c-dev.h
+$(TOOLS_DIR)/i2cdetect.o: $(TOOLS_DIR)/i2cdetect.c $(TOOLS_DIR)/i2cbusses.h $(INCLUDE_DIR)/i2c/smbus.h
$(CC) $(CFLAGS) $(TOOLS_CFLAGS) -c $< -o $@
-$(TOOLS_DIR)/i2cdump.o: $(TOOLS_DIR)/i2cdump.c $(TOOLS_DIR)/i2cbusses.h $(TOOLS_DIR)/util.h $(INCLUDE_DIR)/linux/i2c-dev.h
+$(TOOLS_DIR)/i2cdump.o: $(TOOLS_DIR)/i2cdump.c $(TOOLS_DIR)/i2cbusses.h $(TOOLS_DIR)/util.h $(INCLUDE_DIR)/i2c/smbus.h
$(CC) $(CFLAGS) $(TOOLS_CFLAGS) -c $< -o $@
-$(TOOLS_DIR)/i2cset.o: $(TOOLS_DIR)/i2cset.c $(TOOLS_DIR)/i2cbusses.h $(TOOLS_DIR)/util.h $(INCLUDE_DIR)/linux/i2c-dev.h
+$(TOOLS_DIR)/i2cset.o: $(TOOLS_DIR)/i2cset.c $(TOOLS_DIR)/i2cbusses.h $(TOOLS_DIR)/util.h $(INCLUDE_DIR)/i2c/smbus.h
$(CC) $(CFLAGS) $(TOOLS_CFLAGS) -c $< -o $@
-$(TOOLS_DIR)/i2cget.o: $(TOOLS_DIR)/i2cget.c $(TOOLS_DIR)/i2cbusses.h $(TOOLS_DIR)/util.h $(INCLUDE_DIR)/linux/i2c-dev.h
+$(TOOLS_DIR)/i2cget.o: $(TOOLS_DIR)/i2cget.c $(TOOLS_DIR)/i2cbusses.h $(TOOLS_DIR)/util.h $(INCLUDE_DIR)/i2c/smbus.h
$(CC) $(CFLAGS) $(TOOLS_CFLAGS) -c $< -o $@
-$(TOOLS_DIR)/i2cbusses.o: $(TOOLS_DIR)/i2cbusses.c $(TOOLS_DIR)/i2cbusses.h $(INCLUDE_DIR)/linux/i2c-dev.h
+$(TOOLS_DIR)/i2cbusses.o: $(TOOLS_DIR)/i2cbusses.c $(TOOLS_DIR)/i2cbusses.h
$(CC) $(CFLAGS) $(TOOLS_CFLAGS) -c $< -o $@
$(TOOLS_DIR)/util.o: $(TOOLS_DIR)/util.c $(TOOLS_DIR)/util.h
diff --git a/tools/i2cbusses.c b/tools/i2cbusses.c
index e36ee2d..ed60670 100644
--- a/tools/i2cbusses.c
+++ b/tools/i2cbusses.c
@@ -4,7 +4,7 @@
devices.
Copyright (c) 1999-2003 Frodo Looijaard <frodol@dds.nl> and
Mark D. Studebaker <mdsxyz123@yahoo.com>
- Copyright (C) 2008-2010 Jean Delvare <khali@linux-fr.org>
+ Copyright (C) 2008-2012 Jean Delvare <khali@linux-fr.org>
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
@@ -28,6 +28,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/param.h> /* for NAME_MAX */
+#include <sys/ioctl.h>
#include <string.h>
#include <strings.h> /* for strcasecmp() */
#include <stdio.h>
@@ -38,6 +39,7 @@
#include <fcntl.h>
#include <errno.h>
#include "i2cbusses.h"
+#include <linux/i2c.h>
#include <linux/i2c-dev.h>
enum adt { adt_dummy, adt_isa, adt_i2c, adt_smbus, adt_unknown };
diff --git a/tools/i2cdetect.c b/tools/i2cdetect.c
index fc90869..73f2ba3 100644
--- a/tools/i2cdetect.c
+++ b/tools/i2cdetect.c
@@ -2,7 +2,7 @@
i2cdetect.c - a user-space program to scan for I2C devices
Copyright (C) 1999-2004 Frodo Looijaard <frodol@dds.nl>, and
Mark D. Studebaker <mdsxyz123@yahoo.com>
- Copyright (C) 2004-2010 Jean Delvare <khali@linux-fr.org>
+ Copyright (C) 2004-2012 Jean Delvare <khali@linux-fr.org>
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
@@ -20,12 +20,15 @@
MA 02110-1301 USA.
*/
+#include <sys/ioctl.h>
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <linux/i2c.h>
#include <linux/i2c-dev.h>
+#include <i2c/smbus.h>
#include "i2cbusses.h"
#include "../version.h"
diff --git a/tools/i2cdump.c b/tools/i2cdump.c
index 9ec7de0..303c30d 100644
--- a/tools/i2cdump.c
+++ b/tools/i2cdump.c
@@ -2,7 +2,7 @@
i2cdump.c - a user-space program to dump I2C registers
Copyright (C) 2002-2003 Frodo Looijaard <frodol@dds.nl>, and
Mark D. Studebaker <mdsxyz123@yahoo.com>
- Copyright (C) 2004-2010 Jean Delvare <khali@linux-fr.org>
+ Copyright (C) 2004-2012 Jean Delvare <khali@linux-fr.org>
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
@@ -20,12 +20,15 @@
MA 02110-1301 USA.
*/
+#include <sys/ioctl.h>
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <linux/i2c.h>
#include <linux/i2c-dev.h>
+#include <i2c/smbus.h>
#include "i2cbusses.h"
#include "util.h"
#include "../version.h"
diff --git a/tools/i2cget.c b/tools/i2cget.c
index 350ccfd..98182e8 100644
--- a/tools/i2cget.c
+++ b/tools/i2cget.c
@@ -1,6 +1,6 @@
/*
i2cget.c - A user-space program to read an I2C register.
- Copyright (C) 2005-2010 Jean Delvare <khali@linux-fr.org>
+ Copyright (C) 2005-2012 Jean Delvare <khali@linux-fr.org>
Based on i2cset.c:
Copyright (C) 2001-2003 Frodo Looijaard <frodol@dds.nl>, and
@@ -23,12 +23,15 @@
MA 02110-1301 USA.
*/
+#include <sys/ioctl.h>
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <linux/i2c.h>
#include <linux/i2c-dev.h>
+#include <i2c/smbus.h>
#include "i2cbusses.h"
#include "util.h"
#include "../version.h"
diff --git a/tools/i2cset.c b/tools/i2cset.c
index b512081..1976c1f 100644
--- a/tools/i2cset.c
+++ b/tools/i2cset.c
@@ -2,7 +2,7 @@
i2cset.c - A user-space program to write an I2C register.
Copyright (C) 2001-2003 Frodo Looijaard <frodol@dds.nl>, and
Mark D. Studebaker <mdsxyz123@yahoo.com>
- Copyright (C) 2004-2010 Jean Delvare <khali@linux-fr.org>
+ Copyright (C) 2004-2012 Jean Delvare <khali@linux-fr.org>
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
@@ -20,12 +20,15 @@
MA 02110-1301 USA.
*/
+#include <sys/ioctl.h>
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <linux/i2c.h>
#include <linux/i2c-dev.h>
+#include <i2c/smbus.h>
#include "i2cbusses.h"
#include "util.h"
#include "../version.h"