Skip to content

Commit

Permalink
rockchip: rk3308: fix adc key read failed when kernel dtb is enabled
Browse files Browse the repository at this point in the history
return negative erro num makes board_r.c bootflow abort, so that
the adc key driver can not be probe.

Change-Id: I815b16427dc4bf1fdeaab3b75077ed40f5a2beab
Signed-off-by: Joseph Chen <[email protected]>
  • Loading branch information
JosephChen2017 committed Oct 24, 2018
1 parent bbbd232 commit bcf8499
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mach-rockchip/rk3308/rk3308.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ int rk_board_init(void)

ret = gpio_request(GPIO0_A4, "gpio0_a4");
if (ret < 0) {
debug("request for gpio0_a4 failed:%d\n", ret);
return ret;
printf("request for gpio0_a4 failed:%d\n", ret);
return 0;
}

gpio_direction_input(GPIO0_A4);
Expand Down
2 changes: 2 additions & 0 deletions board/rockchip/evb_rk3308/evb_rk3308.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ DECLARE_GLOBAL_DATA_PTR;
#define KEY_DOWN_MIN_VAL 0
#define KEY_DOWN_MAX_VAL 30

#ifndef CONFIG_USING_KERNEL_DTB
/*
* Two board variants whith adc channel 3 is for board id
* v10: 1024, v11: 512
Expand Down Expand Up @@ -43,3 +44,4 @@ int rockchip_dnl_key_pressed(void)
else
return false;
}
#endif

0 comments on commit bcf8499

Please sign in to comment.