<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/hwmon/lm77.c, branch v5.18-rc6</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v5.18-rc6</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v5.18-rc6'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2021-10-12T14:22:41+00:00</updated>
<entry>
<title>hwmon: cleanup non-bool "valid" data fields</title>
<updated>2021-10-12T14:22:41+00:00</updated>
<author>
<name>Paul Fertser</name>
<email>fercerpav@gmail.com</email>
</author>
<published>2021-09-24T19:52:02+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=952a11ca32a6046ab86bf885a7805c935f71d5c8'/>
<id>urn:sha1:952a11ca32a6046ab86bf885a7805c935f71d5c8</id>
<content type='text'>
We have bool so use it consistently in all the drivers.

The following Coccinelle script was used:

@@
identifier T;
type t = { char, int };
@@
struct T {
...
-	t valid;
+	bool valid;
...
}

@@
identifier v;
@@
(
- v-&gt;valid = 0
+ v-&gt;valid = false
|
- v-&gt;valid = 1
+ v-&gt;valid = true
)

followed by sed to fixup the comments:
sed '/bool valid;/{s/!=0/true/;s/zero/false/}'

Few whitespace changes were fixed manually. All modified drivers were
compile-tested.

Signed-off-by: Paul Fertser &lt;fercerpav@gmail.com&gt;
Link: https://lore.kernel.org/r/20210924195202.27917-1-fercerpav@gmail.com
[groeck: Fixed up 'u8 valid' to 'boool valid' in atxp1.c]
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: use simple i2c probe function</title>
<updated>2020-09-23T16:42:39+00:00</updated>
<author>
<name>Stephen Kitt</name>
<email>steve@sk2.org</email>
</author>
<published>2020-08-13T16:02:22+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=6748703856d461f8cd62b72ebca51040e06cb310'/>
<id>urn:sha1:6748703856d461f8cd62b72ebca51040e06cb310</id>
<content type='text'>
Many hwmon drivers don't use the id information provided by the old
i2c probe function, and the remainder can easily be adapted to the new
form ("probe_new") by calling i2c_match_id explicitly.

This avoids scanning the identifier tables during probes.

Drivers which didn't use the id are converted as-is; drivers which did
are modified as follows:

* if the information in i2c_client is sufficient, that's used instead
  (client-&gt;name);
* anything else is handled by calling i2c_match_id() with the same
  level of error-handling (if any) as before.

A few drivers aren't included in this patch because they have a
different set of maintainers. They will be covered by other patches.

Signed-off-by: Stephen Kitt &lt;steve@sk2.org&gt;
Link: https://lore.kernel.org/r/20200813160222.1503401-1-steve@sk2.org
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157</title>
<updated>2019-05-30T18:26:37+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-27T06:55:06+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=c942fddf8793b2013be8c901b47d0a8dc02bf99f'/>
<id>urn:sha1:c942fddf8793b2013be8c901b47d0a8dc02bf99f</id>
<content type='text'>
Based on 3 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version this program is distributed in the
  hope that it will be useful but without any warranty without even
  the implied warranty of merchantability or fitness for a particular
  purpose see the gnu general public license for more details

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version [author] [kishon] [vijay] [abraham]
  [i] [kishon]@[ti] [com] this program is distributed in the hope that
  it will be useful but without any warranty without even the implied
  warranty of merchantability or fitness for a particular purpose see
  the gnu general public license for more details

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version [author] [graeme] [gregory]
  [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
  [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
  [hk] [hemahk]@[ti] [com] this program is distributed in the hope
  that it will be useful but without any warranty without even the
  implied warranty of merchantability or fitness for a particular
  purpose see the gnu general public license for more details

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 1105 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Richard Fontana &lt;rfontana@redhat.com&gt;
Reviewed-by: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>hwmon: (lm77) Use permission specific SENSOR[_DEVICE]_ATTR variants</title>
<updated>2019-02-18T22:23:29+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2018-12-10T22:02:11+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=97b539d58204776e0f23c372415bd6f9df542d21'/>
<id>urn:sha1:97b539d58204776e0f23c372415bd6f9df542d21</id>
<content type='text'>
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readability, and to reduce the chance of inconsistencies.

Also replace any remaining S_&lt;PERMS&gt; in the driver with octal values.

The conversion was done automatically with coccinelle. The semantic patches
and the scripts used to generate this commit log are available at
https://github.com/groeck/coccinelle-patches/hwmon/.

This patch does not introduce functional changes. It was verified by
compiling the old and new files and comparing text and data sizes.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (lm77) Prevent overflow problem when writing large limits</title>
<updated>2014-07-31T16:41:46+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2014-07-31T14:58:04+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=99765db299f0b07093318395f789a716ed23fc95'/>
<id>urn:sha1:99765db299f0b07093318395f789a716ed23fc95</id>
<content type='text'>
On platforms with sizeof(int) &lt; sizeof(long), writing a temperature
limit larger than MAXINT will result in unpredictable limit values
written to the chip.
Clamp the input values to the supported limits first to fix the problem.

For set_temp_hyst:
As Guenter pointed out that the temperature is read as unsigned and stored in
an unsigned long. This is wrong; nothing in the datasheet suggests that the
value (the absolute temperature) must be positive.
So change it to signed.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (lm77) Convert to use devm_hwmon_device_register_with_groups</title>
<updated>2014-05-21T23:02:21+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2014-04-12T16:25:25+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=5975dfbf40bfb342db1b25a9b1e2c3b867773612'/>
<id>urn:sha1:5975dfbf40bfb342db1b25a9b1e2c3b867773612</id>
<content type='text'>
Use devm_hwmon_device_register_with_groups API to attach attributes
to hwmon device, simplify code, and reduce code size.

Reviewed-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (lm77) Drop function macros</title>
<updated>2014-05-21T23:02:20+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2014-04-12T16:17:37+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=48dbd6ff142d518e01888d2addfab731ff65460e'/>
<id>urn:sha1:48dbd6ff142d518e01888d2addfab731ff65460e</id>
<content type='text'>
Function macros make the code harder to read and increase code size,
so drop them.

Reviewed-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (lm77) Do not preserve hysteresis when updating critical temp limit</title>
<updated>2014-05-21T23:02:20+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2014-04-20T15:07:42+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=50bf46509f24c914562b4d818a155d8dc8f45e10'/>
<id>urn:sha1:50bf46509f24c914562b4d818a155d8dc8f45e10</id>
<content type='text'>
Updating the hysteresis value when updating the critical temperature limit
was following the rule of 'least surprise'. However, it had the undesirable
side effect of changing the hysteresis for all other attributes, which
defeats the purpose of least surprise. In addition, it could result in
invalid hysteresis values if the resulting hysteresis was too large. In such
cases the resulting hysteresis ended up changed anyway, which again defeats
the purpose. So drop that code and document the new behavior.

Reviewed-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (lm77) Rearrange code to no longer require forward declarations</title>
<updated>2014-05-21T23:02:20+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2014-04-12T15:45:20+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=9f9edcd4c32bf33255f8db7329c78a99baa94585'/>
<id>urn:sha1:9f9edcd4c32bf33255f8db7329c78a99baa94585</id>
<content type='text'>
Forward declarations are easy to avoid and unnecessary.
Rearrange code to avoid it.

No functional change.

Acked-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (lm77) Drop FSF mailing address</title>
<updated>2014-05-21T23:02:20+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2014-04-12T15:46:29+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=d9ee59751e616840e98ef0896efb43486e0f54d1'/>
<id>urn:sha1:d9ee59751e616840e98ef0896efb43486e0f54d1</id>
<content type='text'>
The FSF mailing address changes over time, so drop it.

No functional change.

Reviewed-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
</feed>
