]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: rk3308: fix rockchip_dnl_key_pressed() on roc-cc
authorJohn Keeping <john@metanate.com>
Thu, 14 Jul 2022 14:09:12 +0000 (15:09 +0100)
committerKever Yang <kever.yang@rock-chips.com>
Sun, 4 Sep 2022 12:00:38 +0000 (20:00 +0800)
Commit 6aa4fe3912 ("dm: core: Rename and fix uclass_get_by_name_len()")
changed uclass_get_device_by_name() to an exact match when previously it
behaved as a prefix match.

The roc-cc code relied on this prefix match by only specifying part of
the device name.  Fix this by using the full name including the address.

Signed-off-by: John Keeping <john@metanate.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
board/firefly/firefly-rk3308/roc_cc_rk3308.c

index 28dcc2a6903af649938ce2db4ace2adc28e6f483..bdf3cc03dc5a5dcae811bfe33f6ba6edc3a3440d 100644 (file)
@@ -70,7 +70,7 @@ int rockchip_dnl_key_pressed(void)
 {
        unsigned int val;
 
-       if (adc_channel_single_shot("saradc", 1, &val)) {
+       if (adc_channel_single_shot("saradc@ff1e0000", 1, &val)) {
                printf("%s read adc key val failed\n", __func__);
                return false;
        }