summaryrefslogtreecommitdiffstats
path: root/sys/dev/i2c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2007-03-22 16:55:31 +0000
committerderaadt <deraadt@openbsd.org>2007-03-22 16:55:31 +0000
commit275cbf6284ffdb1e2073d21a1d262a36bf3611fe (patch)
tree909d59f6dac2546da8daabc7d7a3a8c9a46073f4 /sys/dev/i2c
parents/%ssredistribute/%sredistribute/. One s is enough and makes -nv output (diff)
downloadwireguard-openbsd-275cbf6284ffdb1e2073d21a1d262a36bf3611fe.tar.xz
wireguard-openbsd-275cbf6284ffdb1e2073d21a1d262a36bf3611fe.zip
split userland & kernel struct sensor/sensordev so that the addition
of new fields in the future is less disruptive. This is done similar to how struct proc is handled for ps(1). ok jmc (man page changes) tested fkr simon, and more suggestions from millert
Diffstat (limited to 'sys/dev/i2c')
-rw-r--r--sys/dev/i2c/ad741x.c6
-rw-r--r--sys/dev/i2c/adm1021.c6
-rw-r--r--sys/dev/i2c/adm1024.c8
-rw-r--r--sys/dev/i2c/adm1025.c6
-rw-r--r--sys/dev/i2c/adm1026.c8
-rw-r--r--sys/dev/i2c/adm1030.c6
-rw-r--r--sys/dev/i2c/adm1031.c6
-rw-r--r--sys/dev/i2c/adt7460.c6
-rw-r--r--sys/dev/i2c/asb100.c8
-rw-r--r--sys/dev/i2c/ds1631.c6
-rw-r--r--sys/dev/i2c/fcu.c6
-rw-r--r--sys/dev/i2c/fintek.c6
-rw-r--r--sys/dev/i2c/gl518sm.c6
-rw-r--r--sys/dev/i2c/lm75.c6
-rw-r--r--sys/dev/i2c/lm87.c6
-rw-r--r--sys/dev/i2c/maxim6690.c6
-rw-r--r--sys/dev/i2c/pca9554.c6
-rw-r--r--sys/dev/i2c/tsl2560.c6
-rw-r--r--sys/dev/i2c/w83l784r.c18
19 files changed, 66 insertions, 66 deletions
diff --git a/sys/dev/i2c/ad741x.c b/sys/dev/i2c/ad741x.c
index b78642772aa..4c3e2d47529 100644
--- a/sys/dev/i2c/ad741x.c
+++ b/sys/dev/i2c/ad741x.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ad741x.c,v 1.9 2006/12/23 17:46:39 deraadt Exp $ */
+/* $OpenBSD: ad741x.c,v 1.10 2007/03/22 16:55:31 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -48,8 +48,8 @@ struct adc_softc {
int sc_chip;
u_int8_t sc_config;
- struct sensor sc_sensor[ADC_MAX_SENSORS];
- struct sensordev sc_sensordev;
+ struct ksensor sc_sensor[ADC_MAX_SENSORS];
+ struct ksensordev sc_sensordev;
};
int adc_match(struct device *, void *, void *);
diff --git a/sys/dev/i2c/adm1021.c b/sys/dev/i2c/adm1021.c
index d2658649877..b8f44afe0d9 100644
--- a/sys/dev/i2c/adm1021.c
+++ b/sys/dev/i2c/adm1021.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adm1021.c,v 1.25 2006/12/23 17:46:39 deraadt Exp $ */
+/* $OpenBSD: adm1021.c,v 1.26 2007/03/22 16:55:31 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -45,8 +45,8 @@ struct admtemp_softc {
i2c_tag_t sc_tag;
i2c_addr_t sc_addr;
- struct sensor sc_sensor[ADMTEMP_NUM_SENSORS];
- struct sensordev sc_sensordev;
+ struct ksensor sc_sensor[ADMTEMP_NUM_SENSORS];
+ struct ksensordev sc_sensordev;
int sc_noexternal;
};
diff --git a/sys/dev/i2c/adm1024.c b/sys/dev/i2c/adm1024.c
index 0709f7af6f6..630cc3cdec6 100644
--- a/sys/dev/i2c/adm1024.c
+++ b/sys/dev/i2c/adm1024.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adm1024.c,v 1.12 2006/12/23 17:46:39 deraadt Exp $ */
+/* $OpenBSD: adm1024.c,v 1.13 2007/03/22 16:55:31 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -61,8 +61,8 @@ struct admlc_softc {
i2c_tag_t sc_tag;
i2c_addr_t sc_addr;
- struct sensor sc_sensor[ADMLC_NUM_SENSORS];
- struct sensordev sc_sensordev;
+ struct ksensor sc_sensor[ADMLC_NUM_SENSORS];
+ struct ksensordev sc_sensordev;
int sc_fan1mul;
int sc_fan2mul;
};
@@ -184,7 +184,7 @@ admlc_attach(struct device *parent, struct device *self, void *aux)
}
static void
-fanval(struct sensor *sens, int mul, u_int8_t data)
+fanval(struct ksensor *sens, int mul, u_int8_t data)
{
int tmp = data * mul;
diff --git a/sys/dev/i2c/adm1025.c b/sys/dev/i2c/adm1025.c
index 5a59ebb2367..911c8398203 100644
--- a/sys/dev/i2c/adm1025.c
+++ b/sys/dev/i2c/adm1025.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adm1025.c,v 1.23 2006/12/23 17:46:39 deraadt Exp $ */
+/* $OpenBSD: adm1025.c,v 1.24 2007/03/22 16:55:31 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -61,8 +61,8 @@ struct admtm_softc {
i2c_tag_t sc_tag;
i2c_addr_t sc_addr;
- struct sensor sc_sensor[ADMTM_NUM_SENSORS + SMSC_NUM_SENSORS];
- struct sensordev sc_sensordev;
+ struct ksensor sc_sensor[ADMTM_NUM_SENSORS + SMSC_NUM_SENSORS];
+ struct ksensordev sc_sensordev;
int sc_nsensors;
int sc_model;
};
diff --git a/sys/dev/i2c/adm1026.c b/sys/dev/i2c/adm1026.c
index dc63020ab6f..26cea62b63e 100644
--- a/sys/dev/i2c/adm1026.c
+++ b/sys/dev/i2c/adm1026.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adm1026.c,v 1.8 2006/12/23 17:46:39 deraadt Exp $ */
+/* $OpenBSD: adm1026.c,v 1.9 2007/03/22 16:55:31 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -78,8 +78,8 @@ struct admcts_softc {
i2c_tag_t sc_tag;
i2c_addr_t sc_addr;
- struct sensor sc_sensor[ADMCTS_NUM_SENSORS];
- struct sensordev sc_sensordev;
+ struct ksensor sc_sensor[ADMCTS_NUM_SENSORS];
+ struct ksensordev sc_sensordev;
int sc_fanmul[8];
};
@@ -226,7 +226,7 @@ admcts_attach(struct device *parent, struct device *self, void *aux)
}
static void
-fanval(struct sensor *sens, int mul, u_int8_t data)
+fanval(struct ksensor *sens, int mul, u_int8_t data)
{
int tmp = data * mul;
diff --git a/sys/dev/i2c/adm1030.c b/sys/dev/i2c/adm1030.c
index 8d09cf010af..3e8f9ee7aca 100644
--- a/sys/dev/i2c/adm1030.c
+++ b/sys/dev/i2c/adm1030.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adm1030.c,v 1.6 2006/12/23 17:46:39 deraadt Exp $ */
+/* $OpenBSD: adm1030.c,v 1.7 2007/03/22 16:55:31 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -42,8 +42,8 @@ struct admtmp_softc {
i2c_addr_t sc_addr;
int sc_fanmul;
- struct sensor sc_sensor[ADMTMP_NUM_SENSORS];
- struct sensordev sc_sensordev;
+ struct ksensor sc_sensor[ADMTMP_NUM_SENSORS];
+ struct ksensordev sc_sensordev;
};
int admtmp_match(struct device *, void *, void *);
diff --git a/sys/dev/i2c/adm1031.c b/sys/dev/i2c/adm1031.c
index 6b8149e2739..cdbc443e71d 100644
--- a/sys/dev/i2c/adm1031.c
+++ b/sys/dev/i2c/adm1031.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adm1031.c,v 1.6 2006/12/23 17:46:39 deraadt Exp $ */
+/* $OpenBSD: adm1031.c,v 1.7 2007/03/22 16:55:31 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -47,8 +47,8 @@ struct admtt_softc {
i2c_addr_t sc_addr;
int sc_fanmul;
- struct sensor sc_sensor[ADMTT_NUM_SENSORS];
- struct sensordev sc_sensordev;
+ struct ksensor sc_sensor[ADMTT_NUM_SENSORS];
+ struct ksensordev sc_sensordev;
};
int admtt_match(struct device *, void *, void *);
diff --git a/sys/dev/i2c/adt7460.c b/sys/dev/i2c/adt7460.c
index ea648f55981..52d2ce85247 100644
--- a/sys/dev/i2c/adt7460.c
+++ b/sys/dev/i2c/adt7460.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adt7460.c,v 1.16 2006/12/31 06:47:14 deraadt Exp $ */
+/* $OpenBSD: adt7460.c,v 1.17 2007/03/22 16:55:31 deraadt Exp $ */
/*
* Copyright (c) 2005 Mark Kettenis
@@ -106,8 +106,8 @@ struct adt_softc {
u_int8_t sc_conf;
struct adt_chip *chip;
- struct sensor sc_sensor[ADT_NUM_SENSORS];
- struct sensordev sc_sensordev;
+ struct ksensor sc_sensor[ADT_NUM_SENSORS];
+ struct ksensordev sc_sensordev;
};
int adt_match(struct device *, void *, void *);
diff --git a/sys/dev/i2c/asb100.c b/sys/dev/i2c/asb100.c
index f8770a25b8f..43759eab6dc 100644
--- a/sys/dev/i2c/asb100.c
+++ b/sys/dev/i2c/asb100.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asb100.c,v 1.8 2006/12/23 17:46:39 deraadt Exp $ */
+/* $OpenBSD: asb100.c,v 1.9 2007/03/22 16:55:31 deraadt Exp $ */
/*
* Copyright (c) 2005 Damien Miller <djm@openbsd.org>
@@ -106,8 +106,8 @@ struct asbtm_softc {
i2c_tag_t sc_tag;
i2c_addr_t sc_addr;
- struct sensor sc_sensor[ASB100_NUM_SENSORS];
- struct sensordev sc_sensordev;
+ struct ksensor sc_sensor[ASB100_NUM_SENSORS];
+ struct ksensordev sc_sensordev;
int sc_fanmul[3];
int sc_satellite[2];
};
@@ -271,7 +271,7 @@ asbtm_attach(struct device *parent, struct device *self, void *aux)
}
static void
-fanval(struct sensor *sens, int mul, u_int8_t data)
+fanval(struct ksensor *sens, int mul, u_int8_t data)
{
int tmp = data * mul;
diff --git a/sys/dev/i2c/ds1631.c b/sys/dev/i2c/ds1631.c
index 184db2e6537..0eeb55f8b8b 100644
--- a/sys/dev/i2c/ds1631.c
+++ b/sys/dev/i2c/ds1631.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ds1631.c,v 1.7 2006/12/23 17:46:39 deraadt Exp $ */
+/* $OpenBSD: ds1631.c,v 1.8 2007/03/22 16:55:31 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -40,8 +40,8 @@ struct maxds_softc {
i2c_tag_t sc_tag;
i2c_addr_t sc_addr;
- struct sensor sc_sensor[MAXDS_NUM_SENSORS];
- struct sensordev sc_sensordev;
+ struct ksensor sc_sensor[MAXDS_NUM_SENSORS];
+ struct ksensordev sc_sensordev;
};
int maxds_match(struct device *, void *, void *);
diff --git a/sys/dev/i2c/fcu.c b/sys/dev/i2c/fcu.c
index ba4dbd0e81d..ea2ec733291 100644
--- a/sys/dev/i2c/fcu.c
+++ b/sys/dev/i2c/fcu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fcu.c,v 1.5 2007/01/07 18:27:46 deraadt Exp $ */
+/* $OpenBSD: fcu.c,v 1.6 2007/03/22 16:55:31 deraadt Exp $ */
/*
* Copyright (c) 2005 Mark Kettenis
@@ -50,8 +50,8 @@ struct fcu_softc {
i2c_tag_t sc_tag;
i2c_addr_t sc_addr;
- struct sensor sc_sensor[FCU_NUM_SENSORS];
- struct sensordev sc_sensordev;
+ struct ksensor sc_sensor[FCU_NUM_SENSORS];
+ struct ksensordev sc_sensordev;
};
int fcu_match(struct device *, void *, void *);
diff --git a/sys/dev/i2c/fintek.c b/sys/dev/i2c/fintek.c
index 928f8202770..7ad803d5ebb 100644
--- a/sys/dev/i2c/fintek.c
+++ b/sys/dev/i2c/fintek.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fintek.c,v 1.4 2006/12/24 01:26:20 deraadt Exp $ */
+/* $OpenBSD: fintek.c,v 1.5 2007/03/22 16:55:31 deraadt Exp $ */
/*
* Copyright (c) 2006 Dale Rahn <drahn@openbsd.org>
*
@@ -38,8 +38,8 @@ struct fintek_softc {
i2c_tag_t sc_tag;
i2c_addr_t sc_addr;
- struct sensor sc_sensor[F_NUM_SENSORS];
- struct sensordev sc_sensordev;
+ struct ksensor sc_sensor[F_NUM_SENSORS];
+ struct ksensordev sc_sensordev;
};
int fintek_match(struct device *, void *, void *);
diff --git a/sys/dev/i2c/gl518sm.c b/sys/dev/i2c/gl518sm.c
index fb674283ff1..d92cccab043 100644
--- a/sys/dev/i2c/gl518sm.c
+++ b/sys/dev/i2c/gl518sm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gl518sm.c,v 1.4 2006/12/23 17:46:39 deraadt Exp $ */
+/* $OpenBSD: gl518sm.c,v 1.5 2007/03/22 16:55:31 deraadt Exp $ */
/*
* Copyright (c) 2006 Mark Kettenis
@@ -59,8 +59,8 @@ struct glenv_softc {
i2c_tag_t sc_tag;
i2c_addr_t sc_addr;
- struct sensor sc_sensor[GLENV_NUM_SENSORS];
- struct sensordev sc_sensordev;
+ struct ksensor sc_sensor[GLENV_NUM_SENSORS];
+ struct ksensordev sc_sensordev;
int sc_fan1_div, sc_fan2_div;
};
diff --git a/sys/dev/i2c/lm75.c b/sys/dev/i2c/lm75.c
index 92f99fd4d54..34cb7e53774 100644
--- a/sys/dev/i2c/lm75.c
+++ b/sys/dev/i2c/lm75.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lm75.c,v 1.14 2006/12/23 17:46:39 deraadt Exp $ */
+/* $OpenBSD: lm75.c,v 1.15 2007/03/22 16:55:31 deraadt Exp $ */
/* $NetBSD: lm75.c,v 1.1 2003/09/30 00:35:31 thorpej Exp $ */
/*
* Copyright (c) 2006 Theo de Raadt <deraadt@openbsd.org>
@@ -61,8 +61,8 @@ struct lmtemp_softc {
int sc_model;
int sc_bits;
- struct sensor sc_sensor;
- struct sensordev sc_sensordev;
+ struct ksensor sc_sensor;
+ struct ksensordev sc_sensordev;
};
int lmtemp_match(struct device *, void *, void *);
diff --git a/sys/dev/i2c/lm87.c b/sys/dev/i2c/lm87.c
index 3eeced4bda1..038b7d50961 100644
--- a/sys/dev/i2c/lm87.c
+++ b/sys/dev/i2c/lm87.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lm87.c,v 1.17 2006/12/23 17:46:39 deraadt Exp $ */
+/* $OpenBSD: lm87.c,v 1.18 2007/03/22 16:55:31 deraadt Exp $ */
/*
* Copyright (c) 2005 Mark Kettenis
@@ -61,8 +61,8 @@ struct lmenv_softc {
i2c_tag_t sc_tag;
i2c_addr_t sc_addr;
- struct sensor sc_sensor[LMENV_NUM_SENSORS];
- struct sensordev sc_sensordev;
+ struct ksensor sc_sensor[LMENV_NUM_SENSORS];
+ struct ksensordev sc_sensordev;
int sc_fan1_div, sc_fan2_div;
int sc_family;
};
diff --git a/sys/dev/i2c/maxim6690.c b/sys/dev/i2c/maxim6690.c
index 80031bd0768..f8448595d13 100644
--- a/sys/dev/i2c/maxim6690.c
+++ b/sys/dev/i2c/maxim6690.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: maxim6690.c,v 1.13 2006/12/23 17:46:39 deraadt Exp $ */
+/* $OpenBSD: maxim6690.c,v 1.14 2007/03/22 16:55:31 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -54,8 +54,8 @@ struct maxtmp_softc {
u_int8_t sc_temp_invalid[2];
u_int8_t sc_temp2_mask;
- struct sensor sc_sensor[MAXTMP_NUM_SENSORS];
- struct sensordev sc_sensordev;
+ struct ksensor sc_sensor[MAXTMP_NUM_SENSORS];
+ struct ksensordev sc_sensordev;
};
int maxtmp_match(struct device *, void *, void *);
diff --git a/sys/dev/i2c/pca9554.c b/sys/dev/i2c/pca9554.c
index 237c78d97ef..dae1db08d55 100644
--- a/sys/dev/i2c/pca9554.c
+++ b/sys/dev/i2c/pca9554.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pca9554.c,v 1.9 2006/12/23 17:46:39 deraadt Exp $ */
+/* $OpenBSD: pca9554.c,v 1.10 2007/03/22 16:55:31 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -45,8 +45,8 @@ struct pcagpio_softc {
struct gpio_chipset_tag sc_gpio_gc;
gpio_pin_t sc_gpio_pins[PCAGPIO_NPINS];
- struct sensor sc_sensor[PCAGPIO_NPINS];
- struct sensordev sc_sensordev;
+ struct ksensor sc_sensor[PCAGPIO_NPINS];
+ struct ksensordev sc_sensordev;
};
int pcagpio_match(struct device *, void *, void *);
diff --git a/sys/dev/i2c/tsl2560.c b/sys/dev/i2c/tsl2560.c
index e5dd30ba1a6..967981acfd9 100644
--- a/sys/dev/i2c/tsl2560.c
+++ b/sys/dev/i2c/tsl2560.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tsl2560.c,v 1.4 2006/12/23 17:46:39 deraadt Exp $ */
+/* $OpenBSD: tsl2560.c,v 1.5 2007/03/22 16:55:31 deraadt Exp $ */
/*
* Copyright (c) 2005 Mark Kettenis
@@ -40,8 +40,8 @@ struct tsl_softc {
i2c_tag_t sc_tag;
i2c_addr_t sc_addr;
- struct sensor sc_sensor;
- struct sensordev sc_sensordev;
+ struct ksensor sc_sensor;
+ struct ksensordev sc_sensordev;
};
int tsl_match(struct device *, void *, void *);
diff --git a/sys/dev/i2c/w83l784r.c b/sys/dev/i2c/w83l784r.c
index ee4c7cac726..9795bab4aef 100644
--- a/sys/dev/i2c/w83l784r.c
+++ b/sys/dev/i2c/w83l784r.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: w83l784r.c,v 1.10 2006/12/23 17:46:39 deraadt Exp $ */
+/* $OpenBSD: w83l784r.c,v 1.11 2007/03/22 16:55:31 deraadt Exp $ */
/*
* Copyright (c) 2006 Mark Kettenis
@@ -78,8 +78,8 @@ struct wbenv_softc {
i2c_addr_t sc_addr[3];
u_int8_t sc_chip_id;
- struct sensor sc_sensors[WBENV_MAX_SENSORS];
- struct sensordev sc_sensordev;
+ struct ksensor sc_sensors[WBENV_MAX_SENSORS];
+ struct ksensordev sc_sensordev;
struct wbenv_sensor *sc_wbenv_sensors;
int sc_numsensors;
};
@@ -269,7 +269,7 @@ wbenv_refresh(void *arg)
void
w83l784r_refresh_volt(struct wbenv_softc *sc, int n)
{
- struct sensor *sensor = &sc->sc_sensors[n];
+ struct ksensor *sensor = &sc->sc_sensors[n];
int data, reg = sc->sc_wbenv_sensors[n].reg;
data = wbenv_readreg(sc, reg);
@@ -281,7 +281,7 @@ w83l784r_refresh_volt(struct wbenv_softc *sc, int n)
void
w83l785r_refresh_volt(struct wbenv_softc *sc, int n)
{
- struct sensor *sensor = &sc->sc_sensors[n];
+ struct ksensor *sensor = &sc->sc_sensors[n];
int data, reg = sc->sc_wbenv_sensors[n].reg;
data = wbenv_readreg(sc, reg);
@@ -293,7 +293,7 @@ w83l785r_refresh_volt(struct wbenv_softc *sc, int n)
void
wbenv_refresh_temp(struct wbenv_softc *sc, int n)
{
- struct sensor *sensor = &sc->sc_sensors[n];
+ struct ksensor *sensor = &sc->sc_sensors[n];
int sdata;
sdata = wbenv_readreg(sc, sc->sc_wbenv_sensors[n].reg);
@@ -305,7 +305,7 @@ wbenv_refresh_temp(struct wbenv_softc *sc, int n)
void
w83l784r_refresh_temp(struct wbenv_softc *sc, int n)
{
- struct sensor *sensor = &sc->sc_sensors[n];
+ struct ksensor *sensor = &sc->sc_sensors[n];
int16_t sdata;
u_int8_t cmd = 0;
@@ -318,7 +318,7 @@ w83l784r_refresh_temp(struct wbenv_softc *sc, int n)
void
w83l784r_refresh_fanrpm(struct wbenv_softc *sc, int n)
{
- struct sensor *sensor = &sc->sc_sensors[n];
+ struct ksensor *sensor = &sc->sc_sensors[n];
int data, divisor;
data = wbenv_readreg(sc, W83L784R_FANDIV);
@@ -340,7 +340,7 @@ w83l784r_refresh_fanrpm(struct wbenv_softc *sc, int n)
void
w83l785r_refresh_fanrpm(struct wbenv_softc *sc, int n)
{
- struct sensor *sensor = &sc->sc_sensors[n];
+ struct ksensor *sensor = &sc->sc_sensors[n];
int data, divisor;
data = wbenv_readreg(sc, W83L785R_FANDIV);