Deleted Added
full compact
psm.c (186175) psm.c (186218)
1/*-
2 * Copyright (c) 1992, 1993 Erik Forsberg.
3 * Copyright (c) 1996, 1997 Kazutaka YOKOTA.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 45 unchanged lines hidden (view full) ---

54 * HiNote UltraII/Latitude/Armada laptops.
55 * - 30 July 1997. Added APM support.
56 * - 5 March 1997. Defined driver configuration flags (PSM_CONFIG_XXX).
57 * Improved sync check logic.
58 * Vendor specific support routines.
59 */
60
61#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1992, 1993 Erik Forsberg.
3 * Copyright (c) 1996, 1997 Kazutaka YOKOTA.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 45 unchanged lines hidden (view full) ---

54 * HiNote UltraII/Latitude/Armada laptops.
55 * - 30 July 1997. Added APM support.
56 * - 5 March 1997. Defined driver configuration flags (PSM_CONFIG_XXX).
57 * Improved sync check logic.
58 * Vendor specific support routines.
59 */
60
61#include <sys/cdefs.h>
62__FBSDID("$FreeBSD: head/sys/dev/atkbdc/psm.c 186175 2008-12-16 09:51:13Z dumbbell $");
62__FBSDID("$FreeBSD: head/sys/dev/atkbdc/psm.c 186218 2008-12-17 10:42:53Z dumbbell $");
63
64#include "opt_isa.h"
65#include "opt_psm.h"
66
67#include <sys/param.h>
68#include <sys/systm.h>
69#include <sys/kernel.h>
70#include <sys/module.h>

--- 3880 unchanged lines hidden (view full) ---

3951
3952 return (error);
3953}
3954
3955static void
3956synaptics_sysctl_create_tree(struct psm_softc *sc)
3957{
3958
63
64#include "opt_isa.h"
65#include "opt_psm.h"
66
67#include <sys/param.h>
68#include <sys/systm.h>
69#include <sys/kernel.h>
70#include <sys/module.h>

--- 3880 unchanged lines hidden (view full) ---

3951
3952 return (error);
3953}
3954
3955static void
3956synaptics_sysctl_create_tree(struct psm_softc *sc)
3957{
3958
3959 if (sc->syninfo.sysctl_tree != NULL)
3960 return;
3961
3959 /* Attach extra synaptics sysctl nodes under hw.psm.synaptics */
3960 sysctl_ctx_init(&sc->syninfo.sysctl_ctx);
3961 sc->syninfo.sysctl_tree = SYSCTL_ADD_NODE(&sc->syninfo.sysctl_ctx,
3962 SYSCTL_STATIC_CHILDREN(_hw_psm), OID_AUTO, "synaptics", CTLFLAG_RD,
3963 0, "Synaptics TouchPad");
3964
3965 /* hw.psm.synaptics.directional_scrolls. */
3966 sc->syninfo.directional_scrolls = 1;

--- 291 unchanged lines hidden (view full) ---

4258 int status[3];
4259 KBDC kbdc;
4260
4261 if (!synaptics_support)
4262 return (FALSE);
4263
4264 kbdc = sc->kbdc;
4265 VLOG(3, (LOG_DEBUG, "synaptics: BEGIN init\n"));
3962 /* Attach extra synaptics sysctl nodes under hw.psm.synaptics */
3963 sysctl_ctx_init(&sc->syninfo.sysctl_ctx);
3964 sc->syninfo.sysctl_tree = SYSCTL_ADD_NODE(&sc->syninfo.sysctl_ctx,
3965 SYSCTL_STATIC_CHILDREN(_hw_psm), OID_AUTO, "synaptics", CTLFLAG_RD,
3966 0, "Synaptics TouchPad");
3967
3968 /* hw.psm.synaptics.directional_scrolls. */
3969 sc->syninfo.directional_scrolls = 1;

--- 291 unchanged lines hidden (view full) ---

4261 int status[3];
4262 KBDC kbdc;
4263
4264 if (!synaptics_support)
4265 return (FALSE);
4266
4267 kbdc = sc->kbdc;
4268 VLOG(3, (LOG_DEBUG, "synaptics: BEGIN init\n"));
4266 disable_aux_dev(kbdc);
4267 sc->hw.buttons = 3;
4268 sc->squelch = 0;
4269
4270 /*
4271 * Just to be on the safe side: this avoids troubles with
4272 * following mouse_ext_command() when the previous command
4273 * was PSMC_SET_RESOLUTION. Set Scaling has no effect on
4274 * Synaptics Touchpad behaviour.

--- 139 unchanged lines hidden (view full) ---

4414 sc->hw.buttons = 4;
4415
4416 VLOG(3, (LOG_DEBUG, "synaptics: END init (%d buttons)\n",
4417 sc->hw.buttons));
4418
4419 /* Create sysctl tree. */
4420 synaptics_sysctl_create_tree(sc);
4421
4269 sc->hw.buttons = 3;
4270 sc->squelch = 0;
4271
4272 /*
4273 * Just to be on the safe side: this avoids troubles with
4274 * following mouse_ext_command() when the previous command
4275 * was PSMC_SET_RESOLUTION. Set Scaling has no effect on
4276 * Synaptics Touchpad behaviour.

--- 139 unchanged lines hidden (view full) ---

4416 sc->hw.buttons = 4;
4417
4418 VLOG(3, (LOG_DEBUG, "synaptics: END init (%d buttons)\n",
4419 sc->hw.buttons));
4420
4421 /* Create sysctl tree. */
4422 synaptics_sysctl_create_tree(sc);
4423
4424 /*
4425 * The touchpad will have to be reinitialized after
4426 * suspend/resume.
4427 */
4428 sc->config |= PSM_CONFIG_HOOKRESUME | PSM_CONFIG_INITAFTERSUSPEND;
4429
4422 return (TRUE);
4423}
4424
4425/* Interlink electronics VersaPad */
4426static int
4427enable_versapad(struct psm_softc *sc)
4428{
4429 KBDC kbdc = sc->kbdc;

--- 212 unchanged lines hidden ---
4430 return (TRUE);
4431}
4432
4433/* Interlink electronics VersaPad */
4434static int
4435enable_versapad(struct psm_softc *sc)
4436{
4437 KBDC kbdc = sc->kbdc;

--- 212 unchanged lines hidden ---