Re: [PATCH 1/4] mfd: add support for AMS AS3722 PMIC

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

 




On Tuesday 17 September 2013 05:33 PM, Laxman Dewangan wrote:
On Tuesday 17 September 2013 04:54 PM, Mark Brown wrote:
* PGP Signed by an unknown key

On Tue, Sep 17, 2013 at 12:15:35PM +0530, Laxman Dewangan wrote:

+MFD driver adds following mfd devices with their compatible values:
+as3722-gpio: The compatible value of this as3722 gpio driver is
+         "ams,as3722-gpio";
+as3722-regulator: The compatible value of this as3722 regulator driver is
+         "ams,as3722-regulator";
+as3722-rtc: The compatible value of this as3722 rtc driver is
+         "ams,as3722-rtc";
+as3722-adc: The compatible value of this as3722 adc driver is
+         "ams,as3722-adc";
+as3722-power-off: he compatible value of this as3722 power off driver is
+         "ams,as3722-power-off".
Personally I find this to be exposing implementation details of Linux -
unless there is something reusable about the binding that'd allow it to
be used to describe the contents of the chip the subnodes really aren't
adding any information that wasn't present from just knowing the parent
chip.  If there were relocatable IPs it'd be a bit different.

Ok, then can we fix the the sub node name and parse these when adding mfd devices and set the pdev->dev.of_node of child devices.
Like
parent_node {
    ...
    child1_node {
        ...
    };

    child1_node {
Sorry, just wanted to say child2_node here.

...
    };
};


and fix the node name of child1 and child2 and have this as part of mfd-cell's of_node_name. So when we add the mfd devices, we look for these fixed name and if matches then set the dev->of_node for that child sub device.

This will avoid the code for getting child node pointer from parent node in each driver. We fix the child node name in any case.



--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux