Hi Dmitry<br><br>On Wed, Jun 12, 2013 at 12:23 PM, Vishwanathrao Badarkhe, Manish <<a href="mailto:manishv.b@ti.com">manishv.b@ti.com</a>> wrote:<br>> Hi Dmitry,<br>><br>> On Mon, Jun 10, 2013 at 23:33:11, Dmitry Torokhov wrote:<br>
>> Manish,<br>>><br>>> On Mon, Jun 10, 2013 at 10:23:16AM +0000, Vishwanathrao Badarkhe, Manish wrote:<br>>> > Hi Dmitry,<br>>> ><br>>> > On Mon, Jun 10, 2013 at 11:34:42, Dmitry Torokhov wrote:<br>
>> > > Hi Manish,<br>>> > ><br>>> > > On Tue, May 21, 2013 at 02:24:17PM +0530, Vishwanathrao Badarkhe, Manish wrote:<br>>> > ><br>>> > > > +       struct touchscreen_init_data *init_data = NULL;<br>
>> > > > +       int err;<br>>> > > > +<br>>> > > > +       if (node)<br>>> > > > +               node = of_find_node_by_name(node, "tsc");<br>>> > ><br>
>> > > Why do you have to locate OF node manually instead of already having it attached to the device stucture?<br>>> ><br>>> > As TPS6507x is mfd device containing two nodes, regulator and touchscreen.<br>
>> > It is necessary to use "of_find_node_by_name" to find child "tsc" node<br>>> > of TPS6507x MFD device.<br>>><br>>> I understand that TPS6507x is a MFD device, However, I still do not understand why you do not attach OF data to the child platform device representing touch screen when you create it.<br>
><br>> I gone through most of MFD devices in mainline kernel where "of_find_node_by_name"<br>> function is used in order to populate child node properties.<br>> See below example of max8925 MFD device.<br>
><br>> Max8025 MFD device has following modules<br>> 1. Touch screen<br>> 2. Charger<br>> 3. Backlight<br>> 4. regulator<br>><br>> In DT case, device node for max8925 MFD device is in "arch/arm/boot/dts/mmp2-brownstone.dts"<br>
> file having child nodes as regulator, backlight and charger.<br>> Respective drivers (regulator, backlight and charger) of max8925 MFD device used<br>> "of_find_node_by_name" function in order to populate child node properties.<br>
><br>> Here, also same case for TPS6507x MFD device<br>><br>> TPS6507x MFD device has two childs:<br>> 1. regulator<br>> 2. touch screen.<br>><br>> Regulator driver for TPS6507x is already in mainline and using function<br>
> "of_find_node_by_name" to populate device tree properties for regulators.<br>> On similar lines I used "of_find_node_by_name" to populate device<br>> tree properties for touch screen.<br>><br>
> Still, I agreed that it is possible to attach OF data to child platform device<br>> but it requires changes in MFD driver of TPS6507x.<br>><br>> Please let me know your opinion about this.<br><br>Please let me know so accordingly I will make changes in code.<br>
<br>Regards<br>Manish Badarkhe<br><br>