Valeriy E. Ushakov | 18 Oct 2003 03:56
Picon

j6x0pwr driver

I have commited to -current 'adc' driver for sh7709 analog->digital
converter and 'j6x0pwr' driver that uses adc to retrieve the charge of
Jornada 680 batteries.

	adc*		at shb?
	j6x0pwr*	at adc?

j6x0pwr doesn't do much useful at the moment, but it provides
RTFS-level documentation on how power-related things are wired in
Jornada. ;)

It listens to "switch off" interrupt generated when On/Off button is
pressed, or the lid is closed.  It cannot really do anything with
those yet (netbsd kernel doesn't support software suspend).

It polls each 5 seconds the status of main and backup batteries and
warns if main battery is low.

You can tweak j6x0pwr_poll_verbose variable from DDB to make it print
current status on each poll.

I gonna work on the touch-panel support next, as after some reverse
engineering I know how it's connected to the ADC and PFC.  I already
have sample code that reports useful values, but I need to polish it
and plug it into the rest of the system (calibration, wsmouse, &c).

SY, Uwe
--

-- 
uwe <at> ptc.spbu.ru                         |       Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/            |       Ist zu Grunde gehen
(Continue reading)

Valeriy E. Ushakov | 19 Oct 2003 04:36
Picon

j6x0tp - driver for Jornada 680 touch screen

On Sat, Oct 18, 2003 at 05:56:27 +0400, Valeriy E. Ushakov wrote:

> I gonna work on the touch-panel support next, as after some reverse
> engineering I know how it's connected to the ADC and PFC.  I already
> have sample code that reports useful values, but I need to polish it
> and plug it into the rest of the system (calibration, wsmouse, &c).

Committed, though not tested much (at least od /dev/wsmouse looks
sane).

To use it, add this to your kernel config:

adc*		at shb?		# analog->digital converter

j6x0tp*		at adc?		# touch panel
wsmouse*	at j6x0tp? mux 0

The driver has default calibration info hardcoded.  You can use
tpctl(8) to recalibrate it.  Don't forget tpctl=YES in rc.conf to get
that calibration data loaded on startup.  However it seems tpctl(8)
cannot quite cope with upper-left corner margins, so its calibration
will be a bit skewed.

You can frob j6x0tp_debug from DDB, setting it to 3 will spam you with
debugging info about coordinates conversion.

Please, report any problems.

SY, Uwe
--

-- 
(Continue reading)

Valeriy E. Ushakov | 19 Oct 2003 18:57
Picon

Re: j6x0tp - driver for Jornada 680 touch screen

[Since that was a private reply, but I feel that the topic is of
general interest, I took the liberty of replying to the list, but wtih
quote attribution dropped]

On Sun, Oct 19, 2003  [name withheld] wrote:

> great news for hp680 but! in order for touchscreen to work you need
> a gui graphic which the hpsh distro lacks

Well, that's sort of a chicken and egg problem.  There was no attempts
at GUI *because* there was no touch screen support.

I think Xhpc server might just work without any hacking, as it just
uses only wscons.

I'm also thinking if MicroGUI (or NanoX, i think they merged, but i
forgot how the merged code base is named) or qt/embedded might be a
better choice.

Well, actually hpcsh port still needs my gcc3 hackery to get
committed, as with static only world having GUI is not practical due
to sheer size of all the binaries.  But that's the reason I uploaded a
gcc3 snapshot, so that people have a working and compact dynamic
userland and can try compiling stuff for it.

http://www.microwindows.org/

http://www.trolltech.com/download/qt/embedded.html
http://www.trolltech.com/download/qtopia/index.html

(Continue reading)

Valeriy E. Ushakov | 23 Oct 2003 01:06
Picon

Swapping the order hd64461pcmcia channels are attached

I'd like to commit a trivial patch that makes the order in which
hd64461pcmcia attaches its channels controlled with an option.  The
ordering make a difference when you boot with two CF cards in both
PCMCIA and CF slots.

I usually keep the NetBSD CF card in the CF slot, so that the PCMCIA
slot is free for ethernet/modem/wifi/cf cards.  It also helps to avoid
the stress on the CF slot door (I've almost lost one of the latches,
fortunately, i noticed it, and before the latch got lost, glued it
back).  I can get new kernels/programs via network and install them on
the NetBSD CF card, while running NetBSD on the device.

Occasionally, when I do "dangerous" hacking that make the system
unstable and often unbootable to multiuser, I install things onto
NetBSD CF on my laptop and shuttle the CF card (in the PCMCIA adaptor)
between the laptop and the PCMCIA slot of the Jornada.

In both cases the single CF attaches as wd0, as when the NetBSD CF is
in the PCMCIA slot (i.e. I'm in the hacking/experimental mode), the CF
slot is empty.

However if in "normal use" mode (NetBSD CF is in the CF slot) I want
to boot with another CF card in the PCMCIA slot - there's a problem.

Since PCMCIA slot is channel 0 (that is attached first, the CF in this
slot will be attached as wd0 (unless you use fixed unit numbers in
config file, but that's not convenient, see the usage pattern
described above) and the NetBSD CF in the CF slot - as wd1.  And the
system will get confused, as fstab tells it to pick the root from wd0.

(Continue reading)

David Brownlee | 23 Oct 2003 14:17
Picon

Re: Swapping the order hd64461pcmcia channels are attached

On Thu, 23 Oct 2003, Valeriy E. Ushakov wrote:

> I'd like to commit a trivial patch that makes the order in which
> hd64461pcmcia attaches its channels controlled with an option.  The
> ordering make a difference when you boot with two CF cards in both
> PCMCIA and CF slots.

	Can't you just specify in the kernel config:

wd0     at wdc? channel ? drive 1 flags 0x0000
wd1     at wdc? channel ? drive 0 flags 0x0000
wd*     at wdc? channel ? drive ? flags 0x0000

--

-- 
		David/absolute          -- www.netbsd.org: No hype required --

Valeriy E. Ushakov | 23 Oct 2003 14:32
Picon

Re: Swapping the order hd64461pcmcia channels are attached

On Thu, Oct 23, 2003 at 13:17:51 +0100, David Brownlee wrote:

> On Thu, 23 Oct 2003, Valeriy E. Ushakov wrote:
> 
> > I'd like to commit a trivial patch that makes the order in which
> > hd64461pcmcia attaches its channels controlled with an option.  The
> > ordering make a difference when you boot with two CF cards in both
> > PCMCIA and CF slots.
> 
> 	Can't you just specify in the kernel config:
> 
> wd0     at wdc? channel ? drive 1 flags 0x0000
> wd1     at wdc? channel ? drive 0 flags 0x0000
> wd*     at wdc? channel ? drive ? flags 0x0000

No.  I explained why it's not convenient to fix units numbers.

Currently the config file looks like:

# PCMCIA bus support
pcmcia0 at hd64461pcmcia? controller 0 socket ? # I/O card, memory card
pcmcia1 at hd64461pcmcia? controller 1 socket ? # memory card only

# PCMCIA IDE disk
wdc0	at pcmcia1 function ?		# prefer CF slot as wdc0
wdc1	at pcmcia0 function ?		# pcmcia slot

# ATA (IDE) bus support
#atabus* at ata?
atabus0 at wdc0 channel ?		# preserve ordering
(Continue reading)


Gmane