two kernel modules for the same device address in dts

Ezra Buehler ezra at easyb.ch
Fri Apr 10 05:46:19 EDT 2020


Hi Tomek,

On 7 Apr 2020, at 15:26, Tomek The Messenger <tomekthemessenger at gmail.com> wrote:
> &i2c1 {
> default_device: default_device at 75 {
>     compatible = "some-name-never-mind";
>      reg = <0x75>;
> };
> my_device: my_device at 0 {
> compatible = "my-device-which-do-only-some-minor-part";
> reg = <0x75>;
> };
> };

I am not an expert here, I do not know what the best practice is.
But, I would do following:

/ {
(...)

    my_device: my_device at 0 {
        default-device = <&default_device>;
    }

(...)
};

&i2c1 {
    default_device: default_device at 75 {
        compatible = "some-name-never-mind";
        reg = <0x75>;
    };
};

Cheers,
Ezra.


More information about the Kernelnewbies mailing list