summaryrefslogtreecommitdiffstats
path: root/sys/dev/asmc
Commit message (Collapse)AuthorAgeFilesLines
* Fix undefined behavior when using asmc_fan_getstring()uqs2016-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
* The SYSCTL data pointers can come from userspace and must not behselasky2014-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
* Follow up to r225617. In order to maximize the re-usability of kernel codedavide2014-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
* Improvements to asmc(4):rpaulo2014-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
* Add support to asmc(4) for Macmini 3,1.gavin2014-07-052-0/+28
| | | | | | | PR: 190195 Submitted by: fbsdbugs2 sentry.org MFC after: 1 week Relnotes: yes
* Give device_printf format string to pacify clang warning.rdivacky2012-11-091-1/+1
|
* This isn't functionally identical. In some cases a hint to disableeadler2012-10-221-0/+2
| | | | | | | | unit 0 would in fact disable all units. This reverts r241856 Approved by: cperciva (implicit)
* Now that device disabling is generic, remove extraneous code from theeadler2012-10-221-2/+0
| | | | | | | | device drivers that used to provide this feature. Reviewed by: des Approved by: cperciva MFC after: 1 week
* Use %zu for size_t.rpaulo2009-09-141-2/+3
| | | | | | Fix printf format string (again) Pointed out by: bde, ed
* Fix previous commit. I got it backwards.rpaulo2009-09-141-1/+1
| | | | MFC after: 1 week
* Fix printf format string in asmc_key_dump().rpaulo2009-09-141-1/+1
| | | | | Spotted by: tinderbox MFC after: 1 week
* Make the sudden motion sensor work on older models and add a bit ofrpaulo2009-09-142-3/+122
| | | | | | | debugging. Submitted by: Christoph Langguth <christoph at rosenkeller.org> MFC after: 1 week
* Make dev.asmc.N.light.control writable by everyone.rpaulo2009-08-231-1/+2
| | | | | Submitted by: Patrick Lamaiziere <patfbsd at davenulle.org> MFC after: 1 week
* Add support for MacBook4,1.rpaulo2009-06-262-46/+143
| | | | | | Submitted by: Christoph Langguth <christoph at rosenkeller.org> MFC after: 2 weeks Approved by: re (kib)
* Import ACPICA 20090521.jkim2009-06-051-1/+3
|
* Check for non-existing model DMI string.rpaulo2008-11-291-0/+3
| | | | | | | Submitted by: ganbold Found with: Coverity Prevent(tm) CID: 2434 MFC after: 1 week
* Add support for MacBook Air. (not tested)rpaulo2008-09-072-2/+13
| | | | Obtained from: mactel-linux
* Match the Mac Pro with 8 cores. This machine reports 35 temperaturerpaulo2008-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.
* Don't call acpi_disabled() because we are not part of the acpi.korpaulo2008-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>
* Style nit. No functional change.rpaulo2008-04-111-2/+3
|
* Actually, I was looking at the wrong Linux .c file. Set INIT2 to itsrpaulo2008-04-072-2/+2
| | | | | previous value. While there, lower the delay for the misterious key.
* * Add missing #else in the #ifdef DEBUG section.rpaulo2008-04-072-5/+6
| | | | | * Fix the login in asmc_init(). * Change the INIT2 constant to reflect the same change in the Linux driver.
* "Prettyfy" numbers in hexadecimal. No functional change.rpaulo2008-04-071-2/+2
|
* The SMC is represented on the acpi tables, so we can completely removerpaulo2008-04-072-56/+84
| | | | | | | | dependency on isa. We are now an acpi child. Also: * Add compile time debugging activation * Increase the delay for the SMS init flag.
* Move INTR_FILTER from opt_global.h to its own header.jhb2008-04-051-0/+2
|
* Move ASMC_FAN_FUNCS in the Macmini structure declaration one line uprpaulo2007-11-221-1/+1
| | | | | | | so that this macro expands in the right place. Submitted by: Ed Schouten <ed at fxq.nl> Approved by: njl (mentor)
* Driver for the Apple System Management Console (SMC). This hardware isrpaulo2007-11-072-0/+1141
present on the MacBook, MacBook Pro, and Intel MacMini. This driver exports information via sysctl in its private sysctl tree dev.asmc.*. You can get information about temperatures, fan speeds, the keyboard light sensor and the Sudden Motion Sensor (SMS). The SMS is very useful to park the disk heads when the laptop is moved. Basically, the SMS is setup so that, under movement, we get an interrupt on irq 6 and a devd notification is sent. Sponsored by: Google Summer of Code 2007 Approved by: njl (mentor) Reviewed by: attilio (previous version, but very similar), jhb (interrupt specific review)
OpenPOWER on IntegriCloud