From mboxrd@z Thu Jan 1 00:00:00 1970 From: Manish Badarkhe Subject: Re: [PATCH V3 1/2] tps6507x-ts: Add DT support Date: Tue, 20 Aug 2013 11:26:32 +0530 Message-ID: References: <1369126458-24872-1-git-send-email-manishv.b@ti.com> <1369126458-24872-2-git-send-email-manishv.b@ti.com> <20130610060442.GA30158@core.coreip.homeip.net> <20130610180311.GA4649@core.coreip.homeip.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1969535587==" Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: Errors-To: davinci-linux-open-source-bounces-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org To: "Vishwanathrao Badarkhe, Manish" Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org" , "linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Dmitry Torokhov , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org" , "grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org" , "rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org" , "linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" List-Id: linux-input@vger.kernel.org --===============1969535587== Content-Type: multipart/alternative; boundary="047d7b15b2a500da4504e45ab83f" --047d7b15b2a500da4504e45ab83f Content-Type: text/plain; charset="ISO-8859-1" Hi Dmitry, On Mon, Jul 29, 2013 at 11:47 AM, Manish Badarkhe wrote: > Hi Dmitry > > On Mon, Jul 1, 2013 at 4:40 PM, Manish Badarkhe > wrote: > > > > Hi Dmitry > > > > > > On Wed, Jun 12, 2013 at 12:23 PM, Vishwanathrao Badarkhe, Manish > > wrote: > > > Hi Dmitry, > > > > > > On Mon, Jun 10, 2013 at 23:33:11, Dmitry Torokhov wrote: > > >> Manish, > > >> > > >> On Mon, Jun 10, 2013 at 10:23:16AM +0000, Vishwanathrao Badarkhe, > > >> Manish wrote: > > >> > Hi Dmitry, > > >> > > > >> > On Mon, Jun 10, 2013 at 11:34:42, Dmitry Torokhov wrote: > > >> > > Hi Manish, > > >> > > > > >> > > On Tue, May 21, 2013 at 02:24:17PM +0530, Vishwanathrao Badarkhe, > > >> > > Manish wrote: > > >> > > > > >> > > > + struct touchscreen_init_data *init_data = NULL; > > >> > > > + int err; > > >> > > > + > > >> > > > + if (node) > > >> > > > + node = of_find_node_by_name(node, "tsc"); > > >> > > > > >> > > Why do you have to locate OF node manually instead of already > > >> > > having it attached to the device stucture? > > >> > > > >> > As TPS6507x is mfd device containing two nodes, regulator and > > >> > touchscreen. > > >> > It is necessary to use "of_find_node_by_name" to find child "tsc" > > >> > node > > >> > of TPS6507x MFD device. > > >> > > >> 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. > > > > > > I gone through most of MFD devices in mainline kernel where > > > "of_find_node_by_name" > > > function is used in order to populate child node properties. > > > See below example of max8925 MFD device. > > > > > > Max8025 MFD device has following modules > > > 1. Touch screen > > > 2. Charger > > > 3. Backlight > > > 4. regulator > > > > > > In DT case, device node for max8925 MFD device is in > > > "arch/arm/boot/dts/mmp2-brownstone.dts" > > > file having child nodes as regulator, backlight and charger. > > > Respective drivers (regulator, backlight and charger) of max8925 MFD > > > device used > > > "of_find_node_by_name" function in order to populate child node > > > properties. > > > > > > Here, also same case for TPS6507x MFD device > > > > > > TPS6507x MFD device has two childs: > > > 1. regulator > > > 2. touch screen. > > > > > > Regulator driver for TPS6507x is already in mainline and using function > > > "of_find_node_by_name" to populate device tree properties for > > > regulators. > > > On similar lines I used "of_find_node_by_name" to populate device > > > tree properties for touch screen. > > > > > > Still, I agreed that it is possible to attach OF data to child platform > > > device > > > but it requires changes in MFD driver of TPS6507x. > > > > > > Please let me know your opinion about this. > > > > Please let me know so accordingly I will make changes in code. > > > > Please provide your comments so accordingly will make changes in code. > > Please let me know your comments so I will do necessary modifications and post this series again. Regards Manish Badarkhe --047d7b15b2a500da4504e45ab83f Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable
Hi Dmitry,

On Mon, Jul 29, 2013 at 11:47 AM, Manish Badarkhe <badarkhe.manish-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi Dmitry

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

Please provide your comments so accordingly will make changes i= n code.

=A0=A0 Please let me know your comments so I will do= necessary modifications
=A0=A0 and post this series again.

Regards
Ma= nish Badarkhe
--047d7b15b2a500da4504e45ab83f-- --===============1969535587== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============1969535587==--