Peter Zijlstra
cdd30ebb1b
module: Convert symbol namespace to string literal
...
Clean up the existing export namespace code along the same lines of
commit 33def8498f ("treewide: Convert macro and uses of __section(foo)
to __section("foo")") and for the same reason, it is not desired for the
namespace argument to be a macro expansion itself.
Scripted using
git grep -l -e MODULE_IMPORT_NS -e EXPORT_SYMBOL_NS | while read file;
do
awk -i inplace '
/^#define EXPORT_SYMBOL_NS/ {
gsub(/__stringify\(ns\)/, "ns");
print;
next;
}
/^#define MODULE_IMPORT_NS/ {
gsub(/__stringify\(ns\)/, "ns");
print;
next;
}
/MODULE_IMPORT_NS/ {
$0 = gensub(/MODULE_IMPORT_NS\(([^)]*)\)/, "MODULE_IMPORT_NS(\"\\1\")", "g");
}
/EXPORT_SYMBOL_NS/ {
if ($0 ~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+),/) {
if ($0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/ &&
$0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(\)/ &&
$0 !~ /^my/) {
getline line;
gsub(/[[:space:]]*\\$/, "");
gsub(/[[:space:]]/, "", line);
$0 = $0 " " line;
}
$0 = gensub(/(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/,
"\\1(\\2, \"\\3\")", "g");
}
}
{ print }' $file;
done
Requested-by: Masahiro Yamada <masahiroy@kernel.org >
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://mail.google.com/mail/u/2/#inbox/FMfcgzQXKWgMmjdFwwdsfgxzKpVHWPlc
Acked-by: Greg KH <gregkh@linuxfoundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2024-12-02 11:34:44 -08:00
Heiner Kallweit
182137ecfb
hwmon: (intel-m10-bmc) Simplify specifying static visibility attribute
...
Use new member visible of struct hwmon_ops to simplify specifying
the static attribute visibility.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com >
Message-ID: <8ef99170-b37d-4c9a-b3bf-59f4ea76cf29@gmail.com >
Signed-off-by: Guenter Roeck <linux@roeck-us.net >
2024-11-10 14:48:06 -08:00
Peter Colberg
a017616faf
hwmon: intel-m10-bmc-hwmon: relabel Columbiaville to CVL Die Temperature
...
Consistently use CVL instead of Columbiaville, since CVL is already
being used in all other sensor labels for the Intel N6000 card.
Fixes: e1983220ae ("hwmon: intel-m10-bmc-hwmon: Add N6000 sensors")
Signed-off-by: Peter Colberg <peter.colberg@intel.com >
Reviewed-by: Michael Adler <michael.adler@intel.com >
Message-ID: <20240919173417.867640-1-peter.colberg@intel.com >
Signed-off-by: Guenter Roeck <linux@roeck-us.net >
2024-10-07 08:42:31 -07:00
Peter Colberg
027a44fedd
hwmon: (intel-m10-bmc-hwmon) Fix multiplier for N6000 board power sensor
...
The Intel N6000 BMC outputs the board power value in milliwatt, whereas
the hwmon sysfs interface must provide power values in microwatt.
Fixes: e1983220ae ("hwmon: intel-m10-bmc-hwmon: Add N6000 sensors")
Signed-off-by: Peter Colberg <peter.colberg@intel.com >
Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com >
Link: https://lore.kernel.org/r/20240521181246.683833-1-peter.colberg@intel.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net >
2024-05-30 09:05:06 -07:00
Ilpo Järvinen
e9c154eed8
mfd: intel-m10-bmc: Move m10bmc_sys_read() away from header
...
Move m10bmc_sys_read() out from the header to prepare it for adding
more code into the function which would make it too large to be a
static inline any more.
While at it, replace the vague wording in function comment with more
precise statements.
Reviewed-by: Russ Weight <russell.h.weight@intel.com >
Acked-by: Guenter Roeck <linux@roeck-us.net > # For hwmon
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Reviewed-by: Xu Yilun <yilun.xu@intel.com >
Signed-off-by: Lee Jones <lee@kernel.org >
Link: https://lore.kernel.org/r/20230417092653.16487-4-ilpo.jarvinen@linux.intel.com
2023-06-15 09:19:36 +01:00
Krzysztof Kozlowski
e374c4100b
hwmon: intel-m10-bmc: constify pointers to hwmon_channel_info
...
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Signed-off-by: Guenter Roeck <linux@roeck-us.net >
2023-04-19 07:08:35 -07:00
Tianfei zhang
e1983220ae
hwmon: intel-m10-bmc-hwmon: Add N6000 sensors
...
Add sensors supported by N6000 card with MAX10 BMC to monitor
temperature, voltage, current, and power on board.
Signed-off-by: Tianfei zhang <tianfei.zhang@intel.com >
Link: https://lore.kernel.org/r/20230131135450.43072-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net >
2023-02-03 07:30:11 -08:00
Michael Walle
340b3b6aa4
hwmon: (intel-m10-bmc-hwmon) use devm_hwmon_sanitize_name()
...
Instead of open-coding the bad characters replacement in the hwmon name,
use the new devm_hwmon_sanitize_name().
Signed-off-by: Michael Walle <michael@walle.cc >
Acked-by: Xu Yilun <yilun.xu@intel.com >
Reviewed-by: Tom Rix <trix@redhat.com >
Link: https://lore.kernel.org/r/20220405092452.4033674-3-michael@walle.cc
Signed-off-by: Guenter Roeck <linux@roeck-us.net >
2022-05-17 05:53:00 -07:00
Martin Hundebøll
1ccdc18405
hwmon: intel-m10-bmc-hwmon: add n5010 sensors
...
Add the list of sensors supported by the Silicom n5010 PAC, and enable
the drivers as a subtype of the intel-m10-bmc multi-function driver.
Signed-off-by: Martin Hundebøll <mhu@silicom.dk >
Reviewed-by: Guenter Roeck <linux@roeck-us.net >
Reviewed-by: Moritz Fischer <mdf@kernel.org >
Reviewed-by: Xu Yilun <yilun.xu@intel.com >
Link: https://lore.kernel.org/r/20210716135441.3235863-4-martin@geanix.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net >
2021-08-17 14:54:25 -07:00
Matthew Gerlach
25b000a80b
hwmon: (intel-m10-bmc-hwmon) add sensor support of Intel D5005 card
...
Like the Intel N3000 card, the Intel D5005 has a MAX10 based
BMC. This commit adds support for the D5005 sensors that are
monitored by the MAX10 BMC.
Signed-off-by: Matthew Gerlach <matthew.gerlach@linux.intel.com >
Signed-off-by: Russ Weight <russell.h.weight@linux.intel.com >
Acked-by: Lee Jones <lee.jones@linaro.org >
Reviewed-by: Tom Rix <trix@redhat.com >
Link: https://lore.kernel.org/r/20210413225835.459662-3-matthew.gerlach@linux.intel.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net >
2021-04-20 06:50:14 -07:00
Xu Yilun
865e4fc013
hwmon: Add hwmon driver for Intel MAX 10 BMC
...
This patch adds hwmon functionality for Intel MAX 10 BMC chip. This BMC
chip connects to a set of sensor chips to monitor current, voltage,
thermal and power of different components on board. The BMC firmware is
responsible for sensor data sampling and recording in shared registers.
Host driver reads the sensor data from these shared registers and
exposes them to users as hwmon interfaces.
Signed-off-by: Xu Yilun <yilun.xu@intel.com >
Signed-off-by: Wu Hao <hao.wu@intel.com >
Signed-off-by: Matthew Gerlach <matthew.gerlach@linux.intel.com >
Signed-off-by: Tom Rix <trix@redhat.com >
Reviewed-by: Guenter Roeck <linux@roeck-us.net >
Link: https://lore.kernel.org/r/1600669071-26235-3-git-send-email-yilun.xu@intel.com
[groeck: Adjusted subject]
Signed-off-by: Guenter Roeck <linux@roeck-us.net >
2020-10-04 08:40:10 -07:00