Home | History | Annotate | Download | only in dev
History log of /src/sys/arch/hpcarm/dev/j720ssp.c
RevisionDateAuthorComments
 1.34  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.33  24-Apr-2021  thorpej branches: 1.33.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.32  29-May-2009  rjs branches: 1.32.78;
Make the following changes:

struct device * -> device_t
struct cfdata * -> cfdata_t
printf -> aprint_
device_t/softc split
 1.31  28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.30  27-Jun-2006  peter branches: 1.30.58; 1.30.60; 1.30.62;
Hide the bit invertion/shifting of values received from and send to the MCU
inside the j720ssp_readwrite function. This simplifies the calls to this
function a little.
 1.29  04-Mar-2006  peter branches: 1.29.2; 1.29.10;
Split the Jornada 7xx drivers for the touch-panel, keyboard, lcd control
and power management into multiple files. This removes some dirty hacks
and improves the quality of the code.

- j720kbd.c - keyboard driver
* Converted to use the hpckbd(4) interface.
* Remove the old keymap file since it's no longer used.

- j720lcd.c - lcd brightness/control/power control

- j720pwr.c - power management
* Converted to use the hpcapm(4) interface.
* Fix the battery charge status. The values are non-linear so in order
to display a reasonable charge status we use a few charge points in
a table and interpolate between that.

- j720tp.c - touch-panel driver

- j720ssp.c - SSP port (on the SA-1110)

Many thanks to cube@ and uwe@ for providing useful feedback and reviewing
the changes.
 1.28  11-Dec-2005  christos branches: 1.28.4; 1.28.6;
merge ktrace-lwp.
 1.27  10-Nov-2005  peter Add an obviously missing break in a switch statement.
Adjusting brightness and contrast now works!
 1.26  23-Oct-2005  peter Add a dummy WSKBDIO_GETLEDS, to make "wsconsctl -ka" work.
 1.25  23-Oct-2005  peter Remove the DEBUG define, this should be set in the config file.
 1.24  28-Jun-2005  drochner branches: 1.24.2; 1.24.4;
convert remaining autoconf bus "submatch" functions to use the new
signature (passing locators), and remove some which obviously don't
serve any purpose
(untested, sorry)
 1.23  02-Jun-2005  uwe Use __UNCONST to pass default calibration data to tpcalib_ioctl().
 1.22  28-May-2004  tsarna Refactor tpcalib and hpc* ports to make tpcalib MI, as discussed on tech-kern.
 1.21  27-Oct-2003  mycroft Add a default: to a case statement.
 1.20  27-Oct-2003  mycroft In j720ssp_kthread(), move the tsleep() to the end of the loop.
 1.19  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.18  15-Jul-2003  lukem __KERNEL_RCSID()
 1.17  03-Jan-2003  takemura branches: 1.17.2;
Added new ioctl command, WSMOUSEIO_GETID to tell touch panel identifier
for tpctl(8).
 1.16  07-Nov-2002  manu Removed debug messages
 1.15  05-Oct-2002  chs add missing protos.
 1.14  02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.13  29-Sep-2002  bsh avoid warning when NAPM==0
 1.12  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.11  27-Sep-2002  thorpej Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver. The cfdriver is then looked
up in a list which is built at run-time.
 1.10  18-Sep-2002  manu - missing bits of apm
- KNF
 1.9  13-Sep-2002  manu fix touchpanel broken behavior:
- when moving the stylus, the cursor was updated only when the screen was
released
- when moving the stylus for too long, the kernel crashed

This was caused by improper delays in SSP read and write, and by interrupt
hammering while the screen is touched). Both led to the machine handling
interrupts all the time and been unable to schedule the X server, therefore
the lack of cursor refresh.

The problem is fixed by
- masking touchpanel interrupts as soon as we are already handling them
- creating a kernel thread (j720ssp) that takes care of keyboard and
touchpanel I/O, instead of doing it in a softintr.
- reducing delays in j720ssp_readwrite operations from 5ms to 0.1ms.

NB: If the delay in j720ssp_readwrite operation is lowered to 0.1, then
switching on the screen using the power key pushes brightness to maximum.
In order to avoid this, we introduce a wait argument to j720ssp_readwrite,
which specify how many microseconds we have to wait. j720ssp_readwrite is
called with wait = 100 everywhere except in j720lcdparam where it is called
with wait = 500. That way it works.
 1.8  22-Jul-2002  manu Implements WSKBDIO_GTYPE
 1.7  19-Jul-2002  ichiro move sa11x0 to under arch/arm
