Skip to content

ad7380 driver failed to load #2993

@jwittke

Description

@jwittke

I am using one of the newer Raspberry Pi Linux kernel branches:

# uname -r
6.15.11-v8

On a Raspberry Pi 4 Model B Rev 1.4,
with the ad7380 iio driver from the Analog Linux branch rpi-6.12.y using the newest ad7380.c (ddd1c08).

When using a overlay like this:

// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
/plugin/;

/ {
        compatible = "brcm,bcm2835";

        fragment@0 {
                target-path = "/";
                __overlay__ {
                        supply_3_3V: fixedregulator@0 {
                                compatible = "regulator-fixed";
                                regulator-name = "fixed-supply";
                                regulator-min-microvolt = <3300000>;
                                regulator-max-microvolt = <3300000>;
                                regulator-boot-on;
                        };
                };
        };


        fragment@1 {
                target = <&spi0>;
                __overlay__ {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        status = "okay";

                        ad7386-4@0 {
                                compatible = "adi,ad7386-4";
                                reg = <0>;
                                spi-max-frequency = <8000000>;
                                spi-cpol;
                                spi-cpha;
                                vcc-supply = <&supply_3_3V>;
                                vlogic-supply = <&supply_3_3V>;
                        };
                };
        };

        fragment@2 {
                target = <&spidev0>;
                __overlay__ {
                        status = "disabled";
                };
        };
};

I can't correctly load the driver while attached the EVAL-AD7386-4 to the Raspberry using the correct SPI gpio pins.

Reading the kernel messages i get:

$ dmesg

[ 5.830845] ad7380 spi0.0: probe with driver ad7380 failed with error -22

I traced the error with printk in the module to the ad7380_init function when the driver wants to
do a hard reset using the regmap regmap_update_bits.

Is it a fault in the SPI communication? How can I check this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions