Age | Commit message (Collapse) | Author | Files | Lines |
|
The email address listed in MODULE_AUTHOR() will be disabled in the
near future. Replace it with my private one.
Signed-off-by: Stefan Wahren <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
|
|
The HWMON_CHANNEL_INFO macro simplifies the code, reduces the likelihood
of errors, and makes the code easier to read.
The conversion was done automatically with coccinelle. The semantic patch
used to make this change is as follows.
@r@
initializer list elements;
identifier i;
@@
-u32 i[] = {
- elements,
- 0
-};
@s@
identifier r.i,j,ty;
@@
-struct hwmon_channel_info j = {
- .type = ty,
- .config = i,
-};
@script:ocaml t@
ty << s.ty;
elements << r.elements;
shorter;
elems;
@@
shorter :=
make_ident (List.hd(List.rev (Str.split (Str.regexp "_") ty)));
elems :=
make_ident
(String.concat ","
(List.map (fun x -> Printf.sprintf "\n\t\t\t %s" x)
(Str.split (Str.regexp " , ") elements)))
@@
identifier s.j,t.shorter;
identifier t.elems;
@@
- &j
+ HWMON_CHANNEL_INFO(shorter,elems)
This patch does not introduce functional changes. Many thanks to
Julia Lawall for providing the semantic patch.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
In case an under-voltage happens before probing the driver wont
write the critical warning into the kernel log. So don't init
of last_throttled during probe and fix this issue.
Fixes: 74d1e007915f ("hwmon: Add support for RPi voltage sensor")
Reported-by: "Noralf Trønnes" <[email protected]>
Signed-off-by: Stefan Wahren <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
The raspberrypi-hwmon driver doesn't automatically load, although it does work
when loaded, by adding the alias it auto loads as expected when built as a
module. Tested on RPi2/RPi3 on 32 bit kernel and RPi3B+ on aarch64 with
Fedora 28 and a patched 4.18 RC kernel.
Fixes: 3c493c885cf ("hwmon: Add support for RPi voltage sensor")
Signed-off-by: Peter Robinson <[email protected]>
CC: Stefan Wahren <[email protected]>
CC: Eric Anholt <[email protected]>
Acked-by: Guenter Roeck <[email protected]>
Tested-by: Stefan Wahren <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Signed-off-by: Florian Fainelli <[email protected]>
|
|
Currently there is no easy way to detect undervoltage conditions on a
remote Raspberry Pi. This hwmon driver retrieves the state of the
undervoltage sensor via mailbox interface. The handling based on
Noralf's modifications to the downstream firmware driver. In case of
an undervoltage condition only an entry is written to the kernel log.
CC: "Noralf Trønnes" <[email protected]>
Signed-off-by: Stefan Wahren <[email protected]>
Signed-off-by: Eric Anholt <[email protected]>
Acked-by: Guenter Roeck <[email protected]>
|