make compile
 1.6  19-Jul-2002  toshii Support jornada720 touchpanel.
 1.5  17-Mar-2002  atatat branches: 1.5.4;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.4  02-Feb-2002  uch bootinfo.h, config_hook.h, platid.h are moved to hpc/include
 1.3  28-Dec-2001  toshii Allow jornada720 LCD and keyboard to be used as a boot console.
 1.2  29-Jun-2001  toshii branches: 1.2.2; 1.2.8;
Fix autoconf related botch: do printf("\n") in attach funcs rather than
in cfprint.
 1.1  23-Jun-2001  toshii Add support for jornada720 keyboard and some LCD parameter controls.
The code is somewhat incomplete, but is quite functional.
 1.2.8.9  07-Jan-2003  thorpej Sync with HEAD.
 1.2.8.8  11-Nov-2002  nathanw Catch up to -current
 1.2.8.7  18-Oct-2002  nathanw Catch up to -current.
 1.2.8.6  17-Sep-2002  nathanw Catch up to -current.
 1.2.8.5  01-Aug-2002  nathanw Catch up to -current.
 1.2.8.4  01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.8.3  28-Feb-2002  nathanw Catch up to -current.
 1.2.8.2  08-Jan-2002  nathanw Catch up to -current.
 1.2.8.1  29-Jun-2001  nathanw file j720ssp.c was added on branch nathanw_sa on 2002-01-08 00:24:51 +0000
 1.2.2.5  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.2.4  06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.2.3  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.2  11-Feb-2002  jdolecek Sync w/ -current.
 1.2.2.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.4.2  31-Aug-2002  gehenna catch up with -current.
 1.5.4.1  21-Jul-2002  gehenna catch up with -current.
 1.17.2.6  11-Dec-2005  christos Sync with head.
 1.17.2.5  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.17.2.4  24-Jan-2005  skrll Adapt to branch.
 1.17.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.17.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.17.2.1  03-Aug-2004  skrll Sync with HEAD
 1.24.4.1  26-Oct-2005  yamt sync with head
 1.24.2.2  30-Dec-2006  yamt sync with head.
 1.24.2.1  21-Jun-2006  yamt sync with head.
 1.28.6.1  22-Apr-2006  simonb Sync with head.
 1.28.4.1  09-Sep-2006  rpaulo sync with head
 1.29.10.1  13-Jul-2006  gdamore Merge from HEAD.
 1.29.2.1  11-Aug-2006  yamt sync with head
 1.30.62.2  20-Jun-2009  yamt sync with head
 1.30.62.1  16-May-2008  yamt sync with head.
 1.30.60.1  18-May-2008  yamt sync with head.
 1.30.58.1  02-Jun-2008  mjf Sync with HEAD.
 1.32.78.6  05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.32.78.5  05-Apr-2021  thorpej config_match() -> config_probe() for the straight-forward indirect config
cases. There are still a few odd balls using config_match() which should
be sorted out later.
 1.32.78.4  04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.32.78.3  03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.32.78.2  21-Mar-2021  thorpej CFARG_IATTR usage audit:

If a device carries only one interface attribute, there is no need
to specify it when calling config_search(); that specification is
meant only to disambiguate which interface attribute (which is a
proxy for "what kind of attach args are being used") is having
children attached. cfparent_match() will take care of ensuring that
any potential children can attach to one of the parent's iterface
attributes, and if the parent only carries one, no disambiguation is
necessary.
 1.32.78.1  20-Mar-2021  thorpej The proliferation if config_search_*() and config_found_*() combinations
is a little absurd, so begin to tidy this up:

- Introduce a new cfarg_t enumerated type, that defines the types of
tag-value variadic arguments that can be passed to the various
config_*() functions (CFARG_SUBMATCH, CFARG_IATTR, and CFARG_LOCATORS,
for now, plus a CFARG_EOL sentinel).
- Collapse config_search_*() into config_search() that takes these
variadic arguments.
- Convert all call sites of config_search_*() to the new signature.
Noticed several incorrect usages along the way, which will be
audited in a future commit.
 1.33.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed