Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
bbc97411
Commit
bbc97411
authored
Oct 21, 2008
by
Paul Mundt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sh: rsk7203: leds-gpio support for RSK+ LEDs.
Signed-off-by:
Paul Mundt
<
lethal@linux-sh.org
>
parent
10bfc6e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
5 deletions
+37
-5
arch/sh/boards/board-rsk7203.c
arch/sh/boards/board-rsk7203.c
+37
-5
No files found.
arch/sh/boards/board-rsk7203.c
View file @
bbc97411
...
...
@@ -17,6 +17,7 @@
#include <linux/mtd/map.h>
#include <linux/smc911x.h>
#include <linux/gpio.h>
#include <linux/leds.h>
#include <asm/machvec.h>
#include <asm/io.h>
#include <cpu/sh7203.h>
...
...
@@ -116,10 +117,46 @@ static void __init set_mtd_partitions(void)
}
}
static
struct
gpio_led
rsk7203_gpio_leds
[]
=
{
{
.
name
=
"green"
,
.
gpio
=
GPIO_PE10
,
.
active_low
=
1
,
},
{
.
name
=
"orange"
,
.
default_trigger
=
"nand-disk"
,
.
gpio
=
GPIO_PE12
,
.
active_low
=
1
,
},
{
.
name
=
"red:timer"
,
.
default_trigger
=
"timer"
,
.
gpio
=
GPIO_PC14
,
.
active_low
=
1
,
},
{
.
name
=
"red:heartbeat"
,
.
default_trigger
=
"heartbeat"
,
.
gpio
=
GPIO_PE11
,
.
active_low
=
1
,
},
};
static
struct
gpio_led_platform_data
rsk7203_gpio_leds_info
=
{
.
leds
=
rsk7203_gpio_leds
,
.
num_leds
=
ARRAY_SIZE
(
rsk7203_gpio_leds
),
};
static
struct
platform_device
led_device
=
{
.
name
=
"leds-gpio"
,
.
id
=
-
1
,
.
dev
=
{
.
platform_data
=
&
rsk7203_gpio_leds_info
,
},
};
static
struct
platform_device
*
rsk7203_devices
[]
__initdata
=
{
&
smc911x_device
,
&
flash_device
,
&
led_device
,
};
static
int
__init
rsk7203_devices_setup
(
void
)
...
...
@@ -128,11 +165,6 @@ static int __init rsk7203_devices_setup(void)
gpio_request
(
GPIO_FN_TXD0
,
NULL
);
gpio_request
(
GPIO_FN_RXD0
,
NULL
);
/* Lit LED0 */
gpio_request
(
GPIO_PE10
,
NULL
);
gpio_direction_output
(
GPIO_PE10
,
0
);
gpio_export
(
GPIO_PE10
,
0
);
set_mtd_partitions
();
return
platform_add_devices
(
rsk7203_devices
,
ARRAY_SIZE
(
rsk7203_devices
));
...
...
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