two kernel modules for the same device address in dts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi
I am trying to design some functionality and I wonder if something like that is supported in dts and linux:

&i2c1 {
default_device: default_device@75 {
    compatible = "some-name-never-mind";
     reg = <0x75>;
};
my_device: my_device@0 {
compatible = "my-device-which-do-only-some-minor-part";
reg = <0x75>;
};
};

You know what I mean, is it possible to declare in dts two kernel modules for the same device with the same address? I don't want to extend default_device functionality, I want put my functionality in separate kernel module. I am currently in the middle of implementation but I wonder if it has sense. Both kernel modules will have in fact:
probe(struct i2c_client *client, ...), I wonder if probe won't fail. At least in user space shell "i2cdetect -r 1" returns UU for address 0x75 when kernel module is loaded. So that is why I suspect probe might fail.

Another story is what in case somebody asks for access to device at the same time from two kernel modules. I hope function:
i2c_smbus_write_byte_data
has some kind of spinlock, mutexes and just wait till bus is free, but who knows.:)
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux