Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
743b3576
Commit
743b3576
authored
Apr 29, 2021
by
Jiri Kosina
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-5.13/elan' into for-linus
- Mute LED support fixes for Elantech driver from Hans de Goede
parents
590ade88
ba3f9293
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
12 deletions
+5
-12
drivers/hid/hid-elan.c
drivers/hid/hid-elan.c
+5
-12
No files found.
drivers/hid/hid-elan.c
View file @
743b3576
...
@@ -410,15 +410,6 @@ static int elan_start_multitouch(struct hid_device *hdev)
...
@@ -410,15 +410,6 @@ static int elan_start_multitouch(struct hid_device *hdev)
return
0
;
return
0
;
}
}
static
enum
led_brightness
elan_mute_led_get_brigtness
(
struct
led_classdev
*
led_cdev
)
{
struct
device
*
dev
=
led_cdev
->
dev
->
parent
;
struct
hid_device
*
hdev
=
to_hid_device
(
dev
);
struct
elan_drvdata
*
drvdata
=
hid_get_drvdata
(
hdev
);
return
drvdata
->
mute_led_state
;
}
static
int
elan_mute_led_set_brigtness
(
struct
led_classdev
*
led_cdev
,
static
int
elan_mute_led_set_brigtness
(
struct
led_classdev
*
led_cdev
,
enum
led_brightness
value
)
enum
led_brightness
value
)
{
{
...
@@ -445,8 +436,9 @@ static int elan_mute_led_set_brigtness(struct led_classdev *led_cdev,
...
@@ -445,8 +436,9 @@ static int elan_mute_led_set_brigtness(struct led_classdev *led_cdev,
kfree
(
dmabuf
);
kfree
(
dmabuf
);
if
(
ret
!=
ELAN_LED_REPORT_SIZE
)
{
if
(
ret
!=
ELAN_LED_REPORT_SIZE
)
{
hid_err
(
hdev
,
"Failed to set mute led brightness: %d
\n
"
,
ret
);
if
(
ret
!=
-
ENODEV
)
return
ret
;
hid_err
(
hdev
,
"Failed to set mute led brightness: %d
\n
"
,
ret
);
return
ret
<
0
?
ret
:
-
EIO
;
}
}
drvdata
->
mute_led_state
=
led_state
;
drvdata
->
mute_led_state
=
led_state
;
...
@@ -459,9 +451,10 @@ static int elan_init_mute_led(struct hid_device *hdev)
...
@@ -459,9 +451,10 @@ static int elan_init_mute_led(struct hid_device *hdev)
struct
led_classdev
*
mute_led
=
&
drvdata
->
mute_led
;
struct
led_classdev
*
mute_led
=
&
drvdata
->
mute_led
;
mute_led
->
name
=
"elan:red:mute"
;
mute_led
->
name
=
"elan:red:mute"
;
mute_led
->
brightness_get
=
elan_mute_led_get_brigtness
;
mute_led
->
default_trigger
=
"audio-mute"
;
mute_led
->
brightness_set_blocking
=
elan_mute_led_set_brigtness
;
mute_led
->
brightness_set_blocking
=
elan_mute_led_set_brigtness
;
mute_led
->
max_brightness
=
LED_ON
;
mute_led
->
max_brightness
=
LED_ON
;
mute_led
->
flags
=
LED_HW_PLUGGABLE
;
mute_led
->
dev
=
&
hdev
->
dev
;
mute_led
->
dev
=
&
hdev
->
dev
;
return
devm_led_classdev_register
(
&
hdev
->
dev
,
mute_led
);
return
devm_led_classdev_register
(
&
hdev
->
dev
,
mute_led
);
...
...
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