bfin_rotary: replace bfin specific MMR function with generic IO function
Subsystems (2)
PATCH v4 3/3 bfin_rotary: replace bfin specific MMR function with generic IO function
From: Sonic Zhang <[email protected]>
- use readw and writew to access rotary MMRs
- remap rotary register physical address into kernel space in probe
v2-changes:
- replace kzalloc with devm_kzalloc
- replace request_irq with devm_request_irq
- remove memory free and irq free from the device remove function
v3-changes:
- move managed resources to a separate patch
v4-changes:
- remap rotary register physical address into kernel space in probe
Signed-off-by Sonic Zhang <[email protected]>
--- arch/blackfin/mach-bf527/boards/ad7160eval.c | 5 +++ arch/blackfin/mach-bf527/boards/ezkit.c | 5 +++ arch/blackfin/mach-bf548/boards/ezkit.c | 5 +++ arch/blackfin/mach-bf609/boards/ezkit.c | 5 +++ drivers/input/misc/bfin_rotary.c | 62 ++++++++++++++++++-------- 5 files changed, 63 insertions(+), 19 deletions(-)
arch/blackfin/mach-bf527/boards/ad7160eval.c +5 -0
@@ -688,6 +688,11 @@ static struct bfin_rotary_platform_data bfin_rotary_data = {static struct resource bfin_rotary_resources[] = { { + .start =CNT_CONFIG , + .end =CNT_CONFIG +0xff , + .flags =IORESOURCE_MEM , + }, + { .start =IRQ_CNT , .end =IRQ_CNT , .flags =IORESOURCE_IRQ ,
arch/blackfin/mach-bf527/boards/ezkit.c +5 -0
@@ -1114,6 +1114,11 @@ static struct bfin_rotary_platform_data bfin_rotary_data = {static struct resource bfin_rotary_resources[] = { { + .start =CNT_CONFIG , + .end =CNT_CONFIG +0xff , + .flags =IORESOURCE_MEM , + }, + { .start =IRQ_CNT , .end =IRQ_CNT , .flags =IORESOURCE_IRQ ,
arch/blackfin/mach-bf548/boards/ezkit.c +5 -0
@@ -173,6 +173,11 @@ static struct bfin_rotary_platform_data bfin_rotary_data = {static struct resource bfin_rotary_resources[] = { { + .start =CNT_CONFIG , + .end =CNT_CONFIG +0xff , + .flags =IORESOURCE_MEM , + }, + { .start =IRQ_CNT , .end =IRQ_CNT , .flags =IORESOURCE_IRQ ,
arch/blackfin/mach-bf609/boards/ezkit.c +5 -0
@@ -88,6 +88,11 @@ static struct bfin_rotary_platform_data bfin_rotary_data = {static struct resource bfin_rotary_resources[] = { { + .start =CNT_CONFIG , + .end =CNT_CONFIG +0xff , + .flags =IORESOURCE_MEM , + }, + { .start =IRQ_CNT , .end =IRQ_CNT , .flags =IORESOURCE_IRQ ,
drivers/input/misc/bfin_rotary.c +43 -19
142 lines not on this page · raw message
Signature · 1 line
1.7.9.5