aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/asmc
Commit message (Collapse)AuthorAgeFilesLines
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-231-2/+0
| | | | | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/ Similar commit in current: (cherry picked from commit 685dc743dc3b)
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-231-2/+0
| | | | | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/ Similar commit in current: (cherry picked from commit 95ee2897e98f)
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-07-252-2/+2
| | | | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix (cherry picked from commit 4d846d260e2b9a3d4d0a701462568268cbfe7a5b)
* asmc: Add support for MacBookPro6,2ed crowe2022-08-082-1/+49
| | | | | | | | | | | Modify asmc_sms_printintr() to be silent when the ambient light sensor interrupt fires on this model, since the messages can otherwise fill up the dmesg. PR: 265005 Reviewed by: markj (cherry picked from commit 3416f5cde7a7e01b25b5f5fd240ae8aa12fd70bf)
* asmc: Update Mac Pro 6 sensor definitionsAdam S2022-05-182-14/+14
| | | | | | | | | | - Make descriptions a bit more human-friendly. - Don't attempt to probe fan safe speeds, this model does not provide one. PR: 260781 (cherry picked from commit dc484aed0a014de0fdf33d972c36413da6903a2e)
* asmc: Add support for Macmini 5,1 (2011) and 5,3 and 7,1 (2014) modelsTrev2022-05-182-1/+61
| | | | | | PR: 262456 (cherry picked from commit 601abb300ce8b28d84c300e70881039d943c28b9)
* asmc: StyleMark Johnston2022-05-182-10/+10
| | | | (cherry picked from commit a31b0c0c47d8d976a063a0f2a51d456c6da66f22)
* asmc: Add support for MacBook Pro 9,1 (mid 2012)Daniel W. Delâtre2022-05-182-5/+41
| | | | | | PR: 261981 (cherry picked from commit 79291c9baf7d5a3f97cbd87894137df4ef157cc7)
* asmc: Make the model table const and local to asmc.cMark Johnston2022-05-182-6/+6
| | | | | | No functional change intended. (cherry picked from commit 27d4c6f86e15e818c390dfc2f3bb6ddf50148e71)
* asmc: Add support for MacPro 6,1 (2013)Adam S2022-05-182-0/+25
| | | | | | PR: 260781 (cherry picked from commit 7d5fef1837ef4741244e6009dfe42835deab369b)
* asmc: Add support for MacBook Air 4,1 and 4,2 (2011)Mark Johnston2022-05-182-0/+40
| | | | | | | | PR: 218574 Submitted by: NapoleonWils0n <t43InvisibleMan@gmail.com> Submitted by: John Hay <john@sanren.ac.za> (cherry picked from commit 308340cce2f02f06855f3ed355a2936fbc5c16bf)
* asmc: clean up empty lines in .c and .h filesMateusz Guzik2020-09-012-13/+1
| | | | Notes: svn path=/head/; revision=365114
* asmc(4): Handle errors from asmc_key_read() properly.Mark Johnston2020-08-271-4/+4
| | | | | | | | | | | | asmc_key_read() returns only 0 and 1, some callers were checking incorrectly for failure. PR: 248939 Submitted by: Tong Zhang <ztong0001@gmail.com> MFC after: 1 week Notes: svn path=/head/; revision=364871
* asmc(4): Add support for MacBook7,1.Mark Johnston2020-08-172-0/+21
| | | | | | | | | PR: 248693 Submitted by: gcx61@interia.pl MFC after: 1 week Notes: svn path=/head/; revision=364300
* Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)Pawel Biernacki2020-02-261-19/+28
| | | | | | | | | | | | | | | | | | | r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718 Notes: svn path=/head/; revision=358333
* asmc: Add support for Mac mini 2,1David Bright2019-02-252-0/+27
| | | | | | | | | | PR: 235798 Submitted by: Trev <fbsdbugs4@sentry.org> Reported by: Trev <fbsdbugs4@sentry.org> MFC after: 1 week Notes: svn path=/head/; revision=344553
* asmc: Add support for Mac mini 4,1 (Mid-2010)David Bright2019-01-062-0/+32
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=342822
* asmc: Patch to add MacBook Pro 9,2 supportDavid Bright2019-01-042-0/+27
| | | | | | | | | | PR: 211513 Submitted by: William Theesfeld Jr <wtheesfeld@mailbox.org> Reported by: William Theesfeld Jr <wtheesfeld@mailbox.org> MFC after: 1 week Notes: svn path=/head/; revision=342770
* asmc: Add support for MacPro1,1David Bright2018-12-192-5/+77
| | | | | | | | | | PR: 203431 Submitted by: jjr@alisa.org & holindho@saunalahti.fi Reported by: jjr@alisa.org MFC after: 1 week Notes: svn path=/head/; revision=342218
* asmc: Add support for mid-2011 Macmini 5,2David Bright2018-12-172-0/+44
| | | | | | | | | | PR: 225911 Submitted by: trev <fbsdbugs4@sentry.org> Reported by: trev <fbsdbugs4@sentry.org> MFC after: 1 week Notes: svn path=/head/; revision=342171
* asmc: Add Support for Macbook Pro 8,1David Bright2018-12-122-4/+28
| | | | | | | | | | PR: 217505 Submitted by: John O. Brickley <obryan.brickley@gmail.com>, updated by Maciej Pasternacki <maciej@pasternacki.net> Reported by: John O. Brickley <obryan.brickley@gmail.com> MFC after: 1 week Notes: svn path=/head/; revision=341988
* asmc: Add Support for MacBookAir 7,1 and 7,2David Bright2018-12-112-0/+39
| | | | | | | | | | | PR: 226172 Submitted by: James Wright <james.wright@jigsawdezign.com> Reported by: James Wright <james.wright@jigsawdezign.com> MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18396 Notes: svn path=/head/; revision=341820
* Distinguish _CID match and _HID match and make lower priority probeTakanori Watanabe2018-10-261-3/+5
| | | | | | | | | | when _CID match. Reviewed by: jhb, imp Differential Revision:https://reviews.freebsd.org/D16468 Notes: svn path=/head/; revision=339754
* Yank crufty INTR_FILTER optionConrad Meyer2018-05-241-24/+0
| | | | | | | | | | | | | | | | | | It was introduced to the tree in r169320 and r169321 in May 2007. It never got much use and never became a kernel default. The code duplicates the default path quite a bit, with slight modifications. Just yank out the cruft. Whatever goals were being aimed for can probably be met within the existing framework, without a flag day option. Mostly mechanical change: 'unifdef -m -UINTR_FILTER'. Reviewed by: mmacy Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D15546 Notes: svn path=/head/; revision=334170
* asmc: update temperature sensor name/descriptionEd Maste2018-03-081-2/+2
| | | | | | | | | PR: 225911 Submitted by: Trev <fbsdbugs4 at sentry.org> MFC after: 1 week Notes: svn path=/head/; revision=330667
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-272-0/+4
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326255
* [asmc] Add support for MacBook Pro 11,2Adrian Chadd2017-02-172-59/+93
| | | | | | | | | | | | | | | This patch will add support for MacBookPro 11.2. For the macros, the MBP11_* macros (for the existing MacBookPro11.3) did not match so they have been renamed to MBP113_* and a new MBP112_* has been added (modified copy of MBP11_*). Some trailing whitespaces may have been removed automatically. PR: kern/214836 Obtained from: Johannes Lundberg <johannes@brilliantservice.co.jp Notes: svn path=/head/; revision=313880
* [asmc] Add support for MacBookPro5,1Adrian Chadd2016-05-032-0/+34
| | | | | | | | | Tested by: Johannes Lundberg <johannes@brilliantservice.co.jp> PR: kern/209179 Submitted by: Thomas Brierley <tomxor@gmail.com> Notes: svn path=/head/; revision=298990
* sys/dev: minor spelling fixes.Pedro F. Giffuni2016-05-031-1/+1
| | | | | | | Most affect comments, very few have user-visible effects. Notes: svn path=/head/; revision=298955
* [asmc] add support for more models and restore keyboard backlight after resume.Adrian Chadd2016-05-022-6/+85
| | | | | | | | | | | | | | | | | | | This patch adds support for restoring backlight after resume and adds models Macbook3,1 MacbookAir5,1 MacbookAir5,2 It also incorporates fixes for bug #175260, bug #203610 and bug #203512 so those can be closed if this patch is applied. PR: kern/209156 PR: kern/175260 PR: kern/203610 PR: kern/203512 Submitted by: Johannes Lundberg <johannes@brilliantservice.co.jp> Notes: svn path=/head/; revision=298937
* Fix undefined behavior when using asmc_fan_getstring()Ulrich Spörlein2016-01-051-4/+4
| | | | | | | | | | | | | It was returning a pointer to stack-allocated memory, so make the allocation at the caller instead. Found by: clang static analyzer Coverity: CID 1245774 Reviewed by: ed, rpaulo Review URL: https://reviews.freebsd.org/D4740 Notes: svn path=/head/; revision=293193
* The SYSCTL data pointers can come from userspace and must not beHans Petter Selasky2014-10-281-14/+14
| | | | | | | | | | | | | directly accessed. Although this will work on some platforms, it can throw an exception if the pointer is invalid and then panic the kernel. Add a missing SYSCTL_IN() of "SCTP_BASE_STATS" structure. MFC after: 3 days Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=273773
* Follow up to r225617. In order to maximize the re-usability of kernel codeDavide Italiano2014-10-161-1/+1
| | | | | | | | | | | in userland rename in-kernel getenv()/setenv() to kern_setenv()/kern_getenv(). This fixes a namespace collision with libc symbols. Submitted by: kmacy Tested by: make universe Notes: svn path=/head/; revision=273174
* Improvements to asmc(4):Rui Paulo2014-09-222-19/+226
| | | | | | | | | | | | | | | | 1. changed the code so that 2**16 keys are supported 2. changed the number of possible fans in a system from 2 to 6 3. added write support for some fan sysctls 4. added a new sysctl which shows the ID of the fan 5. added four more apple models with their temperature keys 6. changed the maxnumber of temperature keys from 36 to 80 7. replaced several fixed buf sizes to sizeof buf Obtained from: Denis Ahrens denis at h3q.com MFC after: 4 weeks Notes: svn path=/head/; revision=271975
* Add support to asmc(4) for Macmini 3,1.Gavin Atkinson2014-07-052-0/+28
| | | | | | | | | | PR: 190195 Submitted by: fbsdbugs2 sentry.org MFC after: 1 week Relnotes: yes Notes: svn path=/head/; revision=268303
* Give device_printf format string to pacify clang warning.Roman Divacky2012-11-091-1/+1
| | | | Notes: svn path=/head/; revision=242826
* This isn't functionally identical. In some cases a hint to disableEitan Adler2012-10-221-0/+2
| | | | | | | | | | | unit 0 would in fact disable all units. This reverts r241856 Approved by: cperciva (implicit) Notes: svn path=/head/; revision=241885
* Now that device disabling is generic, remove extraneous code from theEitan Adler2012-10-221-2/+0
| | | | | | | | | | | device drivers that used to provide this feature. Reviewed by: des Approved by: cperciva MFC after: 1 week Notes: svn path=/head/; revision=241856
* Use %zu for size_t.Rui Paulo2009-09-141-2/+3
| | | | | | | | | Fix printf format string (again) Pointed out by: bde, ed Notes: svn path=/head/; revision=197202
* Fix previous commit. I got it backwards.Rui Paulo2009-09-141-1/+1
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=197195
* Fix printf format string in asmc_key_dump().Rui Paulo2009-09-141-1/+1
| | | | | | | | Spotted by: tinderbox MFC after: 1 week Notes: svn path=/head/; revision=197193
* Make the sudden motion sensor work on older models and add a bit ofRui Paulo2009-09-142-3/+122
| | | | | | | | | | debugging. Submitted by: Christoph Langguth <christoph at rosenkeller.org> MFC after: 1 week Notes: svn path=/head/; revision=197190
* Make dev.asmc.N.light.control writable by everyone.Rui Paulo2009-08-231-1/+2
| | | | | | | | Submitted by: Patrick Lamaiziere <patfbsd at davenulle.org> MFC after: 1 week Notes: svn path=/head/; revision=196455
* Add support for MacBook4,1.Rui Paulo2009-06-262-46/+143
| | | | | | | | | Submitted by: Christoph Langguth <christoph at rosenkeller.org> MFC after: 2 weeks Approved by: re (kib) Notes: svn path=/head/; revision=195046
* Import ACPICA 20090521.Jung-uk Kim2009-06-051-1/+3
| | | | Notes: svn path=/head/; revision=193530
* Check for non-existing model DMI string.Rui Paulo2008-11-291-0/+3
| | | | | | | | | | Submitted by: ganbold Found with: Coverity Prevent(tm) CID: 2434 MFC after: 1 week Notes: svn path=/head/; revision=185433
* Add support for MacBook Air. (not tested)Rui Paulo2008-09-072-2/+13
| | | | | | | Obtained from: mactel-linux Notes: svn path=/head/; revision=182850
* Match the Mac Pro with 8 cores. This machine reports 35 temperatureRui Paulo2008-04-122-5/+44
| | | | | | | | | | sensors and some fans. As I don't own this machine, I could not test this patch. Obtained from: applesmc Linux driver. Notes: svn path=/head/; revision=178145
* Don't call acpi_disabled() because we are not part of the acpi.koRui Paulo2008-04-111-1/+1
| | | | | | | | | | module. Instead, use resource_disabled() that doesn't depend on any module. Noticed by: Ian FREISLICH <ianf at clue.co.za> Notes: svn path=/head/; revision=178122
* Style nit. No functional change.Rui Paulo2008-04-111-2/+3
| | | | Notes: svn path=/head/; revision=178118