[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20121207133705.59AC03E0B87@localhost>
Date: Fri, 07 Dec 2012 13:37:05 +0000
From: Grant Likely <grant.likely@...retlab.ca>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: Lee Jones <lee.jones@...aro.org>,
Samuel Ortiz <sameo@...ux.intel.com>,
rabin.vincent@...ricsson.com, shiraz.hashim@...com,
devicetree-discuss@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
spear-devel@...t.st.com, linus.walleij@...aro.org,
Vipul Kumar Samar <vipulkumar.samar@...com>
Subject: Re: [PATCH V5 2/2] mfd: stmpe: Update DT support in stmpe driver
On Thu, 6 Dec 2012 07:28:22 +0530, Viresh Kumar <viresh.kumar@...aro.org> wrote:
> First of all, thanks for explaining :)
>
> On 6 December 2012 04:12, Grant Likely <grant.likely@...retlab.ca> wrote:
> > On Sat, 1 Dec 2012 00:33:46 +0530, Viresh Kumar <viresh.kumar@...aro.org> wrote:
> >> This first tries to match the table my patch added, _BUT_ the string will
> >> never match as we had "st,stmpe810" in table and "stmpe810" in dev.
> >
> > of_driver_match_device() matches against the compatible list in
> > dev->of_node, not against the device name. So, if the compatible
> > property has a string that is in the table, then it really should match
> > against it.
>
> How could i misread it? Yes you are correct.
>
> >> static int i2c_device_probe(struct device *dev)
> >> {
> >> .....
> >> status = driver->probe(client, i2c_match_id(driver->id_table, client));
> >
> > Here things are a bit wonky. Even if matched against the table, it is
>
> table means of_device_id table ?
yes
>
> > possible that it also matches against i2c_match_id() and that data is
> > passed to the driver.
>
> It is a possibility or guarantee ? And so whatever device name we got from
> modalias routine, should match with the names in driver->id_table.
possibility. If the generated alias name does match something in
driver->id_table, then that pointer will be returned here.
> > But regardless, it is the responsiblity of the probe function to go and
> > look if of_driver_match_device() matches against anything if it cares
> > about the of_match_table entries (for instance, if there is extra data
> > attached).
>
> Ok, so filling .data field in of_device_id[] is not required for our case as
> we aren't doing anything special in our drivers.
As long as things are simple, correct.
g.
--
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