From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, sensors@Stimpy.netroedge.com
Cc: grant_nospam@dodo.com.au
Subject: [PATCH] I2C: Drop useless w83781d RT feature
Date: Thu, 31 Mar 2005 15:23:16 -0800 [thread overview]
Message-ID: <1112311396681@kroah.com> (raw)
In-Reply-To: <11123113952409@kroah.com>
ChangeSet 1.2350, 2005/03/31 14:32:55-08:00, grant_nospam@dodo.com.au
[PATCH] I2C: Drop useless w83781d RT feature
This patch removes useless RT feature from w83781d driver.
Patch applies after the recent "I2C: Fix a common race condition
in hardware monitoring" series.
Signed-off-by: Grant Coady <gcoady@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/i2c/chips/w83781d.c | 100 --------------------------------------------
1 files changed, 100 deletions(-)
diff -Nru a/drivers/i2c/chips/w83781d.c b/drivers/i2c/chips/w83781d.c
--- a/drivers/i2c/chips/w83781d.c 2005-03-31 15:15:56 -08:00
+++ b/drivers/i2c/chips/w83781d.c 2005-03-31 15:15:56 -08:00
@@ -46,9 +46,6 @@
#include <asm/io.h>
#include "lm75.h"
-/* RT Table support #defined so we can take it out if it gets bothersome */
-#define W83781D_RT 1
-
/* Addresses to scan */
static unsigned short normal_i2c[] = { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25,
0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b,
@@ -258,9 +255,6 @@
3000-5000 = thermistor beta.
Default = 3435.
Other Betas unimplemented */
-#ifdef W83781D_RT
- u8 rt[3][32]; /* Register value */
-#endif
u8 vrm;
};
@@ -834,66 +828,6 @@
device_create_file(&client->dev, &dev_attr_temp##offset##_type); \
} while (0)
-#ifdef W83781D_RT
-static ssize_t
-show_rt_reg(struct device *dev, char *buf, int nr)
-{
- struct w83781d_data *data = w83781d_update_device(dev);
- int i, j = 0;
-
- for (i = 0; i < 32; i++) {
- if (i > 0)
- j += sprintf(buf, " %ld", (long) data->rt[nr - 1][i]);
- else
- j += sprintf(buf, "%ld", (long) data->rt[nr - 1][i]);
- }
- j += sprintf(buf, "\n");
-
- return j;
-}
-
-static ssize_t
-store_rt_reg(struct device *dev, const char *buf, size_t count, int nr)
-{
- struct i2c_client *client = to_i2c_client(dev);
- struct w83781d_data *data = i2c_get_clientdata(client);
- u32 val, i;
-
- for (i = 0; i < count; i++) {
- val = simple_strtoul(buf + count, NULL, 10);
-
- /* fixme: no bounds checking 0-255 */
- data->rt[nr - 1][i] = val & 0xff;
- w83781d_write_value(client, W83781D_REG_RT_IDX, i);
- w83781d_write_value(client, W83781D_REG_RT_VAL,
- data->rt[nr - 1][i]);
- }
-
- return count;
-}
-
-#define sysfs_rt(offset) \
-static ssize_t show_regs_rt_##offset (struct device *dev, char *buf) \
-{ \
- return show_rt_reg(dev, buf, offset); \
-} \
-static ssize_t store_regs_rt_##offset (struct device *dev, const char *buf, size_t count) \
-{ \
- return store_rt_reg(dev, buf, count, offset); \
-} \
-static DEVICE_ATTR(rt##offset, S_IRUGO | S_IWUSR, show_regs_rt_##offset, store_regs_rt_##offset);
-
-sysfs_rt(1);
-sysfs_rt(2);
-sysfs_rt(3);
-
-#define device_create_file_rt(client, offset) \
-do { \
-device_create_file(&client->dev, &dev_attr_rt##offset); \
-} while (0)
-
-#endif /* ifdef W83781D_RT */
-
/* This function is called when:
* w83781d_driver is inserted (when this module is loaded), for each
available adapter
@@ -1304,13 +1238,6 @@
if (kind != w83783s && kind != w83697hf)
device_create_file_sensor(new_client, 3);
}
-#ifdef W83781D_RT
- if (kind == w83781d) {
- device_create_file_rt(new_client, 1);
- device_create_file_rt(new_client, 2);
- device_create_file_rt(new_client, 3);
- }
-#endif
return 0;
@@ -1535,33 +1462,6 @@
break;
}
}
-#ifdef W83781D_RT
-/*
- Fill up the RT Tables.
- We assume that they are 32 bytes long, in order for temp 1-3.
- Data sheet documentation is sparse.
- We also assume that it is only for the 781D although I suspect
- that the others support it as well....
-*/
-
- if (init && type == w83781d) {
- u16 k = 0;
-/*
- Auto-indexing doesn't seem to work...
- w83781d_write_value(client,W83781D_REG_RT_IDX,0);
-*/
- for (i = 0; i < 3; i++) {
- int j;
- for (j = 0; j < 32; j++) {
- w83781d_write_value(client,
- W83781D_REG_RT_IDX, k++);
- data->rt[i][j] =
- w83781d_read_value(client,
- W83781D_REG_RT_VAL);
- }
- }
- }
-#endif /* W83781D_RT */
if (init && type != as99127f) {
/* Enable temp2 */
next prev parent reply other threads:[~2005-03-31 23:24 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-31 23:22 [BK PATCH] I2C patches for 2.6.12-rc1 Greg KH
2005-03-31 23:23 ` [PATCH] i2c/i2c-ite: remove interruptible_sleep_on_timeout() usage Greg KH
2005-03-31 23:23 ` [PATCH] i2c/i2c-elektor: " Greg KH
2005-03-31 23:23 ` [PATCH] I2C: New lm92 chip driver Greg KH
2005-03-31 23:23 ` [PATCH] I2C: Cleanup adm1021 unused defines Greg KH
2005-03-31 23:23 ` [PATCH] I2C: Fix adm1021 alarms mask Greg KH
2005-03-31 23:23 ` [PATCH] I2C: Kill unused struct members in w83627hf driver Greg KH
2005-03-31 23:23 ` [PATCH] I2C: Make master_xfer debug messages more useful Greg KH
2005-03-31 23:23 ` [PATCH] I2C: Skip broken detection step in it87 Greg KH
2005-03-31 23:23 ` [PATCH] I2C: group Intel on I2C Hardware Bus support Greg KH
2005-03-31 23:23 ` [PATCH] i2c: new driver for ds1337 RTC Greg KH
2005-03-31 23:23 ` [PATCH] i2c: add adt7461 chip support to lm90 driver Greg KH
2005-03-31 23:23 ` [PATCH] I2C: Clean up of i2c-elektor.c build Greg KH
2005-03-31 23:23 ` [PATCH] I2C: Fix breakage in m41t00 i2c rtc driver Greg KH
2005-03-31 23:23 ` [PATCH] I2C: Fix some i2c algorithm initialization Greg KH
2005-03-31 23:23 ` [PATCH] I2C: Kill outdated defines in i2c.h Greg KH
2005-03-31 23:23 ` [PATCH] I2C: Avoid repeated resets of i2c-viapro Greg KH
2005-03-31 23:23 ` [PATCH] I2C: Recognize new revision of the ADT7463 chip Greg KH
2005-03-31 23:23 ` [PATCH] I2C: Fix Vaio EEPROM detection Greg KH
2005-03-31 23:23 ` [PATCH] I2C: busses documentation update 1 of 2 Greg KH
2005-03-31 23:23 ` [PATCH] I2C: busses documentation update 2 " Greg KH
2005-03-31 23:23 ` [PATCH] I2C: lost arbitration detection for PCF8584 Greg KH
2005-03-31 23:23 ` [PATCH] I2C: lsb in emc6d102 and adm1027 Greg KH
2005-03-31 23:23 ` [PATCH] I2C: Delete useless instruction in it87 Greg KH
2005-03-31 23:23 ` [PATCH] I2C: Fix race condition in it87 driver Greg KH
2005-03-31 23:23 ` [PATCH] I2C: i2c-s3c2410 functionality and fixes Greg KH
2005-03-31 23:23 ` [PATCH] i2c: add adt7461 chip support to lm90 driver's Kconfig entry Greg KH
2005-03-31 23:23 ` [PATCH] I2C: Fix broken force parameter handling Greg KH
2005-03-31 23:23 ` [PATCH] I2C: Fix indentation of lm87 driver Greg KH
2005-03-31 23:23 ` Greg KH [this message]
2005-03-31 23:23 ` [PATCH] i2c: i2c-mv64xxx - set adapter owner and class fields Greg KH
2005-04-07 9:45 ` [PATCH] i2c: new driver for ds1337 RTC Ladislav Michl
2005-04-07 9:59 ` Jean Delvare
2005-04-07 11:16 ` Ladislav Michl
2005-04-07 13:07 ` Jean Delvare
2005-04-07 14:28 ` Ladislav Michl
2005-04-07 21:18 ` Greg KH
2005-04-07 23:17 ` [PATCH] ds1337 1/4 Ladislav Michl
2005-04-07 23:36 ` Greg KH
2005-04-08 13:00 ` Ladislav Michl
2005-04-08 16:31 ` James Chapman
2005-05-02 20:41 ` Greg KH
2005-04-08 8:49 ` Jean Delvare
2005-04-07 23:18 ` [PATCH] ds1337 2/4 Ladislav Michl
2005-04-08 8:51 ` Jean Delvare
2005-04-08 13:02 ` Ladislav Michl
2005-05-02 20:41 ` Greg KH
2005-04-07 23:18 ` [PATCH] ds1337 3/4 Ladislav Michl
2005-04-08 10:08 ` Jean Delvare
2005-04-08 13:06 ` Ladislav Michl
2005-05-02 20:41 ` Greg KH
2005-05-04 6:13 ` [PATCH] ds1337 1/3 Ladislav Michl
2005-05-04 8:41 ` Jean Delvare
2005-05-04 6:13 ` [PATCH] ds1337 2/3 Ladislav Michl
2005-05-04 9:44 ` Jean Delvare
2005-05-04 6:14 ` [PATCH] ds1337 3/3 Ladislav Michl
2005-05-04 10:07 ` Jean Delvare
2005-05-10 12:08 ` [PATCH] ds1337 driver works also with ds1339 chip Ladislav Michl
2005-05-10 12:40 ` Jean Delvare
2005-05-10 12:48 ` Russell King
[not found] ` <1DTwF8-18P-00@press.kroah.org>
[not found] ` <20050508204021.627f9cd1.khali@linux-fr.org>
[not found] ` <427E6E21.60001@katalix.com>
[not found] ` <20050508222351.08bfe2e1.khali@linux-fr.org>
2005-05-10 12:18 ` [PATCH] ds1337: export ds1337_do_command Ladislav Michl
2005-05-10 12:51 ` Jean Delvare
2005-05-10 17:55 ` Greg KH
2005-05-10 18:36 ` Ladislav Michl
2005-05-10 20:30 ` Greg KH
2005-05-11 8:32 ` Ladislav Michl
2005-04-07 23:19 ` [PATCH] ds1337 4/4 Ladislav Michl
2005-04-08 11:08 ` Jean Delvare
2005-04-08 12:35 ` Ladislav Michl
2005-04-08 16:21 ` Jean Delvare
2005-04-08 17:44 ` James Chapman
2005-04-10 19:51 ` Ladislav Michl
2005-04-10 21:10 ` Jean Delvare
2005-04-12 18:10 ` James Chapman
2005-04-13 11:04 ` Ladislav Michl
2005-04-13 19:02 ` James Chapman
2005-04-13 19:48 ` Ladislav Michl
2005-04-07 21:29 ` [PATCH] i2c: new driver for ds1337 RTC Jean Delvare
2005-04-07 23:16 ` Ladislav Michl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1112311396681@kroah.com \
--to=gregkh@suse.de \
--cc=grant_nospam@dodo.com.au \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sensors@Stimpy.netroedge.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox