summaryrefslogtreecommitdiff
path: root/sys/arch/arm
diff options
context:
space:
mode:
authorRobert Nagy <robert@cvs.openbsd.org>2007-05-29 21:09:44 +0000
committerRobert Nagy <robert@cvs.openbsd.org>2007-05-29 21:09:44 +0000
commitcfbb82b0dbaf3d9c8aa308fe9d8f0b0f173e2c08 (patch)
tree12f588b2916b7b03240f6d0a3d9796870b7637cc /sys/arch/arm
parentb28e2a7b2962663d70c5043e7f7357dde5e7c18b (diff)
Make use of struct wsmouse_calibcoords and add ioctl support
for getting and passing calibration values instead of using sysctl. Move the scale struct to uts_softc so that each device can have it's own values instead of using the global one. Remove the two MD sysctl (ztsscale and ztsrawmode). ok deraadt@
Diffstat (limited to 'sys/arch/arm')
-rw-r--r--sys/arch/arm/arm/arm32_machdep.c52
-rw-r--r--sys/arch/arm/include/cpu.h6
2 files changed, 2 insertions, 56 deletions
diff --git a/sys/arch/arm/arm/arm32_machdep.c b/sys/arch/arm/arm/arm32_machdep.c
index 0b9483bd5fb..09e5b559e0b 100644
--- a/sys/arch/arm/arm/arm32_machdep.c
+++ b/sys/arch/arm/arm/arm32_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arm32_machdep.c,v 1.25 2007/05/26 20:56:49 drahn Exp $ */
+/* $OpenBSD: arm32_machdep.c,v 1.26 2007/05/29 21:09:43 robert Exp $ */
/* $NetBSD: arm32_machdep.c,v 1.42 2003/12/30 12:33:15 pk Exp $ */
/*
@@ -119,16 +119,6 @@ int allowaperture = 0;
/* Permit console keyboard to do a nice halt. */
int kbd_reset;
int lid_suspend;
-
-/* Touch pad scaling disable flag and scaling parameters. */
-extern int zts_rawmode;
-struct ztsscale {
- int ts_minx;
- int ts_maxx;
- int ts_miny;
- int ts_maxy;
-};
-extern struct ztsscale zts_scale;
extern int xscale_maxspeed;
#endif
@@ -424,7 +414,6 @@ cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
return (sysctl_int(oldp, oldlenp, newp, newlen, &cpu_apmwarn));
#endif
#if defined(__zaurus__)
-#include "zts.h"
case CPU_KBDRESET:
if (securelevel > 0)
return (sysctl_rdint(oldp, oldlenp, newp,
@@ -447,45 +436,6 @@ cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
pxa2x0_maxspeed(&xscale_maxspeed);
return err;
}
-
- case CPU_ZTSRAWMODE:
-#if NZTS > 0
- return (sysctl_int(oldp, oldlenp, newp, newlen,
- &zts_rawmode));
-#else
- return (EINVAL);
-#endif /* NZTS > 0 */
- case CPU_ZTSSCALE:
- {
- int err = EINVAL;
-#if NZTS > 0
- struct ztsscale *p = newp;
- struct ztsscale ts;
- int s;
-
- if (!newp && newlen == 0)
- return (sysctl_struct(oldp, oldlenp, 0, 0,
- &zts_scale, sizeof zts_scale));
-
- if (!(newlen == sizeof zts_scale &&
- p->ts_minx < p->ts_maxx && p->ts_miny < p->ts_maxy &&
- p->ts_minx >= 0 && p->ts_maxx >= 0 &&
- p->ts_miny >= 0 && p->ts_maxy >= 0 &&
- p->ts_minx < 32768 && p->ts_maxx < 32768 &&
- p->ts_miny < 32768 && p->ts_maxy < 32768))
- return (EINVAL);
-
- ts = zts_scale;
- err = sysctl_struct(oldp, oldlenp, newp, newlen,
- &ts, sizeof ts);
- if (err == 0) {
- s = splhigh();
- zts_scale = ts;
- splx(s);
- }
-#endif /* NZTS > 0 */
- return (err);
- }
#endif
default:
diff --git a/sys/arch/arm/include/cpu.h b/sys/arch/arm/include/cpu.h
index db0450d3b52..c39ad0d5ec6 100644
--- a/sys/arch/arm/include/cpu.h
+++ b/sys/arch/arm/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.16 2007/05/14 07:07:09 art Exp $ */
+/* $OpenBSD: cpu.h,v 1.17 2007/05/29 21:09:43 robert Exp $ */
/* $NetBSD: cpu.h,v 1.34 2003/06/23 11:01:08 martin Exp $ */
/*
@@ -62,8 +62,6 @@
#define CPU_ALLOWAPERTURE 6 /* int: allow mmap of /dev/xf86 */
#define CPU_APMWARN 7 /* APM battery warning percentage */
#define CPU_KBDRESET 8 /* int: console keyboard reset */
-#define CPU_ZTSRAWMODE 9 /* int: zts returns unscaled x/y */
-#define CPU_ZTSSCALE 10 /* struct: zts scaling parameters */
#define CPU_MAXSPEED 11 /* int: number of valid machdep ids */
#define CPU_LIDSUSPEND 12 /* int: closing lid causes suspend */
#define CPU_MAXID 13 /* number of valid machdep ids */
@@ -78,8 +76,6 @@
{ "allowaperture", CTLTYPE_INT }, \
{ "apmwarn", CTLTYPE_INT }, \
{ "kbdreset", CTLTYPE_INT }, \
- { "ztsrawmode", CTLTYPE_INT }, \
- { "ztsscale", CTLTYPE_STRUCT }, \
{ "maxspeed", CTLTYPE_INT }, \
{ "lidsuspend", CTLTYPE_INT } \
}