The NetBSD Project

CVS log for src/sys/dev/ic/apple_smc.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / dev / ic

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.9 / (download) - annotate - [select for diffs], Tue Aug 8 05:20:14 2023 UTC (6 months, 2 weeks ago) by mrg
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)

fix array vs pointer function declaration.

also, in some callers, and make sure to provide all the accessed
backing for a string array.

found by GCC 12.

Revision 1.8 / (download) - annotate - [select for diffs], Sat Aug 7 16:19:12 2021 UTC (2 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, netbsd-10-base, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.7: +4 -6 lines
Diff to previous 1.7 (colored)

Merge thorpej-cfargs2.

Revision 1.7.8.1 / (download) - annotate - [select for diffs], Wed Aug 4 20:14:42 2021 UTC (2 years, 6 months ago) by thorpej
Branch: thorpej-cfargs2
Changes since 1.7: +4 -6 lines
Diff to previous 1.7 (colored) next main 1.8 (colored)

Adapt to CFARGS().

Revision 1.7 / (download) - annotate - [select for diffs], Sat Apr 24 23:36:55 2021 UTC (2 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: thorpej-cfargs2
Changes since 1.6: +10 -7 lines
Diff to previous 1.6 (colored)

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?).

Revision 1.6.50.5 / (download) - annotate - [select for diffs], Mon Apr 5 00:48:54 2021 UTC (2 years, 10 months ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.6.50.4: +3 -3 lines
Diff to previous 1.6.50.4 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored)

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.

Revision 1.6.50.4 / (download) - annotate - [select for diffs], Sun Apr 4 22:01:22 2021 UTC (2 years, 10 months ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.6.50.3: +3 -3 lines
Diff to previous 1.6.50.3 (colored) to branchpoint 1.6 (colored)

CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.

Revision 1.6.50.3 / (download) - annotate - [select for diffs], Sat Apr 3 06:54:29 2021 UTC (2 years, 10 months ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.6.50.2: +5 -3 lines
Diff to previous 1.6.50.2 (colored) to branchpoint 1.6 (colored)

config_attach_loc() -> config_attach() with CFARG_LOCATORS argument.

Revision 1.6.50.2 / (download) - annotate - [select for diffs], Sun Mar 28 20:25:44 2021 UTC (2 years, 10 months ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.6.50.1: +3 -5 lines
Diff to previous 1.6.50.1 (colored) to branchpoint 1.6 (colored)

This driver only has a single interface attribute, so no need to be expicit
about it.  That interface attribute has no locators, so don't pass them
to config_search().

Revision 1.6.50.1 / (download) - annotate - [select for diffs], Sat Mar 20 19:33:40 2021 UTC (2 years, 11 months ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.6: +7 -4 lines
Diff to previous 1.6 (colored)

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.

Revision 1.6.8.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:03:37 2014 UTC (9 years, 6 months ago) by tls
Branch: tls-maxphys
Changes since 1.6.8.1: +638 -0 lines
Diff to previous 1.6.8.1 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.5.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:54:52 2014 UTC (9 years, 6 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.5: +9 -4 lines
Diff to previous 1.5 (colored) next main 1.6 (colored)

Rebase.

Revision 1.6.4.2 / (download) - annotate - [select for diffs], Thu May 22 11:40:21 2014 UTC (9 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.6.4.1: +638 -0 lines
Diff to previous 1.6.4.1 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored)

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")

Revision 1.6.2.2 / (download) - annotate - [select for diffs], Sun May 18 17:45:37 2014 UTC (9 years, 9 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.6.2.1: +638 -0 lines
Diff to previous 1.6.2.1 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored)

sync with head

Revision 1.6.8.1, Fri Apr 25 23:54:59 2014 UTC (9 years, 10 months ago) by tls
Branch: tls-maxphys
Changes since 1.6: +0 -638 lines
FILE REMOVED

file apple_smc.c was added on branch tls-maxphys on 2014-08-20 00:03:37 +0000

Revision 1.6.4.1, Fri Apr 25 23:54:59 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.6: +0 -638 lines
FILE REMOVED

file apple_smc.c was added on branch yamt-pagecache on 2014-05-22 11:40:21 +0000

Revision 1.6.2.1, Fri Apr 25 23:54:59 2014 UTC (9 years, 10 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.6: +0 -638 lines
FILE REMOVED

file apple_smc.c was added on branch rmind-smpnet on 2014-05-18 17:45:37 +0000

Revision 1.6 / (download) - annotate - [select for diffs], Fri Apr 25 23:54:59 2014 UTC (9 years, 10 months ago) by riastradh
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base-20171202, tls-maxphys-base, tls-earlyentropy-base, thorpej-futex-base, thorpej-futex, thorpej-cfargs-base, rmind-smpnet-nbase, rmind-smpnet-base, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base, nick-nhusb, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, jdolecek-ncqfixes-base, jdolecek-ncqfixes, jdolecek-ncq-base, jdolecek-ncq, isaki-audio2-base, isaki-audio2, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Branch point for: yamt-pagecache, tls-maxphys, thorpej-cfargs, rmind-smpnet
Changes since 1.5: +9 -4 lines
Diff to previous 1.5 (colored)

Fix binary search logic.

Doesn't matter for the one user of this, but still.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Apr 1 17:49:17 2014 UTC (9 years, 10 months ago) by riastradh
Branch: MAIN
CVS Tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15
Branch point for: tls-earlyentropy
Changes since 1.4: +1 -1 lines
Diff to previous 1.4 (colored)

Fix copypasta error in apple_smc_write_key_4: uint32_t, not uint16_t.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Apr 1 17:49:05 2014 UTC (9 years, 10 months ago) by riastradh
Branch: MAIN
Changes since 1.3: +80 -15 lines
Diff to previous 1.3 (colored)

Polish the Apple SMC code with commentary and little fixes.

Revision 1.3 / (download) - annotate - [select for diffs], Tue Apr 1 17:48:52 2014 UTC (9 years, 10 months ago) by riastradh
Branch: MAIN
Changes since 1.2: +42 -232 lines
Diff to previous 1.2 (colored)

Rework Apple SMC device attachment goo again.

Less bookkeeping at the expense of iteration over all devices when
rescanning applesmc.

Revision 1.2 / (download) - annotate - [select for diffs], Tue Apr 1 17:48:39 2014 UTC (9 years, 10 months ago) by riastradh
Branch: MAIN
Changes since 1.1: +274 -40 lines
Diff to previous 1.1 (colored)

Rework Apple SMC attachment goo and split into multiple modules.

The four modules are apple_smc for the core functions, apple_smc_acpi
for attachment at acpi, and apple_smc_fan & apple_smc_temp for stuff
on the SMC.

Seems like there's a lot more bookkeeping necessary to maintain
children of an applesmc device implemented by loadable modules.
Maybe there's a better way I just haven't figured out yet.

Revision 1.1 / (download) - annotate - [select for diffs], Tue Apr 1 17:47:36 2014 UTC (9 years, 10 months ago) by riastradh
Branch: MAIN

First draft of drivers for the Apple System Management Controller.

Device interface derived by reading the Linux driver source code and
<http:///www.parhelia.ch/blog/statics/k3_keys.html> as of 2012-12-05.

Includes support for attaching fan and temperature sensors to sysmon.
No accelerometer yet.

Compile-tested only, based on some run-testing of experiments from
userland.  Module attachment is not quite finished, so it won't work
yet.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>