[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4CE347531D4CA947960AF71FF095B9323E9B21C5@DBDE01.ent.ti.com>
Date: Thu, 31 Jan 2013 12:25:07 +0000
From: "Patil, Rachna" <rachna@...com>
To: "Hiremath, Vaibhav" <hvaibhav@...com>,
Koen Kooi <koen@...inion.thruhere.net>
CC: Russell King <linux@....linux.org.uk>,
Samuel Ortiz <sameo@...ux.intel.com>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
Dmitry Torokhov <dtor@...l.ru>,
"devicetree-discuss@...ts.ozlabs.org"
<devicetree-discuss@...ts.ozlabs.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Rob Herring <rob.herring@...xeda.com>,
"Hebbar, Gururaja" <gururaja.hebbar@...com>,
Jonathan Cameron <jic23@....ac.uk>,
"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
Subject: RE: [PATCH v4 5/8] MFD: ti_am335x_tscadc: Add DT support
Vaibhav,
<SNIP>
> > > >
> > > > - if (!pdata) {
> > > > + if (!pdata && !pdev->dev.of_node) {
> > > > dev_err(&pdev->dev, "Could not find platform data\n");
> > > > return -EINVAL;
> > > > }
> > > >
> > > > - if (pdata->adc_init)
> > > > - adc_channels = pdata->adc_init->adc_channels;
> > > > + if (pdev->dev.platform_data) {
> > > > + if (pdata->tsc_init)
> > > > + tsc_wires = pdata->tsc_init->wires;
> > > > +
> > > > + if (pdata->adc_init)
> > > > + adc_channels = pdata->adc_init->adc_channels;
> > > > + } else {
> > > > + node = of_find_node_by_name(pdev->dev.of_node, "tsc");
> > > > + of_property_read_u32(node, "ti,wires", &tsc_wires);
> > > > +
> > > > + node = of_find_node_by_name(pdev->dev.of_node, "adc");
> > > > + of_property_read_u32(node, "ti,adc-channels", &adc_channels);
> > > > + }
> > >
> > > Since AM335x is DT only, why is there a platform data codepath and why is it the first branch it tries? And I guess the next question is related to the first: why doesn't it work when used with DT? When I copy over the nodes from the evm.dts to my board I get "tsc tsc: Missing platform data" in dmesg.
> >
> > This IP came up 1st on AM335x, but it is not platform dependent. The driver can be used on other platforms where-in DT is not supported.
> > According to the maintainers platform data takes precedence over DT. Hence the order.
> >
>
> Rachana,
>
> I see no point adding support for platform_data when you know that none of older platforms are going to use this driver and all future platforms _must_ follow device-tree model.
>
> So I agree that you should remove board file dependency from the driver.
Ok. I will remove support for platform data in the next version of patches.
>
>
> > I do not see "Missing platform data" error msg in the latest driver. I am not able to trace from where this got populated.
> >
>
> Can you share the branch which you have tested?
https://github.com/patilrachna/linux/tree/v3.8_rc3_MFD_TSCADC_DT-v2
Regards,
Rachna
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists