Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
FMC ADC 100M 14b 4cha
Commits
5fb01319
Commit
5fb01319
authored
Feb 09, 2023
by
Vaibhav Gupta
Committed by
Federico Vaga
Feb 14, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software: kernel: hwmon: Export min, max, and critical values
Signed-off-by:
Vaibhav Gupta
<
vaibhav.gupta@cern.ch
>
parent
8204295f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
fa-hwmon.c
software/kernel/fa-hwmon.c
+16
-1
No files found.
software/kernel/fa-hwmon.c
View file @
5fb01319
...
...
@@ -25,6 +25,20 @@ static int fa_hwmon_temp_read(struct device *dev, enum hwmon_sensor_types type,
int32_t
value
;
struct
fa_dev
*
fa
=
dev_get_drvdata
(
dev
);
switch
(
attr
)
{
case
hwmon_temp_min
:
*
val
=
30
*
1000
;
return
0
;
case
hwmon_temp_max
:
*
val
=
60
*
1000
;
return
0
;
case
hwmon_temp_crit
:
*
val
=
65
*
1000
;
return
0
;
}
value
=
fa_temperature_read
(
fa
);
*
val
=
(
long
)
value
;
...
...
@@ -44,7 +58,8 @@ static int fa_hwmon_temp_sensor_id_read(struct device *dev,
}
static
const
struct
hwmon_channel_info
*
fa_hwmon_info
[]
=
{
HWMON_CHANNEL_INFO
(
temp
,
HWMON_T_INPUT
|
HWMON_T_LABEL
),
HWMON_CHANNEL_INFO
(
temp
,
HWMON_T_INPUT
|
HWMON_T_LABEL
|
HWMON_T_MIN
|
HWMON_T_MAX
|
HWMON_T_CRIT
),
NULL
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment