BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
arduino_i2c_keyboard
Project
Overview
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
arduino_i2c_keyboard
Commits
f434c411
Commit
f434c411
authored
Jul 01, 2018
by
Forest Godfrey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a few comments and module alias.
parent
a50e2be3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
arduino_i2c.c
linux_driver/arduino_i2c.c
+6
-3
No files found.
linux_driver/arduino_i2c.c
View file @
f434c411
...
@@ -48,7 +48,7 @@ ai2c_probe(struct i2c_client *client, const struct i2c_device_id *id) {
...
@@ -48,7 +48,7 @@ ai2c_probe(struct i2c_client *client, const struct i2c_device_id *id) {
const
arduino_i2c_keyboard_platform_data_t
*
pdata
=
const
arduino_i2c_keyboard_platform_data_t
*
pdata
=
dev_get_platdata
(
&
client
->
dev
);
dev_get_platdata
(
&
client
->
dev
);
dev_info
(
&
client
->
dev
,
"Arduino I2C Keyboard Prob
e Starting
\n
"
);
dev_info
(
&
client
->
dev
,
"Arduino I2C Keyboard Prob
ing Device
\n
"
);
if
(
!
pdata
)
{
if
(
!
pdata
)
{
dev_err
(
&
client
->
dev
,
"No platform present - failing
\n
"
);
dev_err
(
&
client
->
dev
,
"No platform present - failing
\n
"
);
return
-
EINVAL
;
return
-
EINVAL
;
...
@@ -94,8 +94,9 @@ ai2c_remove(struct i2c_client *client) {
...
@@ -94,8 +94,9 @@ ai2c_remove(struct i2c_client *client) {
return
0
;
return
0
;
}
}
/*
* Module initialization and parameters.
*/
static
const
struct
i2c_device_id
ai2c_id
[]
=
{
static
const
struct
i2c_device_id
ai2c_id
[]
=
{
{
"ai2c-keys"
,
0
},
{
"ai2c-keys"
,
0
},
{
}
{
}
...
@@ -126,12 +127,14 @@ ai2c_init(void) {
...
@@ -126,12 +127,14 @@ ai2c_init(void) {
void
void
ai2c_shutdown
(
void
)
{
ai2c_shutdown
(
void
)
{
printk
(
KERN_INFO
"Arduino I2C Keyboard Shutting Down
\n
"
);
printk
(
KERN_INFO
"Arduino I2C Keyboard Shutting Down
\n
"
);
i2c_del_driver
(
&
ai2c_driver
);
}
}
module_init
(
ai2c_init
);
module_init
(
ai2c_init
);
module_exit
(
ai2c_shutdown
);
module_exit
(
ai2c_shutdown
);
MODULE_ALIAS
(
"arduino_i2c"
);
MODULE_ALIAS
(
"arduino_i2c"
);
MODULE_ALIAS
(
"ai2c-keys"
);
MODULE_LICENSE
(
"GPL"
);
MODULE_LICENSE
(
"GPL"
);
MODULE_AUTHOR
(
"Forest Godfrey <fgodfrey@bigw.org>"
);
MODULE_AUTHOR
(
"Forest Godfrey <fgodfrey@bigw.org>"
);
MODULE_DESCRIPTION
(
"evdev driver for i2c keyboard based on Arduino"
);
MODULE_DESCRIPTION
(
"evdev driver for i2c keyboard based on Arduino"
);
...
...
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