Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
6d2f42cc
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
6d2f42cc
编写于
3月 11, 2011
作者:
K
Kukjin Kim
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev/pwm-backlight' into for-next
Conflicts: arch/arm/mach-s3c64xx/mach-smdk6410.c
上级
a9518cde
5cd435b4
变更
14
显示空白变更内容
内联
并排
Showing
14 changed file
with
290 addition
and
49 deletion
+290
-49
arch/arm/mach-s3c64xx/Kconfig
arch/arm/mach-s3c64xx/Kconfig
+3
-2
arch/arm/mach-s3c64xx/mach-smdk6410.c
arch/arm/mach-s3c64xx/mach-smdk6410.c
+43
-3
arch/arm/mach-s5p64x0/Kconfig
arch/arm/mach-s5p64x0/Kconfig
+2
-0
arch/arm/mach-s5p64x0/mach-smdk6440.c
arch/arm/mach-s5p64x0/mach-smdk6440.c
+43
-0
arch/arm/mach-s5p64x0/mach-smdk6450.c
arch/arm/mach-s5p64x0/mach-smdk6450.c
+43
-0
arch/arm/mach-s5pc100/Kconfig
arch/arm/mach-s5pc100/Kconfig
+1
-0
arch/arm/mach-s5pc100/mach-smdkc100.c
arch/arm/mach-s5pc100/mach-smdkc100.c
+44
-4
arch/arm/mach-s5pv210/Kconfig
arch/arm/mach-s5pv210/Kconfig
+1
-0
arch/arm/mach-s5pv210/mach-smdkv210.c
arch/arm/mach-s5pv210/mach-smdkv210.c
+43
-0
arch/arm/plat-s3c24xx/Kconfig
arch/arm/plat-s3c24xx/Kconfig
+0
-7
arch/arm/plat-samsung/Kconfig
arch/arm/plat-samsung/Kconfig
+13
-0
arch/arm/plat-samsung/Makefile
arch/arm/plat-samsung/Makefile
+1
-0
arch/arm/plat-samsung/dev-pwm.c
arch/arm/plat-samsung/dev-pwm.c
+53
-0
arch/arm/plat-samsung/pwm.c
arch/arm/plat-samsung/pwm.c
+0
-33
未找到文件。
arch/arm/mach-s3c64xx/Kconfig
浏览文件 @
6d2f42cc
...
...
@@ -143,6 +143,7 @@ config MACH_SMDK6410
select S3C_DEV_USB_HSOTG
select S3C_DEV_WDT
select SAMSUNG_DEV_KEYPAD
select SAMSUNG_DEV_PWM
select HAVE_S3C2410_WATCHDOG if WATCHDOG
select S3C64XX_SETUP_SDHCI
select S3C64XX_SETUP_I2C1
...
...
@@ -231,7 +232,7 @@ config MACH_HMT
select S3C_DEV_NAND
select S3C_DEV_USB_HOST
select S3C64XX_SETUP_FB_24BPP
select
HAVE
_PWM
select
SAMSUNG_DEV
_PWM
help
Machine support for the Airgoo HMT
...
...
@@ -249,8 +250,8 @@ config MACH_SMARTQ
select S3C64XX_SETUP_SDHCI
select S3C64XX_SETUP_FB_24BPP
select SAMSUNG_DEV_ADC
select SAMSUNG_DEV_PWM
select SAMSUNG_DEV_TS
select HAVE_PWM
help
Shared machine support for SmartQ 5/7
...
...
arch/arm/mach-s3c64xx/mach-smdk6410.c
浏览文件 @
6d2f42cc
...
...
@@ -29,6 +29,7 @@
#include <linux/smsc911x.h>
#include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h>
#include <linux/pwm_backlight.h>
#ifdef CONFIG_SMDK6410_WM1190_EV1
#include <linux/mfd/wm8350/core.h>
...
...
@@ -49,6 +50,7 @@
#include <mach/hardware.h>
#include <mach/regs-fb.h>
#include <mach/map.h>
#include <mach/gpio-bank-f.h>
#include <asm/irq.h>
#include <asm/mach-types.h>
...
...
@@ -119,7 +121,6 @@ static void smdk6410_lcd_power_set(struct plat_lcd_data *pd,
{
if
(
power
)
{
gpio_direction_output
(
S3C64XX_GPF
(
13
),
1
);
gpio_direction_output
(
S3C64XX_GPF
(
15
),
1
);
/* fire nRESET on power up */
gpio_direction_output
(
S3C64XX_GPN
(
5
),
0
);
...
...
@@ -127,7 +128,6 @@ static void smdk6410_lcd_power_set(struct plat_lcd_data *pd,
gpio_direction_output
(
S3C64XX_GPN
(
5
),
1
);
msleep
(
1
);
}
else
{
gpio_direction_output
(
S3C64XX_GPF
(
15
),
0
);
gpio_direction_output
(
S3C64XX_GPF
(
13
),
0
);
}
}
...
...
@@ -270,6 +270,45 @@ static struct samsung_keypad_platdata smdk6410_keypad_data __initdata = {
.
cols
=
8
,
};
static
int
smdk6410_backlight_init
(
struct
device
*
dev
)
{
int
ret
;
ret
=
gpio_request
(
S3C64XX_GPF
(
15
),
"Backlight"
);
if
(
ret
)
{
printk
(
KERN_ERR
"failed to request GPF for PWM-OUT1
\n
"
);
return
ret
;
}
/* Configure GPIO pin with S3C64XX_GPF15_PWM_TOUT1 */
s3c_gpio_cfgpin
(
S3C64XX_GPF
(
15
),
S3C_GPIO_SFN
(
2
));
return
0
;
}
static
void
smdk6410_backlight_exit
(
struct
device
*
dev
)
{
s3c_gpio_cfgpin
(
S3C64XX_GPF
(
15
),
S3C_GPIO_OUTPUT
);
gpio_free
(
S3C64XX_GPF
(
15
));
}
static
struct
platform_pwm_backlight_data
smdk6410_backlight_data
=
{
.
pwm_id
=
1
,
.
max_brightness
=
255
,
.
dft_brightness
=
255
,
.
pwm_period_ns
=
78770
,
.
init
=
smdk6410_backlight_init
,
.
exit
=
smdk6410_backlight_exit
,
};
static
struct
platform_device
smdk6410_backlight_device
=
{
.
name
=
"pwm-backlight"
,
.
dev
=
{
.
parent
=
&
s3c_device_timer
[
1
].
dev
,
.
platform_data
=
&
smdk6410_backlight_data
,
},
};
static
struct
map_desc
smdk6410_iodesc
[]
=
{};
static
struct
platform_device
*
smdk6410_devices
[]
__initdata
=
{
...
...
@@ -299,6 +338,8 @@ static struct platform_device *smdk6410_devices[] __initdata = {
&
s3c_device_rtc
,
&
s3c_device_ts
,
&
s3c_device_wdt
,
&
s3c_device_timer
[
1
],
&
smdk6410_backlight_device
,
};
#ifdef CONFIG_REGULATOR
...
...
@@ -694,7 +735,6 @@ static void __init smdk6410_machine_init(void)
gpio_request
(
S3C64XX_GPN
(
5
),
"LCD power"
);
gpio_request
(
S3C64XX_GPF
(
13
),
"LCD power"
);
gpio_request
(
S3C64XX_GPF
(
15
),
"LCD power"
);
i2c_register_board_info
(
0
,
i2c_devs0
,
ARRAY_SIZE
(
i2c_devs0
));
i2c_register_board_info
(
1
,
i2c_devs1
,
ARRAY_SIZE
(
i2c_devs1
));
...
...
arch/arm/mach-s5p64x0/Kconfig
浏览文件 @
6d2f42cc
...
...
@@ -34,6 +34,7 @@ config MACH_SMDK6440
select S3C_DEV_WDT
select S3C64XX_DEV_SPI
select SAMSUNG_DEV_ADC
select SAMSUNG_DEV_PWM
select SAMSUNG_DEV_TS
select S5P64X0_SETUP_I2C1
help
...
...
@@ -47,6 +48,7 @@ config MACH_SMDK6450
select S3C_DEV_WDT
select S3C64XX_DEV_SPI
select SAMSUNG_DEV_ADC
select SAMSUNG_DEV_PWM
select SAMSUNG_DEV_TS
select S5P64X0_SETUP_I2C1
help
...
...
arch/arm/mach-s5p64x0/mach-smdk6440.c
浏览文件 @
6d2f42cc
...
...
@@ -22,6 +22,7 @@
#include <linux/module.h>
#include <linux/clk.h>
#include <linux/gpio.h>
#include <linux/pwm_backlight.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
...
...
@@ -32,6 +33,7 @@
#include <mach/map.h>
#include <mach/regs-clock.h>
#include <mach/i2c.h>
#include <mach/regs-gpio.h>
#include <plat/regs-serial.h>
#include <plat/gpio-cfg.h>
...
...
@@ -88,6 +90,45 @@ static struct s3c2410_uartcfg smdk6440_uartcfgs[] __initdata = {
},
};
static
int
smdk6440_backlight_init
(
struct
device
*
dev
)
{
int
ret
;
ret
=
gpio_request
(
S5P6440_GPF
(
15
),
"Backlight"
);
if
(
ret
)
{
printk
(
KERN_ERR
"failed to request GPF for PWM-OUT1
\n
"
);
return
ret
;
}
/* Configure GPIO pin with S5P6440_GPF15_PWM_TOUT1 */
s3c_gpio_cfgpin
(
S5P6440_GPF
(
15
),
S3C_GPIO_SFN
(
2
));
return
0
;
}
static
void
smdk6440_backlight_exit
(
struct
device
*
dev
)
{
s3c_gpio_cfgpin
(
S5P6440_GPF
(
15
),
S3C_GPIO_OUTPUT
);
gpio_free
(
S5P6440_GPF
(
15
));
}
static
struct
platform_pwm_backlight_data
smdk6440_backlight_data
=
{
.
pwm_id
=
1
,
.
max_brightness
=
255
,
.
dft_brightness
=
255
,
.
pwm_period_ns
=
78770
,
.
init
=
smdk6440_backlight_init
,
.
exit
=
smdk6440_backlight_exit
,
};
static
struct
platform_device
smdk6440_backlight_device
=
{
.
name
=
"pwm-backlight"
,
.
dev
=
{
.
parent
=
&
s3c_device_timer
[
1
].
dev
,
.
platform_data
=
&
smdk6440_backlight_data
,
},
};
static
struct
platform_device
*
smdk6440_devices
[]
__initdata
=
{
&
s3c_device_adc
,
&
s3c_device_rtc
,
...
...
@@ -97,6 +138,8 @@ static struct platform_device *smdk6440_devices[] __initdata = {
&
s3c_device_wdt
,
&
samsung_asoc_dma
,
&
s5p6440_device_iis
,
&
s3c_device_timer
[
1
],
&
smdk6440_backlight_device
,
};
static
struct
s3c2410_platform_i2c
s5p6440_i2c0_data
__initdata
=
{
...
...
arch/arm/mach-s5p64x0/mach-smdk6450.c
浏览文件 @
6d2f42cc
...
...
@@ -22,6 +22,7 @@
#include <linux/module.h>
#include <linux/clk.h>
#include <linux/gpio.h>
#include <linux/pwm_backlight.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
...
...
@@ -32,6 +33,7 @@
#include <mach/map.h>
#include <mach/regs-clock.h>
#include <mach/i2c.h>
#include <mach/regs-gpio.h>
#include <plat/regs-serial.h>
#include <plat/gpio-cfg.h>
...
...
@@ -106,6 +108,45 @@ static struct s3c2410_uartcfg smdk6450_uartcfgs[] __initdata = {
#endif
};
static
int
smdk6450_backlight_init
(
struct
device
*
dev
)
{
int
ret
;
ret
=
gpio_request
(
S5P6450_GPF
(
15
),
"Backlight"
);
if
(
ret
)
{
printk
(
KERN_ERR
"failed to request GPF for PWM-OUT1
\n
"
);
return
ret
;
}
/* Configure GPIO pin with S5P6450_GPF15_PWM_TOUT1 */
s3c_gpio_cfgpin
(
S5P6450_GPF
(
15
),
S3C_GPIO_SFN
(
2
));
return
0
;
}
static
void
smdk6450_backlight_exit
(
struct
device
*
dev
)
{
s3c_gpio_cfgpin
(
S5P6450_GPF
(
15
),
S3C_GPIO_OUTPUT
);
gpio_free
(
S5P6450_GPF
(
15
));
}
static
struct
platform_pwm_backlight_data
smdk6450_backlight_data
=
{
.
pwm_id
=
1
,
.
max_brightness
=
255
,
.
dft_brightness
=
255
,
.
pwm_period_ns
=
78770
,
.
init
=
smdk6450_backlight_init
,
.
exit
=
smdk6450_backlight_exit
,
};
static
struct
platform_device
smdk6450_backlight_device
=
{
.
name
=
"pwm-backlight"
,
.
dev
=
{
.
parent
=
&
s3c_device_timer
[
1
].
dev
,
.
platform_data
=
&
smdk6450_backlight_data
,
},
};
static
struct
platform_device
*
smdk6450_devices
[]
__initdata
=
{
&
s3c_device_adc
,
&
s3c_device_rtc
,
...
...
@@ -115,6 +156,8 @@ static struct platform_device *smdk6450_devices[] __initdata = {
&
s3c_device_wdt
,
&
samsung_asoc_dma
,
&
s5p6450_device_iis0
,
&
s3c_device_timer
[
1
],
&
smdk6450_backlight_device
,
/* s5p6450_device_spi0 will be added */
};
...
...
arch/arm/mach-s5pc100/Kconfig
浏览文件 @
6d2f42cc
...
...
@@ -58,6 +58,7 @@ config MACH_SMDKC100
select SAMSUNG_DEV_ADC
select SAMSUNG_DEV_IDE
select SAMSUNG_DEV_KEYPAD
select SAMSUNG_DEV_PWM
select SAMSUNG_DEV_TS
select S5PC100_SETUP_FB_24BPP
select S5PC100_SETUP_I2C1
...
...
arch/arm/mach-s5pc100/mach-smdkc100.c
浏览文件 @
6d2f42cc
...
...
@@ -23,12 +23,15 @@
#include <linux/fb.h>
#include <linux/delay.h>
#include <linux/input.h>
#include <linux/pwm_backlight.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <mach/map.h>
#include <mach/regs-fb.h>
#include <mach/regs-gpio.h>
#include <video/platform_lcd.h>
#include <asm/irq.h>
...
...
@@ -107,9 +110,6 @@ static struct i2c_board_info i2c_devs1[] __initdata = {
static
void
smdkc100_lcd_power_set
(
struct
plat_lcd_data
*
pd
,
unsigned
int
power
)
{
/* backlight */
gpio_direction_output
(
S5PC100_GPD
(
0
),
power
);
if
(
power
)
{
/* module reset */
gpio_direction_output
(
S5PC100_GPH0
(
6
),
1
);
...
...
@@ -179,6 +179,45 @@ static struct samsung_keypad_platdata smdkc100_keypad_data __initdata = {
.
cols
=
8
,
};
static
int
smdkc100_backlight_init
(
struct
device
*
dev
)
{
int
ret
;
ret
=
gpio_request
(
S5PC100_GPD
(
0
),
"Backlight"
);
if
(
ret
)
{
printk
(
KERN_ERR
"failed to request GPF for PWM-OUT0
\n
"
);
return
ret
;
}
/* Configure GPIO pin with S5PC100_GPD_TOUT_0 */
s3c_gpio_cfgpin
(
S5PC100_GPD
(
0
),
S3C_GPIO_SFN
(
2
));
return
0
;
}
static
void
smdkc100_backlight_exit
(
struct
device
*
dev
)
{
s3c_gpio_cfgpin
(
S5PC100_GPD
(
0
),
S3C_GPIO_OUTPUT
);
gpio_free
(
S5PC100_GPD
(
0
));
}
static
struct
platform_pwm_backlight_data
smdkc100_backlight_data
=
{
.
pwm_id
=
0
,
.
max_brightness
=
255
,
.
dft_brightness
=
255
,
.
pwm_period_ns
=
78770
,
.
init
=
smdkc100_backlight_init
,
.
exit
=
smdkc100_backlight_exit
,
};
static
struct
platform_device
smdkc100_backlight_device
=
{
.
name
=
"pwm-backlight"
,
.
dev
=
{
.
parent
=
&
s3c_device_timer
[
0
].
dev
,
.
platform_data
=
&
smdkc100_backlight_data
,
},
};
static
struct
platform_device
*
smdkc100_devices
[]
__initdata
=
{
&
s3c_device_adc
,
&
s3c_device_cfcon
,
...
...
@@ -200,6 +239,8 @@ static struct platform_device *smdkc100_devices[] __initdata = {
&
s5p_device_fimc1
,
&
s5p_device_fimc2
,
&
s5pc100_device_spdif
,
&
s3c_device_timer
[
0
],
&
smdkc100_backlight_device
,
};
static
struct
s3c2410_ts_mach_info
s3c_ts_platform
__initdata
=
{
...
...
@@ -233,7 +274,6 @@ static void __init smdkc100_machine_init(void)
s5pc100_spdif_setup_gpio
(
S5PC100_SPDIF_GPD
);
/* LCD init */
gpio_request
(
S5PC100_GPD
(
0
),
"GPD"
);
gpio_request
(
S5PC100_GPH0
(
6
),
"GPH0"
);
smdkc100_lcd_power_set
(
&
smdkc100_lcd_power_data
,
0
);
platform_add_devices
(
smdkc100_devices
,
ARRAY_SIZE
(
smdkc100_devices
));
...
...
arch/arm/mach-s5pv210/Kconfig
浏览文件 @
6d2f42cc
...
...
@@ -130,6 +130,7 @@ config MACH_SMDKV210
select SAMSUNG_DEV_ADC
select SAMSUNG_DEV_IDE
select SAMSUNG_DEV_KEYPAD
select SAMSUNG_DEV_PWM
select SAMSUNG_DEV_TS
select S5PV210_SETUP_FB_24BPP
select S5PV210_SETUP_I2C1
...
...
arch/arm/mach-s5pv210/mach-smdkv210.c
浏览文件 @
6d2f42cc
...
...
@@ -18,6 +18,7 @@
#include <linux/fb.h>
#include <linux/gpio.h>
#include <linux/delay.h>
#include <linux/pwm_backlight.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
...
...
@@ -43,6 +44,7 @@
#include <plat/keypad.h>
#include <plat/pm.h>
#include <plat/fb.h>
#include <plat/gpio-cfg.h>
/* Following are default values for UCON, ULCON and UFCON UART registers */
#define SMDKV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
...
...
@@ -208,6 +210,45 @@ static struct s3c_fb_platdata smdkv210_lcd0_pdata __initdata = {
.
setup_gpio
=
s5pv210_fb_gpio_setup_24bpp
,
};
static
int
smdkv210_backlight_init
(
struct
device
*
dev
)
{
int
ret
;
ret
=
gpio_request
(
S5PV210_GPD0
(
3
),
"Backlight"
);
if
(
ret
)
{
printk
(
KERN_ERR
"failed to request GPD for PWM-OUT 3
\n
"
);
return
ret
;
}
/* Configure GPIO pin with S5PV210_GPD_0_3_TOUT_3 */
s3c_gpio_cfgpin
(
S5PV210_GPD0
(
3
),
S3C_GPIO_SFN
(
2
));
return
0
;
}
static
void
smdkv210_backlight_exit
(
struct
device
*
dev
)
{
s3c_gpio_cfgpin
(
S5PV210_GPD0
(
3
),
S3C_GPIO_OUTPUT
);
gpio_free
(
S5PV210_GPD0
(
3
));
}
static
struct
platform_pwm_backlight_data
smdkv210_backlight_data
=
{
.
pwm_id
=
3
,
.
max_brightness
=
255
,
.
dft_brightness
=
255
,
.
pwm_period_ns
=
78770
,
.
init
=
smdkv210_backlight_init
,
.
exit
=
smdkv210_backlight_exit
,
};
static
struct
platform_device
smdkv210_backlight_device
=
{
.
name
=
"pwm-backlight"
,
.
dev
=
{
.
parent
=
&
s3c_device_timer
[
3
].
dev
,
.
platform_data
=
&
smdkv210_backlight_data
,
},
};
static
struct
platform_device
*
smdkv210_devices
[]
__initdata
=
{
&
s3c_device_adc
,
&
s3c_device_cfcon
,
...
...
@@ -229,6 +270,8 @@ static struct platform_device *smdkv210_devices[] __initdata = {
&
samsung_device_keypad
,
&
smdkv210_dm9000
,
&
smdkv210_lcd_lte480wv
,
&
s3c_device_timer
[
3
],
&
smdkv210_backlight_device
,
};
static
void
__init
smdkv210_dm9000_init
(
void
)
...
...
arch/arm/plat-s3c24xx/Kconfig
浏览文件 @
6d2f42cc
...
...
@@ -56,13 +56,6 @@ config S3C24XX_DCLK
help
Clock code for supporting DCLK/CLKOUT on S3C24XX architectures
config S3C24XX_PWM
bool "PWM device support"
select HAVE_PWM
help
Support for exporting the PWM timer blocks via the pwm device
system.
# gpio configurations
config S3C24XX_GPIO_EXTRA
...
...
arch/arm/plat-samsung/Kconfig
浏览文件 @
6d2f42cc
...
...
@@ -273,6 +273,19 @@ config SAMSUNG_DEV_KEYPAD
help
Compile in platform device definitions for keypad
config SAMSUNG_DEV_PWM
bool
default y if ARCH_S3C2410
help
Compile in platform device definition for PWM Timer
config S3C24XX_PWM
bool "PWM device support"
select HAVE_PWM
help
Support for exporting the PWM timer blocks via the pwm device
system
# DMA
config S3C_DMA
...
...
arch/arm/plat-samsung/Makefile
浏览文件 @
6d2f42cc
...
...
@@ -59,6 +59,7 @@ obj-$(CONFIG_SAMSUNG_DEV_ADC) += dev-adc.o
obj-$(CONFIG_SAMSUNG_DEV_IDE)
+=
dev-ide.o
obj-$(CONFIG_SAMSUNG_DEV_TS)
+=
dev-ts.o
obj-$(CONFIG_SAMSUNG_DEV_KEYPAD)
+=
dev-keypad.o
obj-$(CONFIG_SAMSUNG_DEV_PWM)
+=
dev-pwm.o
# DMA support
...
...
arch/arm/plat-samsung/dev-pwm.c
0 → 100644
浏览文件 @
6d2f42cc
/* linux/arch/arm/plat-samsung/dev-pwm.c
*
* Copyright (c) 2011 Samsung Electronics Co., Ltd.
* http://www.samsung.com
*
* Copyright (c) 2007 Ben Dooks
* Copyright (c) 2008 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk>, <ben-linux@fluff.org>
*
* S3C series device definition for the PWM timer
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <mach/irqs.h>
#include <plat/devs.h>
#define TIMER_RESOURCE_SIZE (1)
#define TIMER_RESOURCE(_tmr, _irq) \
(struct resource [TIMER_RESOURCE_SIZE]) { \
[0] = { \
.start = _irq, \
.end = _irq, \
.flags = IORESOURCE_IRQ \
} \
}
#define DEFINE_S3C_TIMER(_tmr_no, _irq) \
.name = "s3c24xx-pwm", \
.id = _tmr_no, \
.num_resources = TIMER_RESOURCE_SIZE, \
.resource = TIMER_RESOURCE(_tmr_no, _irq), \
/*
* since we already have an static mapping for the timer,
* we do not bother setting any IO resource for the base.
*/
struct
platform_device
s3c_device_timer
[]
=
{
[
0
]
=
{
DEFINE_S3C_TIMER
(
0
,
IRQ_TIMER0
)
},
[
1
]
=
{
DEFINE_S3C_TIMER
(
1
,
IRQ_TIMER1
)
},
[
2
]
=
{
DEFINE_S3C_TIMER
(
2
,
IRQ_TIMER2
)
},
[
3
]
=
{
DEFINE_S3C_TIMER
(
3
,
IRQ_TIMER3
)
},
[
4
]
=
{
DEFINE_S3C_TIMER
(
4
,
IRQ_TIMER4
)
},
};
EXPORT_SYMBOL
(
s3c_device_timer
);
arch/arm/plat-samsung/pwm.c
浏览文件 @
6d2f42cc
...
...
@@ -20,10 +20,8 @@
#include <linux/io.h>
#include <linux/pwm.h>
#include <mach/irqs.h>
#include <mach/map.h>
#include <plat/devs.h>
#include <plat/regs-timer.h>
struct
pwm_device
{
...
...
@@ -47,37 +45,6 @@ struct pwm_device {
static
struct
clk
*
clk_scaler
[
2
];
/* Standard setup for a timer block. */
#define TIMER_RESOURCE_SIZE (1)
#define TIMER_RESOURCE(_tmr, _irq) \
(struct resource [TIMER_RESOURCE_SIZE]) { \
[0] = { \
.start = _irq, \
.end = _irq, \
.flags = IORESOURCE_IRQ \
} \
}
#define DEFINE_S3C_TIMER(_tmr_no, _irq) \
.name = "s3c24xx-pwm", \
.id = _tmr_no, \
.num_resources = TIMER_RESOURCE_SIZE, \
.resource = TIMER_RESOURCE(_tmr_no, _irq), \
/* since we already have an static mapping for the timer, we do not
* bother setting any IO resource for the base.
*/
struct
platform_device
s3c_device_timer
[]
=
{
[
0
]
=
{
DEFINE_S3C_TIMER
(
0
,
IRQ_TIMER0
)
},
[
1
]
=
{
DEFINE_S3C_TIMER
(
1
,
IRQ_TIMER1
)
},
[
2
]
=
{
DEFINE_S3C_TIMER
(
2
,
IRQ_TIMER2
)
},
[
3
]
=
{
DEFINE_S3C_TIMER
(
3
,
IRQ_TIMER3
)
},
[
4
]
=
{
DEFINE_S3C_TIMER
(
4
,
IRQ_TIMER4
)
},
};
static
inline
int
pwm_is_tdiv
(
struct
pwm_device
*
pwm
)
{
return
clk_get_parent
(
pwm
->
clk
)
==
pwm
->
clk_div
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录