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
nexedi
linux
Commits
9c196f0f
Commit
9c196f0f
authored
Oct 06, 2009
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARM: iPAQ: convert H3100 IrDA to use generic gpio support
Signed-off-by:
Russell King
<
rmk+kernel@arm.linux.org.uk
>
parent
0831e3e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
arch/arm/mach-sa1100/h3600.c
arch/arm/mach-sa1100/h3600.c
+8
-3
arch/arm/mach-sa1100/include/mach/h3600_gpio.h
arch/arm/mach-sa1100/include/mach/h3600_gpio.h
+9
-0
No files found.
arch/arm/mach-sa1100/h3600.c
View file @
9c196f0f
...
...
@@ -347,14 +347,13 @@ static void __init h3100_map_io(void)
*/
static
int
h3100_irda_set_power
(
struct
device
*
dev
,
unsigned
int
state
)
{
assign_h3100_egpio
(
IPAQ_EGPIO_IR_ON
,
state
);
gpio_set_value
(
H3100_GPIO_IR_ON
,
state
);
return
0
;
}
static
void
h3100_irda_set_speed
(
struct
device
*
dev
,
unsigned
int
speed
)
{
assign_h3100_egpio
(
IPAQ_E
GPIO_IR_FSEL
,
!
(
speed
<
4000000
));
gpio_set_value
(
H3100_
GPIO_IR_FSEL
,
!
(
speed
<
4000000
));
}
static
struct
irda_platform_data
h3100_irda_data
=
{
...
...
@@ -362,8 +361,14 @@ static struct irda_platform_data h3100_irda_data = {
.
set_speed
=
h3100_irda_set_speed
,
};
static
struct
gpio_default_state
h3100_default_gpio
[]
=
{
{
H3100_GPIO_IR_ON
,
GPIO_MODE_OUT0
,
"IrDA power"
},
{
H3100_GPIO_IR_FSEL
,
GPIO_MODE_OUT0
,
"IrDA fsel"
},
};
static
void
h3100_mach_init
(
void
)
{
h3xxx_init_gpio
(
h3100_default_gpio
,
ARRAY_SIZE
(
h3100_default_gpio
));
h3xxx_mach_init
();
sa11x0_register_irda
(
&
h3100_irda_data
);
}
...
...
arch/arm/mach-sa1100/include/mach/h3600_gpio.h
View file @
9c196f0f
...
...
@@ -39,6 +39,15 @@
#define GPIO_H3100_IR_ON GPIO_GPIO (8)
#define GPIO_H3100_IR_FSEL GPIO_GPIO (9)
/* gpiolib versions of the above */
#define H3100_GPIO_BT_ON 2
#define H3100_GPIO_QMUTE 4
#define H3100_GPIO_LCD_3V_ON 5
#define H3100_GPIO_AUD_ON 6
#define H3100_GPIO_AUD_PWR_ON 7
#define H3100_GPIO_IR_ON 8
#define H3100_GPIO_IR_FSEL 9
/* for H3600, audio sample rate clock generator */
#define GPIO_H3600_CLK_SET0 GPIO_GPIO (12)
#define GPIO_H3600_CLK_SET1 GPIO_GPIO (13)
...
...
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