]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
test: spmi: fix tests
authorCaleb Connolly <caleb.connolly@linaro.org>
Mon, 8 Jan 2024 15:30:51 +0000 (15:30 +0000)
committerCaleb Connolly <caleb.connolly@linaro.org>
Tue, 16 Jan 2024 12:26:54 +0000 (12:26 +0000)
With the recent changes to the Qualcomm PMIC GPIO driver the sandbox
tests for it no longer pass, update the DTS and tests to work with the
changes.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
arch/sandbox/dts/test.dts
test/dm/spmi.c

index 4fe72664c4b31555b63a7bced51d0da6d8ad669c..e264b29554cf0c7b89f64751c0d862e88290fb57 100644 (file)
                        spmi_gpios: gpios@c000 {
                                compatible = "qcom,pm8916-gpio";
                                reg = <0xc000 0x400>;
+                               gpio-ranges = <&spmi_gpios 0 0 4>;
                                gpio-controller;
                                gpio-count = <4>;
                                #gpio-cells = <2>;
-                               gpio-bank-name="spmi";
                        };
                };
        };
index 9cc284b98cb080ed1a70805b2170df544bfeac9c..97bb0eb30fc9b19319321844cd45e61fecf6416d 100644 (file)
@@ -81,7 +81,7 @@ static int dm_test_spmi_access_peripheral(struct unit_test_state *uts)
        int offset_count;
 
        /* Get second pin of PMIC GPIO */
-       ut_assertok(gpio_lookup_name("spmi1", &dev, &offset, &gpio));
+       ut_assertok(gpio_lookup_name("pmic1", &dev, &offset, &gpio));
 
        /* Check if PMIC is parent */
        ut_asserteq(device_get_uclass_id(dev->parent), UCLASS_PMIC);
@@ -92,7 +92,7 @@ static int dm_test_spmi_access_peripheral(struct unit_test_state *uts)
        name = gpio_get_bank_info(dev, &offset_count);
 
        /* Check bank name */
-       ut_asserteq_str("spmi", name);
+       ut_asserteq_str("pmic", name);
        /* Check pin count */
        ut_asserteq(4, offset_count);