06 Jan, 2012
1 commit
-
replaced strict_strtol with kstrtol and
replaced strict_strtuol with kstrtuolThis satisfies checkpatch -f
Compile tested only: no warnings or errors givenSigned-off-by: Frans Meulenbroeks
Signed-off-by: Guenter Roeck
24 Jan, 2011
1 commit
-
The switch to dynamically allocated sysfs attributes left the
internal lockdep members uninitialized, causing a formal bug.
This patch adds sysfs_attr_init() to the node creation function,
remedying the problem.Reported-and-tested-by: Stefan Richter
Signed-off-by: Henrik Rydberg
Signed-off-by: Guenter Roeck
09 Jan, 2011
12 commits
-
This patch fixes all checkpatch errors and most of the checkpatch warnings.
It also fixes the range check in applesmc_store_fan_speed().Signed-off-by: Guenter Roeck
Acked-by: Henrik Rydberg -
With the preceding patches, git blame assigns about half of
the file to the present author. Add a line to the copyright
to reflect this.Signed-off-by: Henrik Rydberg
Signed-off-by: Guenter Roeck -
Make the driver report a single line on success.
Signed-off-by: Henrik Rydberg
Signed-off-by: Guenter Roeck -
Given the dynamic node construction method, the setup of the
accelerometer, light sensor and keyboard backlight sysfs nodes
can be simplified. This patch does not contain any logic changes.Signed-off-by: Henrik Rydberg
Signed-off-by: Guenter Roeck -
With the dynamic temperature group in place, the setup of fans
can be simplified. This patch sets up the fans dynamically, removing
a hundred lines of code.Signed-off-by: Henrik Rydberg
Signed-off-by: Guenter Roeck -
With temperature keys being determined automatically, the dmi match
data is only used to assign features that can easily be detected from
the smc. This patch removes the dmi match data altogether, and reduces
the match table to the main machine models.Signed-off-by: Henrik Rydberg
Signed-off-by: Guenter Roeck -
The recent Macbooks have temperature registers of a new type.
This patch adds the logic to handle them.Signed-off-by: Henrik Rydberg
Signed-off-by: Guenter Roeck -
The current driver creates temperature files based on a list
of temperature keys given per device. Apart from slow adaption
to new machine models, the number of sensors also depends on
the number of processors. This patch looks up the temperature
keys dynamically, thereby supporting all models.Signed-off-by: Henrik Rydberg
Signed-off-by: Guenter Roeck -
One main problem with the current driver is the inability to quickly
search for supported keys, resulting in detailed feature maps per
machine model which are cumbersome to maintain.This patch adds a register lookup table, which enables binary search
for supported keys. The lookup also reduces the io frequency, so the
original mutex is replaced by locks around the actual io.Signed-off-by: Henrik Rydberg
[guenter.roeck@ericsson.com: Added value range check to key_at_index_store()]
Signed-off-by: Guenter Roeck -
Added #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_
Coalesced any long formats
Removed prefixes from formatsSigned-off-by: Joe Perches
Signed-off-by: Henrik Rydberg
Signed-off-by: Guenter Roeck -
The device init is used to reset the accelerometer. Failure to reset
is not severe enough to stop loading the module or to resume from
hibernation. This patch relaxes failure to a warning and drops
output in case of success.Cc: stable@kernel.org
Signed-off-by: Henrik Rydberg
Signed-off-by: Guenter Roeck -
This patch add support for the MacBookAir3,1 and MacBookAir3,2 to the
applesmc driver.[rydberg@euromail.se: minor cleanup]
Cc: stable@kernel.org
Signed-off-by: Edgar Hucek
Signed-off-by: Henrik Rydberg
Signed-off-by: Guenter Roeck
28 May, 2010
4 commits
-
The Apple SMC uses a systematic labeling scheme for the hardware
temperature sensors. This scheme is currently hidden from
userland. Since the sensor set, and consequently the numbering,
differs between models, an extensive database of configurations is
required for an application such as fan control. This patch adds the
SMC labels to the hwmon sysfs interface, allowing applications to use
the sensors more intelligibly.[rydberg@euromail.se: fixed error handling]
Signed-off-by: Alex Murray
Signed-off-by: Henrik Rydberg
Signed-off-by: Jean Delvare -
This patch adds generic support for the MacBook Pro 7 family
based on the 7,1 model.Signed-off-by: Henrik Rydberg
Signed-off-by: Jean Delvare -
This patch adds generic support for the MacBook Pro 6 family
based on the 6,2 model.[rydberg@euromail.se: patch cleanup]
Signed-off-by: Bernhard Froemel
Signed-off-by: Henrik Rydberg
Signed-off-by: Jean Delvare -
The MacBookPro 5,3 model has two fans, whereas the 5,4 model has
only one. This patch adds explicit support for the 5,3 and 5,4 models.Signed-off-by: Henrik Rydberg
Signed-off-by: Jean Delvare
11 May, 2010
1 commit
-
The current code will not remove the sysfs files for fan numbers three
and up. Also, upon exit, fans one and two are removed regardless of
their existence. This patch cleans up the sysfs error handling for
the fans.Signed-off-by: Henrik Rydberg
Signed-off-by: Jean Delvare
14 Apr, 2010
1 commit
-
Add the iMac9,1 and the MacBookPro2,2 temperature sensors to hwmon
driver applesmc to fix kernel bug #14429:
https://bugzilla.kernel.org/show_bug.cgi?id=14429Signed-off-by: Justin P. Mattock
Acked-by: Nicolas Boichat
Signed-off-by: Jean Delvare
16 Dec, 2009
1 commit
-
Signed-off-by: Alexey Dobriyan
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
22 Sep, 2009
1 commit
-
On resume from suspend, the driver currently resets the logical state as
if it was brought up from halt. This patch uses the
dev_pm_ops.resume/restore methods to synchronize the hardware with the
memorized logical state, in effect bringing back the accelerometer and
backlight to the state prior to suspend. Works for both suspend to ram
and hibernation. The patch has zero effect on the running state.Signed-off-by: Henrik Rydberg
Cc: Nicolas Boichat
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
15 Sep, 2009
1 commit
-
Drivers should be including instead of .
Signed-off-by: H Hartley Sweeten
Cc: Alistair John Strachan
Cc: Nicolas Boichat
Cc: Juerg Haefliger
Cc: Frank Seidel
Acked-by: Jim Cromie
Cc: "Mark M. Hoffman"
Cc: Roger Lucas
Signed-off-by: Jean Delvare
30 Jan, 2009
1 commit
-
MacPro 3 have more temperature sensors than the previous MacPro's also the
sensor THTG has been removed. This patch add supports for the newer
temperature sensors in the MacPro3.Signed-off-by: Bharath Ramesh
Signed-off-by: Henrik Rydberg
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
16 Jan, 2009
1 commit
-
The light sensors ALV0 and ALV1 on newer MacBooks (early 2008 and later)
changed to report 10 bytes instead the earlier 6, and the sensor encoding
subsequently changed. As a result, the reported light sensors readings
are much too low.Via experiments leading up to this patch, it seems only the ALV0 is
reporting data, and the most useful value therein is a 10-bit big-endian
value at offset 6. This suggests that a new protocol was added as a
backward-compatible replacement on top of the old one.This patch makes applesmc report the improved light sensor reading for the
new machines, on a scale in conformance with earlier ones.Signed-off-by: Alex Murray
Signed-off-by: Henrik Rydberg
Cc: Nicolas Boichat
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
07 Jan, 2009
1 commit
-
Add temperature sensor support for MacBook Air 2.
Signed-off-by: Henrik Rydberg
Cc: Nicolas Boichat
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
02 Dec, 2008
1 commit
-
make use of the new dmi device loading support to automatically load the
applesmc driver based on the dmi_match table.Signed-off-by: Henrik Rydberg
Cc: Nicolas Boichat
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
20 Nov, 2008
2 commits
-
In order to analyze the SMC of the newer MacPros, applesmc needs to
recognize the machine. This patch adds the missing generic dmi_match
entry for MacPro models.Signed-off-by: Henrik Rydberg
Cc: Nicolas Boichat
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add temperature sensor support for iMac 6.
Signed-off-by: Henrik Rydberg
Tested-by: Caleb Hyde
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
13 Nov, 2008
1 commit
-
This patch adds accelerometer and temperature sensor support for Macbook 4.
Signed-off-by: Henrik Rydberg
Cc: Nicolas Boichat
Signed-off-by: Linus Torvalds
07 Nov, 2008
4 commits
-
Add temperature sensor support for iMac 8.
Signed-off-by: Henrik Rydberg
Tested-by: Klaus Doblmann
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add accelerometer, backlight and temperature sensor support for the new
unibody Macbook Pro 5.Signed-off-by: Henrik Rydberg
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add accelerometer, backlight and temperature sensor support for the new
unibody Macbook 5.Signed-off-by: Henrik Rydberg
Tested-by: David M. Lary
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add temperature sensor support for iMac 5.
Signed-off-by: Henrik Rydberg
Tested-by: Ricky Campbell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
20 Oct, 2008
6 commits
-
The read fail ratio is sensitive to the delay between the first byte
written and the first byte read; apparently the sensors cannot be rushed.
Increasing the minimum wait time, without changing the total wait time,
improves the fail ratio from a 8% chance that any of the sensors fails in
one read, down to 0.4%, on a Macbook Air. On a Macbook Pro 3,1, the
effect is even more apparent. By reducing the number of status polls, the
ratio is further improved to below 0.1%. Finally, increasing the total
wait time brings the fail ratio down to virtually zero.Signed-off-by: Henrik Rydberg
Tested-by: Bob McElrath
Cc: Nicolas Boichat
Cc: "Mark M. Hoffman"
Cc: Jean Delvare
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add temperature sensor support for Macbook Pro 3.
Signed-off-by: Henrik Rydberg
Cc: Nicolas Boichat
Cc: Riki Oktarianto
Cc: Mark M. Hoffman
Cc: Jean Delvare
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Adds temperature sensor support for the Macbook Pro 4.
Signed-off-by: Henrik Rydberg
Cc: Nicolas Boichat
Cc: Riki Oktarianto
Cc: Mark M. Hoffman
Cc: Jean Delvare
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
dmi_system_id.driver_data is already void*.
Cc: Henrik Rydberg
Cc: Nicolas Boichat
Cc: Riki Oktarianto
Cc: Mark M. Hoffman
Cc: Jean Delvare
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch adds accelerometer, backlight and temperature sensor support
for the Macbook Air.Signed-off-by: Henrik Rydberg
Cc: Nicolas Boichat
Cc: Riki Oktarianto
Cc: Mark M. Hoffman
Cc: Jean Delvare
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
On some recent Macbooks, the package length for the light sensors ALV0 and
ALV1 has changed from 6 to 10. This patch allows for a variable package
length encompassing both variants.Signed-off-by: Henrik Rydberg
Cc: Nicolas Boichat
Cc: Riki Oktarianto
Cc: Mark M. Hoffman
Cc: Jean Delvare
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds