<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/hwmon/adt7462.c, branch v3.10.78</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>hwmon: Replace SENSORS_LIMIT with clamp_val</title>
<updated>2013-01-26T05:03:54+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2013-01-09T16:09:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2a844c148e1f714ebf42cb96e1b172ce394c36c9'/>
<id>2a844c148e1f714ebf42cb96e1b172ce394c36c9</id>
<content type='text'>
SENSORS_LIMIT and the generic clamp_val have the same functionality,
and clamp_val is more efficient.

This patch reduces text size by 9052 bytes and bss size by 11624 bytes
for x86_64 builds.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Acked-by: George Joseph &lt;george.joseph@fairview5.com&gt;
Acked-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
SENSORS_LIMIT and the generic clamp_val have the same functionality,
and clamp_val is more efficient.

This patch reduces text size by 9052 bytes and bss size by 11624 bytes
for x86_64 builds.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Acked-by: George Joseph &lt;george.joseph@fairview5.com&gt;
Acked-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: Drop needless includes of &lt;linux/delay.h&gt;</title>
<updated>2012-10-10T13:25:57+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2012-10-10T13:25:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0657777fcefffbf79d4a5fa0952a3f1a4248c0da'/>
<id>0657777fcefffbf79d4a5fa0952a3f1a4248c0da</id>
<content type='text'>
These drivers use no sleep or delay functions so they don't need to
include &lt;linux/delay.h&gt;.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Acked-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Cc: Rudolf Marek &lt;r.marek@assembler.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These drivers use no sleep or delay functions so they don't need to
include &lt;linux/delay.h&gt;.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Acked-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Cc: Rudolf Marek &lt;r.marek@assembler.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (adt7462) Convert to use devm_ functions</title>
<updated>2012-09-24T04:08:30+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2012-06-02T16:58:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0880830096ee314c953d4bd5d017e27589f0e830'/>
<id>0880830096ee314c953d4bd5d017e27589f0e830</id>
<content type='text'>
Convert to use devm_ functions to reduce code size and simplify the code.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Convert to use devm_ functions to reduce code size and simplify the code.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (adt7462) Fix checkpatch issues</title>
<updated>2012-03-19T01:27:02+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2012-01-14T21:16:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=724cc3316e6e1060f727958b4c327001c0bbd62c'/>
<id>724cc3316e6e1060f727958b4c327001c0bbd62c</id>
<content type='text'>
Fixed:
ERROR: that open brace { should be on the previous line
WARNING: please, no space before tabs

Cc: Darrick J. Wong &lt;djwong@us.ibm.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed:
ERROR: that open brace { should be on the previous line
WARNING: please, no space before tabs

Cc: Darrick J. Wong &lt;djwong@us.ibm.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: convert drivers/hwmon/* to use module_i2c_driver()</title>
<updated>2012-03-19T01:26:50+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@gmail.com</email>
</author>
<published>2012-01-20T07:38:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f0967eea80ec2a19a4fe1ad27e3ff1b22c79a3c7'/>
<id>f0967eea80ec2a19a4fe1ad27e3ff1b22c79a3c7</id>
<content type='text'>
This patch converts the drivers in drivers/hwmon/* to use the
module_i2c_driver() macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin &lt;axel.lin@gmail.com&gt;
Cc: Corentin Labbe &lt;corentin.labbe@geomatys.fr&gt;
Cc: Dirk Eibach &lt;eibach@gdsys.de&gt;
Cc: "Mark M. Hoffman" &lt;mhoffman@lightlink.com&gt;
Cc: Steve Glendinning &lt;steve.glendinning@smsc.com&gt;
Cc: Riku Voipio &lt;riku.voipio@iki.fi&gt;
Cc: Guillaume Ligneul &lt;guillaume.ligneul@gmail.com&gt;
Cc: David George &lt;david.george@ska.ac.za&gt;
Cc: "Hans J. Koch" &lt;hjk@hansjkoch.de&gt;
Cc: Marc Hulsman &lt;m.hulsman@tudelft.nl&gt;
Cc: Rudolf Marek &lt;r.marek@assembler.cz&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch converts the drivers in drivers/hwmon/* to use the
module_i2c_driver() macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin &lt;axel.lin@gmail.com&gt;
Cc: Corentin Labbe &lt;corentin.labbe@geomatys.fr&gt;
Cc: Dirk Eibach &lt;eibach@gdsys.de&gt;
Cc: "Mark M. Hoffman" &lt;mhoffman@lightlink.com&gt;
Cc: Steve Glendinning &lt;steve.glendinning@smsc.com&gt;
Cc: Riku Voipio &lt;riku.voipio@iki.fi&gt;
Cc: Guillaume Ligneul &lt;guillaume.ligneul@gmail.com&gt;
Cc: David George &lt;david.george@ska.ac.za&gt;
Cc: "Hans J. Koch" &lt;hjk@hansjkoch.de&gt;
Cc: Marc Hulsman &lt;m.hulsman@tudelft.nl&gt;
Cc: Rudolf Marek &lt;r.marek@assembler.cz&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: replaced strict_str* with kstr*</title>
<updated>2012-01-05T16:19:34+00:00</updated>
<author>
<name>Frans Meulenbroeks</name>
<email>fransmeulenbroeks@gmail.com</email>
</author>
<published>2012-01-04T19:58:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=179c4fdb565dd2157e5dfe89318b74868e3b523d'/>
<id>179c4fdb565dd2157e5dfe89318b74868e3b523d</id>
<content type='text'>
replaced strict_strtol with kstrtol and
replaced strict_strtuol with kstrtuol

This satisfies checkpatch -f
Compile tested only: no warnings or errors given

Signed-off-by: Frans Meulenbroeks &lt;fransmeulenbroeks@gmail.com&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
replaced strict_strtol with kstrtol and
replaced strict_strtuol with kstrtuol

This satisfies checkpatch -f
Compile tested only: no warnings or errors given

Signed-off-by: Frans Meulenbroeks &lt;fransmeulenbroeks@gmail.com&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h</title>
<updated>2010-03-30T13:02:32+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-03-24T08:04:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5a0e3ad6af8660be21ca98a971cd00f331318c05'/>
<id>5a0e3ad6af8660be21ca98a971cd00f331318c05</id>
<content type='text'>
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -&gt; slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Guess-its-ok-by: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Lee Schermerhorn &lt;Lee.Schermerhorn@hp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -&gt; slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Guess-its-ok-by: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Lee Schermerhorn &lt;Lee.Schermerhorn@hp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (adt7462) Wrong ADT7462_VOLT_COUNT</title>
<updated>2010-02-05T18:58:35+00:00</updated>
<author>
<name>Ray Copeland</name>
<email>ray.copeland@aprius.com</email>
</author>
<published>2010-02-05T18:58:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=85f8d3e5faea8bd36c3e5196f8334f7db45e19b2'/>
<id>85f8d3e5faea8bd36c3e5196f8334f7db45e19b2</id>
<content type='text'>
The #define ADT7462_VOLT_COUNT is wrong, it should be 13 not 12. All the 
for loops that use this as a limit count are of the typical form, "for 
(n = 0; n &lt; ADT7462_VOLT_COUNT; n++)", so to loop through all voltages 
w/o missing the last one it is necessary for the count to be one greater 
than it is.  (Specifically, you will miss the +1.5V 3GPIO input with count 
= 12 vs. 13.)

Signed-off-by: Ray Copeland &lt;ray.copeland@aprius.com&gt;
Acked-by: "Darrick J. Wong" &lt;djwong@us.ibm.com&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: stable@kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The #define ADT7462_VOLT_COUNT is wrong, it should be 13 not 12. All the 
for loops that use this as a limit count are of the typical form, "for 
(n = 0; n &lt; ADT7462_VOLT_COUNT; n++)", so to loop through all voltages 
w/o missing the last one it is necessary for the count to be one greater 
than it is.  (Specifically, you will miss the +1.5V 3GPIO input with count 
= 12 vs. 13.)

Signed-off-by: Ray Copeland &lt;ray.copeland@aprius.com&gt;
Acked-by: "Darrick J. Wong" &lt;djwong@us.ibm.com&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: stable@kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (adt7462) Fix pin 28 monitoring</title>
<updated>2010-01-10T19:52:32+00:00</updated>
<author>
<name>Roger Blofeld</name>
<email>blofeldus@yahoo.com</email>
</author>
<published>2010-01-10T19:52:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bb595c923bc51dff9cdd112de18deb57ac7945d2'/>
<id>bb595c923bc51dff9cdd112de18deb57ac7945d2</id>
<content type='text'>
The ADT7462_PIN28_VOLT value is a 4-bit field, so the corresponding
shift must be 4.

Signed-off-by: Roger Blofeld &lt;blofeldus@yahoo.com&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ADT7462_PIN28_VOLT value is a 4-bit field, so the corresponding
shift must be 4.

Signed-off-by: Roger Blofeld &lt;blofeldus@yahoo.com&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: Drop I2C_CLIENT_INSMOD_1</title>
<updated>2009-12-14T20:17:26+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2009-12-14T20:17:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1f86df49ddfd0067cce941187d57b2fd2f749a9e'/>
<id>1f86df49ddfd0067cce941187d57b2fd2f749a9e</id>
<content type='text'>
This macro simply declares an enum, so drivers might as well declare
it themselves.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Tested-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This macro simply declares an enum, so drivers might as well declare
it themselves.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Tested-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
