Re: [PATCH v2 07/10] iio: adc: ad7606: Add compatibility to fw_nodes

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

 




On 9/24/24 17:28, David Lechner wrote:
On Fri, Sep 20, 2024 at 7:33 PM Guillaume Stols <gstols@xxxxxxxxxxxx> wrote:
On the parallel version, the current implementation is only compatible
with id tables and won't work with fw_nodes, this commit intends to fix
it.

Also, chip info is moved in the .h file so to be accessible to all the
driver files that can set a pointer to the corresponding chip as the
driver data.
This sounds like two unrelated changes, so maybe we should have two patches?
Those changes are closely related to each other, in the sense that we now gather the ad7606_chip_info structure directly from the id or match structure, and not anymore the id which is an index where you can get it as an element. I will update the commit message to highlight it more.


  static const struct of_device_id ad7606_of_match[] = {
-       { .compatible = "adi,ad7605-4" },
-       { .compatible = "adi,ad7606-4" },
-       { .compatible = "adi,ad7606-6" },
-       { .compatible = "adi,ad7606-8" },
-       { .compatible = "adi,ad7606b" },
-       { .compatible = "adi,ad7616" },
+       { .compatible = "adi,ad7605-4", &ad7605_4_info },
+       { .compatible = "adi,ad7606-4", &ad7606_4_info },
+       { .compatible = "adi,ad7606-6", &ad7606_6_info },
+       { .compatible = "adi,ad7606-8", &ad7606_8_info },
+       { .compatible = "adi,ad7606b", &ad7606b_info },
+       { .compatible = "adi,ad7616", &ad7616_info },
Since we have .compatible = , we should also have .data = for the chip info.
ack




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux