Home | History | Annotate | Download | only in dev
History log of /src/sys/arch/mac68k/dev/pm_direct.c
RevisionDateAuthorComments
 1.43  14-May-2025  nat Add sysctls for brightness control of PowerBook LCD screens.

Manual page description of these will be in a follow up commit.
 1.42  12-May-2025  nat Expose power manager type and defines.

These will be used by ascaudio(4) in future for setting up the Digitally
Filtered Audio Chip (dafc) on PowerBook 500 and similar.

NFCI.
 1.41  06-May-2025  nat Lessen the number of times a second the slider thread runs.

Four times a second is plenty and it's still nice and responsive.
 1.40  01-May-2025  nat Support the brightness slider on PowerBook 1xx series.
Update copyright.
 1.39  01-May-2025  nat Use the right location for powering off the PowerBook.

The previous location would only power off the computer if the AC adaptor was
connected.
 1.38  03-Apr-2025  nat Serialize pm requests.

Now with pbbat(4) added there is more than one caller to the power manager.
So serialize the requests with a lock.
 1.37  12-Jan-2025  nat Fix brightness controls on PowerBook 500 and similar.
 1.36  26-Sep-2024  riastradh mac68k/dev/pm_direct.c: Nix trailing whitespace.

No functional change intended.
 1.35  14-Sep-2024  nat Add support for the power button on the PowerBook 160/180.
 1.34  14-Sep-2024  nat Add support for poweroff on PowerBook 1xx.

This excludes the PowerBook 150 and 190, which are more similar to the 500
series.
 1.33  14-Sep-2024  nat Add support for brightness control on Powerbook 1xx.
 1.32  02-Jun-2024  andvar branches: 1.32.2;
fix various typos in word `interrupt', mainly in comments.
 1.31  26-Apr-2024  nat Return early if PM data is not available.

This avoids random crashes on my Powerbook when using the mouse or keyboard.

The same was needed for the Powerbook 5xx/Duos (compile tested only).

XXX pullup-10, pullup-9, pullup-8.
 1.30  21-Aug-2021  andvar branches: 1.30.4;
fix some more typos in comments/log messages, improve wording as well.
 1.29  25-Oct-2013  martin branches: 1.29.34;
Remove unused variables
 1.28  24-Jan-2007  hubertf branches: 1.28.82; 1.28.92; 1.28.98;
Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

To verify that no nasty side effects of duplicate includes (or their
removal) have an effect here, I've compiled an i386/ALL kernel with
and without the patch, and the only difference in the resulting .o
files was in shifted line numbers in some assert() calls.
The comparison of the .o files was based on the output of "objdump -D".

Thanks to martin@ for the input on testing.
 1.27  24-Dec-2005  perry branches: 1.27.20;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.26  11-Dec-2005  christos merge ktrace-lwp.
 1.25  28-Oct-2005  christos PR/31942: Hauke Fath: -current DEBUG kernel build fails because of gcc whining
 1.24  16-Jun-2005  jmc branches: 1.24.2; 1.24.4;
Shadowing and const fixes.
 1.23  15-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*.
 1.22  15-Jul-2003  lukem __KERNEL_RCSID()
 1.21  03-Nov-2002  shiba branches: 1.21.6;
Support internal ADB keyboard of PowerBook 190,190cs.
The keyboard works fine now. I don't confirm working internal
ADB track pad.

But an internal IDE drive is not recognized, and
an internal SCSI host controller(sbc driver) don't work yet.
 1.20  30-May-2002  thorpej Don't use multi-line string literals.
 1.19  05-Mar-2002  shiba branches: 1.19.6;
Fix up a bug which PB150 shuts down when one boots up in progress.
PB150 will work with SCSI disk. But we cannot use an internal IDE
disk yet.

Reviewed by briggs
 1.18  20-Nov-2001  chs prepare for ELF:
- add "%" prefix to register names in assembly code.
- use _C_LABEL() where necessary.
- use packed structures where necessary to match the old ABI.
 1.17  16-Sep-2001  wiz branches: 1.17.4;
Grammar improvements in comments.
 1.16  16-Sep-2001  wiz Spell 'occurred' with two 'r's.
 1.15  27-Sep-2000  scottr branches: 1.15.2; 1.15.4;
The Duo ADB controller doesn't notify us that it needs to be polled
through the (emulated) VIA. Work around this problem by polling the
Power Manager chip directly. From Daishi Kato, PR 9852.
 1.14  03-Jul-2000  scottr Stabilize ADB support for some non-Apple ADB peripherals. This is the
second (and final) part of the fix for PR 10086. (There are no longer
any infinite-wait busy loops in the ADB driver!)
 1.13  05-Apr-2000  scottr branches: 1.13.4;
Correct a pasto in pm_pmgrop_pm1(); while there were no negative side
effects, the place this code ended up couldn't have had any positive
effect, either.
 1.12  05-Apr-2000  scottr Correct a few instances where we returned from a function that
had set splhigh() but returned without restoring the previous spl.
The PowerBook keyboard works better, now, but still starts to flake
out pretty badly at 70+ wpm.
 1.11  19-Mar-2000  scottr Add and use macros to build ADB FLUSH, LISTEN, and TALK commands.
 1.10  07-Nov-1999  scottr ite_polling -> adb_polling
 1.9  28-Jun-1999  briggs branches: 1.9.2; 1.9.4; 1.9.8;
Unfortunately, several changes that are intermingled:
- Add initial IOP support. ADB doesn't work yet for me, but it's here so
that others will be encouraged to work on it. ADB_HW_IOP basically
is configured as a NOP so that serial consoles will continue to work.
- Roll via1_intr and via2_intr into the intr.c scheme--this also required
changing rtclock_intr to grovel the stack differently so that hardclock
gets the right arguments and softclock() doesn't get all reentrant.
- Make via1 interrupts parallel to via2 interrupts--handlers get a pass-
through pointer and we can register handlers. Register via1 interrupt
with intr_establish()--normally level 1, level 6 for A/UX scheme.
- Use intr_establish() to set real via2 interrupt handler instead of the
hacked function pointer.
- Reorganize adb-direct interrupts so that a function call is removed.
- Implement A/UX interrupts for all Quadras right now. We may need to
special case some Quadras, but Linux folks are reporting success on
several models.
- Fix intrnames to be accurate for the normal, PSC, and A/UX interrupt
configurations.
 1.8  05-Mar-1999  scottr branches: 1.8.2; 1.8.4; 1.8.6;
Add the PowerBook 170 to what appears to be the correct
class of systems, based on the Apple dev notes for this system.
 1.7  23-Oct-1998  ender New ADB "bus" interface:
o Separate ms and kbd drivers
o aed device for compatibility
o debug message cleanup in hardware direct support (from scottr)
 1.6  12-Aug-1998  scottr New framework for handling processor interrupts, derived in part from
the hp300 port.

- Interrupts 3-6 use this immediately. Interrupt 7 is a special case,
and the VIA interrupts (1 and 2) will be addressed when that code is
rototilled.

- Modify the zs front end to register with the appropriate interrupt
controller: through the PSC on the AV Quadras, and direct to
interrupt 4 on the rest. Arrange to have the appropriate zsc_softc
supplied to us at interrupt time.

- Modify the direct ADB driver (and its PowerManager cousin) to call
intr_dispatch(), rather than zshard(). XXX This is a kludge, but at
least limits the brokenness to the ADB drivers, now.

As a side effect, this should fix PR 5590. Thanks to Bill Studenmund for
correctly determining the cause of the problem reported there.
 1.5  29-Mar-1998  scottr Better integration of Power Manager IC ADB driver into the direct ADB driver framework,
from Takashi Hamada. Also includes a handler for unsolicited ADB
packets.
 1.4  23-Feb-1998  scottr Mostly KNF. There's still a bunch of ugly comments and some problems
with long lines, but this is at least a big step in the right direction.
 1.3  21-Feb-1998  scottr Unify ADB options and place them all into opt_adb.h. Provide a knob to
enable ADB debugging messages if ADB_DEBUG is configured.
 1.2  11-Aug-1997  scottr Make #include directives consistent. All MD headers are of the form:

#include <mac68k/{dev,mac68k}/foo.h>
 1.1  08-Apr-1997  scottr branches: 1.1.4;
Power Manager interface/driver, written by Takashi Hamada.
 1.1.4.1  23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.8.6.1  01-Jul-1999  thorpej Sync w/ -current.
 1.8.4.1  21-Nov-1999  he Pull up revision 1.10 (requested by sr):
Clean up the ADB driver, and eliminate duplicate keystrokes under
heavy load, fixing PR#7870.
 1.8.2.4  09-Nov-1999  scottr Sync with main branch.
 1.8.2.3  02-Nov-1999  scottr [Redo] Sync with main branch.
 1.8.2.2  05-Mar-1999  scottr checkpoint: input side code should work. no output side yet.
 1.8.2.1  05-Mar-1999  scottr file pm_direct.c was added on branch scottr-mac68k-wscons on 1999-03-05 08:24:25 +0000
 1.9.8.1  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.9.4.1  15-Nov-1999  fvdl Sync with -current
 1.9.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.13.4.2  28-Sep-2000  scottr Pull up rev 1.15 from scottr (approved by thorpej):
On the Duo, poll the Power Manager directly rather than waiting
for the VIA to indicate that the PM has data queued.
 1.13.4.1  21-Sep-2000  scottr Pull up rev 1.14 from scottr:
Stabilize ADB support for some non-Apple ADB peripherals.
 1.15.4.3  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.15.4.2  16-Mar-2002  jdolecek Catch up with -current.
 1.15.4.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.15.2.1  01-Oct-2001  fvdl Catch up with -current.
 1.17.4.5  11-Nov-2002  nathanw Catch up to -current
 1.17.4.4  20-Jun-2002  nathanw Catch up to -current.
 1.17.4.3  01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.17.4.2  08-Jan-2002  nathanw Catch up to -current.
 1.17.4.1  16-Sep-2001  nathanw file pm_direct.c was added on branch nathanw_sa on 2002-01-08 00:26:00 +0000
 1.19.6.1  14-Jul-2002  gehenna catch up with -current.
 1.21.6.5  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.21.6.4  17-Jan-2005  skrll Sync with HEAD.
 1.21.6.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.21.6.2  18-Sep-2004  skrll Sync with HEAD.
 1.21.6.1  03-Aug-2004  skrll Sync with HEAD
 1.24.4.1  02-Nov-2005  yamt sync with head.
 1.24.2.2  26-Feb-2007  yamt sync with head.
 1.24.2.1  21-Jun-2006  yamt sync with head.
 1.27.20.1  01-Feb-2007  ad Sync with head.
 1.28.98.1  18-May-2014  rmind sync with head
 1.28.92.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.28.82.1  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.29.34.1  11-May-2024  martin Pull up following revision(s) (requested by nat in ticket #1839):

sys/arch/mac68k/dev/pm_direct.c: revision 1.31

Return early if PM data is not available.

This avoids random crashes on my Powerbook when using the mouse or keyboard.

The same was needed for the Powerbook 5xx/Duos (compile tested only).
 1.30.4.1  11-May-2024  martin Pull up following revision(s) (requested by nat in ticket #686):

sys/arch/mac68k/dev/pm_direct.c: revision 1.31

Return early if PM data is not available.

This avoids random crashes on my Powerbook when using the mouse or keyboard.

The same was needed for the Powerbook 5xx/Duos (compile tested only).
 1.32.2.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed