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
5fce154a
Commit
5fce154a
authored
Apr 26, 2023
by
Jiri Kosina
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-6.4/mcp2221' into for-linus
- generic code improvements for mcp2221 driver (Louis Morhet)
parents
0549fbac
ca6961d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
drivers/hid/hid-mcp2221.c
drivers/hid/hid-mcp2221.c
+3
-3
No files found.
drivers/hid/hid-mcp2221.c
View file @
5fce154a
...
@@ -79,8 +79,8 @@ struct mcp_get_gpio {
...
@@ -79,8 +79,8 @@ struct mcp_get_gpio {
u8
cmd
;
u8
cmd
;
u8
dummy
;
u8
dummy
;
struct
{
struct
{
u8
direction
;
u8
value
;
u8
value
;
u8
direction
;
}
gpio
[
MCP_NGPIO
];
}
gpio
[
MCP_NGPIO
];
}
__packed
;
}
__packed
;
...
@@ -594,7 +594,7 @@ static int mcp_gpio_get(struct gpio_chip *gc,
...
@@ -594,7 +594,7 @@ static int mcp_gpio_get(struct gpio_chip *gc,
mcp
->
txbuf
[
0
]
=
MCP2221_GPIO_GET
;
mcp
->
txbuf
[
0
]
=
MCP2221_GPIO_GET
;
mcp
->
gp_idx
=
offsetof
(
struct
mcp_get_gpio
,
gpio
[
offset
]
.
value
);
mcp
->
gp_idx
=
offsetof
(
struct
mcp_get_gpio
,
gpio
[
offset
]);
mutex_lock
(
&
mcp
->
lock
);
mutex_lock
(
&
mcp
->
lock
);
ret
=
mcp_send_data_req_status
(
mcp
,
mcp
->
txbuf
,
1
);
ret
=
mcp_send_data_req_status
(
mcp
,
mcp
->
txbuf
,
1
);
...
@@ -675,7 +675,7 @@ static int mcp_gpio_get_direction(struct gpio_chip *gc,
...
@@ -675,7 +675,7 @@ static int mcp_gpio_get_direction(struct gpio_chip *gc,
mcp
->
txbuf
[
0
]
=
MCP2221_GPIO_GET
;
mcp
->
txbuf
[
0
]
=
MCP2221_GPIO_GET
;
mcp
->
gp_idx
=
offsetof
(
struct
mcp_get_gpio
,
gpio
[
offset
]
.
direction
);
mcp
->
gp_idx
=
offsetof
(
struct
mcp_get_gpio
,
gpio
[
offset
]);
mutex_lock
(
&
mcp
->
lock
);
mutex_lock
(
&
mcp
->
lock
);
ret
=
mcp_send_data_req_status
(
mcp
,
mcp
->
txbuf
,
1
);
ret
=
mcp_send_data_req_status
(
mcp
,
mcp
->
txbuf
,
1
);
...
...
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