Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linux
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Container Registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Linaro
qcomlt
demos
linux
Commits
e56236b0
Commit
e56236b0
authored
7 years ago
by
Jiri Kosina
Browse files
Options
Downloads
Plain Diff
Merge branch 'for-4.16/i2c-hid' into for-linus
parents
740c84ee
847989e5
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Documentation/devicetree/bindings/input/hid-over-i2c.txt
+1
-1
1 addition, 1 deletion
Documentation/devicetree/bindings/input/hid-over-i2c.txt
drivers/hid/i2c-hid/i2c-hid.c
+13
-5
13 additions, 5 deletions
drivers/hid/i2c-hid/i2c-hid.c
with
14 additions
and
6 deletions
Documentation/devicetree/bindings/input/hid-over-i2c.txt
+
1
−
1
View file @
e56236b0
...
...
@@ -31,7 +31,7 @@ device-specific compatible properties, which should be used in addition to the
- vdd-supply: phandle of the regulator that provides the supply voltage.
- post-power-on-delay-ms: time required by the device after enabling its regulators
before it is ready for communication.
Must be used with 'vdd-supply'.
or powering it on,
before it is ready for communication.
Example:
...
...
This diff is collapsed.
Click to expand it.
drivers/hid/i2c-hid/i2c-hid.c
+
13
−
5
View file @
e56236b0
...
...
@@ -934,11 +934,6 @@ static int i2c_hid_of_probe(struct i2c_client *client,
}
pdata
->
hid_descriptor_address
=
val
;
ret
=
of_property_read_u32
(
dev
->
of_node
,
"post-power-on-delay-ms"
,
&
val
);
if
(
!
ret
)
pdata
->
post_power_delay_ms
=
val
;
return
0
;
}
...
...
@@ -955,6 +950,16 @@ static inline int i2c_hid_of_probe(struct i2c_client *client,
}
#endif
static
void
i2c_hid_fwnode_probe
(
struct
i2c_client
*
client
,
struct
i2c_hid_platform_data
*
pdata
)
{
u32
val
;
if
(
!
device_property_read_u32
(
&
client
->
dev
,
"post-power-on-delay-ms"
,
&
val
))
pdata
->
post_power_delay_ms
=
val
;
}
static
int
i2c_hid_probe
(
struct
i2c_client
*
client
,
const
struct
i2c_device_id
*
dev_id
)
{
...
...
@@ -998,6 +1003,9 @@ static int i2c_hid_probe(struct i2c_client *client,
ihid
->
pdata
=
*
platform_data
;
}
/* Parse platform agnostic common properties from ACPI / device tree */
i2c_hid_fwnode_probe
(
client
,
&
ihid
->
pdata
);
ihid
->
pdata
.
supply
=
devm_regulator_get
(
&
client
->
dev
,
"vdd"
);
if
(
IS_ERR
(
ihid
->
pdata
.
supply
))
{
ret
=
PTR_ERR
(
ihid
->
pdata
.
supply
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment