Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / arch / hpcsh / dev / j6x0tp.c
blob6e7c366b869f3bcd5526e4168aafa34c249f17cd
1 /* $NetBSD: j6x0tp.c,v 1.22 2008/03/27 03:58:47 uwe Exp $ */
3 /*
4 * Copyright (c) 2003 Valeriy E. Ushakov
5 * All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 #include <sys/cdefs.h>
31 __KERNEL_RCSID(0, "$NetBSD: j6x0tp.c,v 1.22 2008/03/27 03:58:47 uwe Exp $");
33 #include <sys/param.h>
34 #include <sys/kernel.h>
35 #include <sys/device.h>
36 #include <sys/malloc.h>
37 #include <sys/systm.h>
38 #include <sys/callout.h>
40 #include "opt_j6x0tp.h"
42 #include <dev/wscons/wsconsio.h>
43 #include <dev/wscons/wsmousevar.h>
44 #include <dev/wscons/wskbdvar.h>
45 #include <dev/wscons/wsksymvar.h>
46 #include <dev/wscons/wsksymdef.h>
47 #include <dev/hpc/hpctpanelvar.h>
49 #include <machine/platid.h>
50 #include <machine/platid_mask.h>
52 #include <machine/intr.h>
54 #include <sh3/exception.h>
55 #include <sh3/intcreg.h>
56 #include <sh3/pfcreg.h>
57 #include <sh3/adcreg.h>
59 #include <sh3/dev/adcvar.h>
62 #if 0 /* XXX: disabled in favor of local version that uses printf_nolog */
63 #define DPRINTF_ENABLE
64 #define DPRINTF_DEBUG j6x0tp_debug
65 #define DPRINTF_LEVEL 0
66 #include <machine/debug.h>
67 #else
68 #ifdef J6X0TP_DEBUG
69 volatile int j6x0tp_debug = 0;
70 #define DPRINTF_PRINTF printf_nolog
71 #define DPRINTF(arg) if (j6x0tp_debug) DPRINTF_PRINTF arg
72 #define DPRINTFN(n, arg) if (j6x0tp_debug > (n)) DPRINTF_PRINTF arg
73 #else
74 #define DPRINTF(arg) ((void)0)
75 #define DPRINTFN(n, arg) ((void)0)
76 #endif
77 #endif
81 * PFC bits pertinent to Jornada 6x0 touchpanel
83 #define PHDR_TP_PEN_DOWN 0x08
85 #define SCPDR_TP_SCAN_ENABLE 0x20
86 #define SCPDR_TP_SCAN_Y 0x02
87 #define SCPDR_TP_SCAN_X 0x01
90 * A/D converter channels to get x/y from
92 #define ADC_CHANNEL_TP_Y 1
93 #define ADC_CHANNEL_TP_X 2
96 * Default (read: my device :) raw X/Y values for framebuffer edges.
97 * XXX: defopt these?
99 #define J6X0TP_FB_LEFT 38
100 #define J6X0TP_FB_RIGHT 950
101 #define J6X0TP_FB_TOP 80
102 #define J6X0TP_FB_BOTTOM 900
105 * Bottom of the n'th hard icon (n = 1..4)
107 #define J6X0TP_HARD_ICON_MAX_Y(n) \
108 (J6X0TP_FB_TOP + ((J6X0TP_FB_BOTTOM - J6X0TP_FB_TOP) / 4) * (n))
111 struct j6x0tp_softc {
112 device_t sc_dev;
114 #define J6X0TP_WSMOUSE_ENABLED 0x01
115 #define J6X0TP_WSKBD_ENABLED 0x02
116 int sc_enabled;
118 int sc_hard_icon;
120 struct callout sc_touch_ch;
122 device_t sc_wsmousedev;
123 device_t sc_wskbddev;
125 struct tpcalib_softc sc_tpcalib; /* calibration info for wsmouse */
129 /* config machinery */
130 static int j6x0tp_match(device_t, cfdata_t, void *);
131 static void j6x0tp_attach(device_t, device_t, void *);
133 /* wsmouse accessops */
134 static int j6x0tp_wsmouse_enable(void *);
135 static int j6x0tp_wsmouse_ioctl(void *, u_long, void *, int, lwp_t *);
136 static void j6x0tp_wsmouse_disable(void *);
138 /* wskbd accessops */
139 static int j6x0tp_wskbd_enable(void *, int);
140 static void j6x0tp_wskbd_set_leds(void *, int);
141 static int j6x0tp_wskbd_ioctl(void *, u_long, void *, int, lwp_t *);
143 /* internal driver routines */
144 static void j6x0tp_enable(struct j6x0tp_softc *);
145 static void j6x0tp_disable(struct j6x0tp_softc *);
146 static int j6x0tp_enable_child(struct j6x0tp_softc *, int, int);
147 static int j6x0tp_intr(void *);
148 static void j6x0tp_start_polling(void *);
149 static void j6x0tp_stop_polling(struct j6x0tp_softc *);
150 static void j6x0tp_callout_wsmouse(void *);
151 static void j6x0tp_callout_wskbd(void *);
152 static void j6x0tp_wsmouse_input(struct j6x0tp_softc *, int, int);
153 static void j6x0tp_get_raw_xy(int *, int *);
154 static int j6x0tp_get_hard_icon(int, int);
157 static const struct wsmouse_accessops j6x0tp_accessops = {
158 j6x0tp_wsmouse_enable,
159 j6x0tp_wsmouse_ioctl,
160 j6x0tp_wsmouse_disable
163 static const struct wsmouse_calibcoords j6x0tp_default_calib = {
164 0, 0, 639, 239,
166 {{ J6X0TP_FB_LEFT, J6X0TP_FB_TOP, 0, 0 },
167 { J6X0TP_FB_RIGHT, J6X0TP_FB_TOP, 639, 0 },
168 { J6X0TP_FB_LEFT, J6X0TP_FB_BOTTOM, 0, 239 },
169 { J6X0TP_FB_RIGHT, J6X0TP_FB_BOTTOM, 639, 239 }}
172 static const struct wskbd_accessops j6x0tp_wskbd_accessops = {
173 j6x0tp_wskbd_enable,
174 j6x0tp_wskbd_set_leds,
175 j6x0tp_wskbd_ioctl
179 #ifndef J6X0TP_SETTINGS_ICON_KEYSYM
180 #define J6X0TP_SETTINGS_ICON_KEYSYM KS_Home
181 #endif
182 #ifndef J6X0TP_PGUP_ICON_KEYSYM
183 #define J6X0TP_PGUP_ICON_KEYSYM KS_Prior
184 #endif
185 #ifndef J6X0TP_PGDN_ICON_KEYSYM
186 #define J6X0TP_PGDN_ICON_KEYSYM KS_Next
187 #endif
188 #ifndef J6X0TP_SWITCH_ICON_KEYSYM
189 #define J6X0TP_SWITCH_ICON_KEYSYM KS_End
190 #endif
192 static const keysym_t j6x0tp_wskbd_keydesc[] = {
193 KS_KEYCODE(1), J6X0TP_SETTINGS_ICON_KEYSYM,
194 KS_KEYCODE(2), J6X0TP_PGUP_ICON_KEYSYM,
195 KS_KEYCODE(3), J6X0TP_PGDN_ICON_KEYSYM,
196 KS_KEYCODE(4), J6X0TP_SWITCH_ICON_KEYSYM
199 static const struct wscons_keydesc j6x0tp_wskbd_keydesctab[] = {
200 { KB_US, 0,
201 sizeof(j6x0tp_wskbd_keydesc)/sizeof(keysym_t),
202 j6x0tp_wskbd_keydesc
204 {0, 0, 0, 0}
207 static const struct wskbd_mapdata j6x0tp_wskbd_keymapdata = {
208 j6x0tp_wskbd_keydesctab, KB_US
212 CFATTACH_DECL_NEW(j6x0tp, sizeof(struct j6x0tp_softc),
213 j6x0tp_match, j6x0tp_attach, NULL, NULL);
216 static int
217 j6x0tp_match(device_t parent, cfdata_t cf, void *aux)
221 * XXX: platid_mask_MACH_HP_LX also matches 360LX. It's not
222 * confirmed whether touch panel in 360LX is connected this
223 * way. We may need to regroup platid masks.
225 if (!platid_match(&platid, &platid_mask_MACH_HP_JORNADA_6XX)
226 && !platid_match(&platid, &platid_mask_MACH_HP_LX))
227 return (0);
229 if (strcmp(cf->cf_name, "j6x0tp") != 0)
230 return (0);
232 return (1);
236 static void
237 j6x0tp_attach(device_t parent, device_t self, void *aux)
239 struct j6x0tp_softc *sc;
240 struct wsmousedev_attach_args wsma;
241 struct wskbddev_attach_args wska;
243 aprint_naive("\n");
244 aprint_normal("\n");
246 sc = device_private(self);
247 sc->sc_dev = self;
249 sc->sc_enabled = 0;
250 sc->sc_hard_icon = 0;
252 /* touch-panel as a pointing device */
253 wsma.accessops = &j6x0tp_accessops;
254 wsma.accesscookie = sc;
256 sc->sc_wsmousedev = config_found_ia(self, "wsmousedev", &wsma,
257 wsmousedevprint);
258 if (sc->sc_wsmousedev == NULL)
259 return;
261 /* on-screen "hard icons" as a keyboard device */
262 wska.console = 0;
263 wska.keymap = &j6x0tp_wskbd_keymapdata;
264 wska.accessops = &j6x0tp_wskbd_accessops;
265 wska.accesscookie = sc;
267 sc->sc_wskbddev = config_found_ia(self, "wskbddev", &wska,
268 wskbddevprint);
270 /* init calibration, set default parameters */
271 tpcalib_init(&sc->sc_tpcalib);
272 tpcalib_ioctl(&sc->sc_tpcalib, WSMOUSEIO_SCALIBCOORDS,
273 (void *)__UNCONST(&j6x0tp_default_calib), 0, 0);
275 /* used when in polling mode */
276 callout_init(&sc->sc_touch_ch, 0);
278 /* establish interrupt handler, but disable until opened */
279 intc_intr_establish(SH7709_INTEVT2_IRQ3, IST_EDGE, IPL_TTY,
280 j6x0tp_intr, sc);
281 intc_intr_disable(SH7709_INTEVT2_IRQ3);
283 if (!pmf_device_register(self, NULL, NULL))
284 aprint_error_dev(self, "unable to establish power handler\n");
289 * Enable touch panel: we start in interrupt mode.
290 * Must be called as spltty().
292 static void
293 j6x0tp_enable(struct j6x0tp_softc *sc)
296 DPRINTFN(2, ("%s: enable\n", device_xname(sc->sc_dev)));
297 intc_intr_enable(SH7709_INTEVT2_IRQ3);
302 * Disable touch panel: disable interrupt, cancel pending callout.
303 * Must be called as spltty().
305 static void
306 j6x0tp_disable(struct j6x0tp_softc *sc)
309 DPRINTFN(2, ("%s: disable\n", device_xname(sc->sc_dev)));
310 intc_intr_disable(SH7709_INTEVT2_IRQ3);
311 callout_stop(&sc->sc_touch_ch);
315 static int
316 j6x0tp_enable_child(struct j6x0tp_softc *sc, int child, int on)
318 int s = spltty();
320 if (on) {
321 if (!sc->sc_enabled)
322 j6x0tp_enable(sc);
323 sc->sc_enabled |= child;
324 } else {
325 sc->sc_enabled &= ~child;
326 if (!sc->sc_enabled)
327 j6x0tp_disable(sc);
330 splx(s);
331 return (0);
335 static int
336 j6x0tp_wsmouse_enable(void *arg)
338 struct j6x0tp_softc *sc = arg;
340 DPRINTFN(1, ("%s: wsmouse enable\n", device_xname(sc->sc_dev)));
341 return (j6x0tp_enable_child(sc, J6X0TP_WSMOUSE_ENABLED, 1));
345 static void
346 j6x0tp_wsmouse_disable(void *arg)
348 struct j6x0tp_softc *sc = arg;
350 DPRINTFN(1, ("%s: wsmouse disable\n", device_xname(sc->sc_dev)));
351 j6x0tp_enable_child(sc, J6X0TP_WSMOUSE_ENABLED, 0);
355 static int
356 j6x0tp_wskbd_enable(void *arg, int on)
358 struct j6x0tp_softc *sc = arg;
360 DPRINTFN(1, ("%s: wskbd %sable\n", device_xname(sc->sc_dev),
361 on ? "en" : "dis"));
362 return (j6x0tp_enable_child(sc, J6X0TP_WSKBD_ENABLED, on));
366 static int
367 j6x0tp_intr(void *arg)
369 struct j6x0tp_softc *sc = arg;
371 uint8_t irr0;
372 uint8_t phdr, touched;
373 unsigned int steady, tremor_timeout;
375 irr0 = _reg_read_1(SH7709_IRR0);
376 if ((irr0 & IRR0_IRQ3) == 0) {
377 #ifdef DIAGNOSTIC
378 printf("%s: irr0 %02x?\n", device_xname(sc->sc_dev), irr0);
379 #endif
380 return (0);
383 if (!sc->sc_enabled) {
384 DPRINTFN(1, ("%s: intr: !sc_enabled\n",
385 device_xname(sc->sc_dev)));
386 intc_intr_disable(SH7709_INTEVT2_IRQ3);
387 goto served;
392 * Number of times the "touched" bit should be read
393 * consecutively.
395 # define TREMOR_THRESHOLD 0x300
397 steady = 0;
398 tremor_timeout = TREMOR_THRESHOLD * 16; /* XXX: arbitrary */
399 touched = PHDR_TP_PEN_DOWN; /* we start with "touched" state */
401 do {
402 phdr = _reg_read_1(SH7709_PHDR);
404 if ((phdr & PHDR_TP_PEN_DOWN) == touched)
405 ++steady;
406 else {
407 steady = 0;
408 touched = phdr & PHDR_TP_PEN_DOWN;
411 if (--tremor_timeout == 0) {
412 DPRINTF(("%s: tremor timeout!\n",
413 device_xname(sc->sc_dev)));
414 goto served;
416 } while (steady < TREMOR_THRESHOLD);
418 if (touched) {
419 intc_intr_disable(SH7709_INTEVT2_IRQ3);
422 * ADC readings are not stable yet, so schedule
423 * callout instead of accessing ADC from the interrupt
424 * handler only to immediately delay().
426 callout_reset(&sc->sc_touch_ch, hz/32,
427 j6x0tp_start_polling, sc);
428 } else
429 DPRINTFN(1, ("%s: tremor\n", device_xname(sc->sc_dev)));
430 served:
431 /* clear the interrupt (XXX: protect access?) */
432 _reg_write_1(SH7709_IRR0, irr0 & ~IRR0_IRQ3);
434 return (1);
439 * Called from the interrupt handler at spltty() upon first touch.
440 * Decide if we are going to report this touch as a mouse click/drag
441 * or as a key press.
443 static void
444 j6x0tp_start_polling(void *arg)
446 struct j6x0tp_softc *sc = arg;
447 uint8_t phdr;
448 int do_mouse, do_kbd;
449 int rawx, rawy;
450 int icon;
452 phdr = _reg_read_1(SH7709_PHDR);
453 if ((phdr & PHDR_TP_PEN_DOWN) == 0) {
454 DPRINTFN(2, ("%s: start: pen is not down\n",
455 device_xname(sc->sc_dev)));
456 j6x0tp_stop_polling(sc);
459 j6x0tp_get_raw_xy(&rawx, &rawy);
460 DPRINTFN(2, ("%s: start: %4d %4d -> ",
461 device_xname(sc->sc_dev), rawx, rawy));
463 do_mouse = sc->sc_enabled & J6X0TP_WSMOUSE_ENABLED;
464 #ifdef J6X0TP_WSMOUSE_EXCLUSIVE
465 if (do_mouse)
466 do_kbd = 0;
467 else
468 #endif
469 do_kbd = sc->sc_enabled & J6X0TP_WSKBD_ENABLED;
471 icon = 0;
472 if (do_kbd)
473 icon = j6x0tp_get_hard_icon(rawx, rawy);
475 if (icon != 0) {
476 DPRINTFN(2, ("icon %d\n", icon));
477 sc->sc_hard_icon = icon;
478 wskbd_input(sc->sc_wskbddev, WSCONS_EVENT_KEY_DOWN, icon);
479 callout_reset(&sc->sc_touch_ch, hz/32,
480 j6x0tp_callout_wskbd, sc);
481 } else if (do_mouse) {
482 DPRINTFN(2, ("mouse\n"));
483 j6x0tp_wsmouse_input(sc, rawx, rawy);
484 callout_reset(&sc->sc_touch_ch, hz/32,
485 j6x0tp_callout_wsmouse, sc);
486 } else {
487 DPRINTFN(2, ("ignore\n"));
488 j6x0tp_stop_polling(sc);
494 * Re-enable touch panel interrupt.
495 * Called as spltty() when polling code detects pen-up.
497 static void
498 j6x0tp_stop_polling(struct j6x0tp_softc *sc)
500 uint8_t irr0;
502 DPRINTFN(2, ("%s: stop\n", device_xname(sc->sc_dev)));
504 /* clear pending interrupt signal before re-enabling the interrupt */
505 irr0 = _reg_read_1(SH7709_IRR0);
506 if ((irr0 & IRR0_IRQ3) != 0)
507 _reg_write_1(SH7709_IRR0, irr0 & ~IRR0_IRQ3);
509 intc_intr_enable(SH7709_INTEVT2_IRQ3);
514 * We are reporting this touch as a keyboard event.
515 * Poll touch screen waiting for pen-up.
517 static void
518 j6x0tp_callout_wskbd(void *arg)
520 struct j6x0tp_softc *sc = arg;
521 uint8_t phdr;
522 int s;
524 s = spltty();
526 if (!sc->sc_enabled) {
527 DPRINTFN(1, ("%s: wskbd callout: !sc_enabled\n",
528 device_xname(sc->sc_dev)));
529 splx(s);
530 return;
533 phdr = _reg_read_1(SH7709_PHDR);
534 if ((phdr & PHDR_TP_PEN_DOWN) != 0) {
536 * Pen is still down, continue polling. Wskbd's
537 * auto-repeat takes care of repeating the key.
539 callout_schedule(&sc->sc_touch_ch, hz/32);
540 } else {
541 wskbd_input(sc->sc_wskbddev,
542 WSCONS_EVENT_KEY_UP, sc->sc_hard_icon);
543 j6x0tp_stop_polling(sc);
545 splx(s);
550 * We are reporting this touch as a mouse click/drag.
552 static void
553 j6x0tp_callout_wsmouse(void *arg)
555 struct j6x0tp_softc *sc = arg;
556 uint8_t phdr;
557 int rawx, rawy;
558 int s;
560 s = spltty();
562 if (!sc->sc_enabled) {
563 DPRINTFN(1, ("%s: wsmouse callout: !sc_enabled\n",
564 device_xname(sc->sc_dev)));
565 splx(s);
566 return;
569 phdr = _reg_read_1(SH7709_PHDR);
570 if ((phdr & PHDR_TP_PEN_DOWN) != 0) {
571 j6x0tp_get_raw_xy(&rawx, &rawy);
572 j6x0tp_wsmouse_input(sc, rawx, rawy); /* mouse dragged */
573 callout_schedule(&sc->sc_touch_ch, hz/32);
574 } else {
575 wsmouse_input(sc->sc_wsmousedev, 0, 0, 0, 0, 0, /* button up */
576 WSMOUSE_INPUT_DELTA);
577 j6x0tp_stop_polling(sc);
579 splx(s);
584 * Report mouse click/drag.
586 static void
587 j6x0tp_wsmouse_input(struct j6x0tp_softc *sc, int rawx, int rawy)
589 int x, y;
591 tpcalib_trans(&sc->sc_tpcalib, rawx, rawy, &x, &y);
593 DPRINTFN(3, ("%s: %4d %4d -> %3d %3d\n",
594 device_xname(sc->sc_dev), rawx, rawy, x, y));
596 wsmouse_input(sc->sc_wsmousedev,
597 1, /* button */
598 x, y, 0, 0,
599 WSMOUSE_INPUT_ABSOLUTE_X | WSMOUSE_INPUT_ABSOLUTE_Y);
604 * Read raw X/Y coordinates from the ADC.
605 * XXX: protect accesses to SCPDR?
607 static void
608 j6x0tp_get_raw_xy(int *rawxp, int *rawyp)
610 uint8_t scpdr;
612 /* Y axis */
613 scpdr = _reg_read_1(SH7709_SCPDR);
614 scpdr |= SCPDR_TP_SCAN_ENABLE;
615 scpdr &= ~SCPDR_TP_SCAN_Y; /* pull low to scan */
616 _reg_write_1(SH7709_SCPDR, scpdr);
617 delay(10);
619 *rawyp = adc_sample_channel(ADC_CHANNEL_TP_Y);
621 /* X axis */
622 scpdr = _reg_read_1(SH7709_SCPDR);
623 scpdr |= SCPDR_TP_SCAN_Y;
624 scpdr &= ~SCPDR_TP_SCAN_X; /* pull low to scan */
625 _reg_write_1(SH7709_SCPDR, scpdr);
626 delay(10);
628 *rawxp = adc_sample_channel(ADC_CHANNEL_TP_X);
630 /* restore SCPDR */
631 scpdr = _reg_read_1(SH7709_SCPDR);
632 scpdr |= SCPDR_TP_SCAN_X;
633 scpdr &= ~SCPDR_TP_SCAN_ENABLE;
634 _reg_write_1(SH7709_SCPDR, scpdr);
639 * Check if the (rawx, rawy) is inside one of the 4 hard icons.
640 * Return the icon number 1..4, or 0 if not inside an icon.
642 static int
643 j6x0tp_get_hard_icon(int rawx, int rawy)
645 if (rawx <= J6X0TP_FB_RIGHT)
646 return (0);
648 if (rawy < J6X0TP_HARD_ICON_MAX_Y(1))
649 return (1);
650 else if (rawy < J6X0TP_HARD_ICON_MAX_Y(2))
651 return (2);
652 else if (rawy < J6X0TP_HARD_ICON_MAX_Y(3))
653 return (3);
654 else
655 return (4);
659 static int
660 j6x0tp_wsmouse_ioctl(void *arg, u_long cmd, void *data, int flag, lwp_t *l)
662 struct j6x0tp_softc *sc = arg;
664 return hpc_tpanel_ioctl(&sc->sc_tpcalib, cmd, data, flag, l);
668 static int
669 j6x0tp_wskbd_ioctl(void *arg, u_long cmd, void *data, int flag, lwp_t *l)
671 /* struct j6x0tp_softc *sc = arg; */
673 switch (cmd) {
674 case WSKBDIO_GTYPE:
675 *(int *)data = WSKBD_TYPE_HPC_BTN; /* may be use new type? */
676 return (0);
678 case WSKBDIO_GETLEDS:
679 *(int *)data = 0;
680 return (0);
682 default:
683 return (EPASSTHROUGH);
688 static void
689 j6x0tp_wskbd_set_leds(void *arg, int leds)
692 /* nothing to do*/
693 return;