From: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Viresh Kumar <viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: rabin.vincent-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org,
Samuel Ortiz <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
spear-devel-nkJGhpqTU55BDgjK7y7TUQ@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
shiraz.hashim-qxv4g6HH51o@public.gmane.org
Subject: Re: [PATCH V5 2/2] mfd: stmpe: Update DT support in stmpe driver
Date: Thu, 6 Dec 2012 10:11:31 +0000 [thread overview]
Message-ID: <20121206101131.GP2718@gmail.com> (raw)
In-Reply-To: <CAKohpokNQB6L2vvjmvA7_3KomFXnV9wZ-uBjrfRVuBL=QWgr_Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Thu, 06 Dec 2012, Viresh Kumar wrote:
> On 6 December 2012 15:20, Lee Jones <lee.jones@linaro.org> wrote:
> >> > 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.
> >
> > This is exactly my point, and the reason I bought it up in the
> > first place. Normally when you specify an ID table and populate
> > the .data attribute, you parse for it in the code and then cast
> > it back to some kind of useful data. However, you're not doing
> > that, which is precisely why I wondered if the table was
> > necessary at all. In all my testing, the DT portion worked and
> > the correct STMPE chip was identified without it.
>
> Probably Vipul (Author of this patch), copied it from existing i2c/spi
> clients, which have also added this blindly :)
>
> > So, are you adding the table for good reason, or because you
> > think it's the right thing to do?
>
> I would be keeping the table as that's the right thing to do.
So then I'm back to my original question, why?
What is it used for? What difference does it make?
I could understand if the .data attribute was used in the driver
to make vital decisions based on STMPE version, but it's not. So
why are we burdening the driver with unused code that's not
required? Other than to get your mainlined patch-count up of
course? This has an air of "placing header files in alphabetical
order" about it. ;)
> By chance
> our non-DT and DT tables had a difference of "st," only in the name
> of instances and so it worked without tables. Otherwise it couldn't
> have worked.
>
> Over that, i am looking to bring the "stmpe,id" binding back again (unless
> you have a better option), as device name is not coming from DT currently,
> which we discussed earlier.
Or you could not put unnecessary bindings into the Device Tree
by putting two and two together and realise that using the table
is the correct thing to do instead. This actually gives reason
to you previous patch, but should probably be fixed-up into it
so it has some proper meaning/purpose. ;)
--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
next prev parent reply other threads:[~2012-12-06 10:11 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-29 14:40 [PATCH V5 1/2] mfd: stmpe: Get rid of irq_invert_polarity Viresh Kumar
[not found] ` <2dcd7cb4c4022fa24b5328974e4226f5aaf89419.1354199865.git.viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-11-29 14:40 ` [PATCH V5 2/2] mfd: stmpe: Update DT support in stmpe driver Viresh Kumar
[not found] ` <121653def4e985b0c1b59045637dd4518f97e73a.1354199865.git.viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-11-30 10:57 ` Samuel Ortiz
2012-11-30 12:45 ` Lee Jones
2012-11-30 13:11 ` Viresh Kumar
2012-11-30 13:20 ` Lee Jones
[not found] ` <20121130132036.GA23648-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-11-30 13:44 ` Viresh Kumar
2012-11-30 15:45 ` Lee Jones
2012-11-30 19:03 ` Viresh Kumar
2012-12-05 13:03 ` Viresh Kumar
2012-12-05 13:19 ` Lee Jones
2012-12-05 13:24 ` Viresh Kumar
2012-12-05 22:42 ` Grant Likely
2012-12-06 1:58 ` Viresh Kumar
2012-12-06 9:50 ` Lee Jones
[not found] ` <20121206095019.GN2718-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-12-06 9:56 ` Viresh Kumar
[not found] ` <CAKohpokNQB6L2vvjmvA7_3KomFXnV9wZ-uBjrfRVuBL=QWgr_Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-12-06 10:11 ` Lee Jones [this message]
2012-12-06 10:19 ` Viresh Kumar
2012-12-06 10:35 ` Lee Jones
2012-12-06 10:42 ` Viresh Kumar
2012-12-06 11:12 ` Lee Jones
2012-12-06 11:19 ` Viresh Kumar
[not found] ` <CAKohponrZ8a+=ozXox60nRVBO174Nr=GoSjKkkz7KjLCxd5BhQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-12-06 11:33 ` Lee Jones
2012-12-07 13:37 ` Grant Likely
2012-12-06 2:36 ` Viresh Kumar
2012-12-07 13:44 ` Grant Likely
2012-12-01 16:49 ` [PATCH V5 1/2] mfd: stmpe: Get rid of irq_invert_polarity Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121206101131.GP2718@gmail.com \
--to=lee.jones-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=rabin.vincent-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org \
--cc=sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=shiraz.hashim-qxv4g6HH51o@public.gmane.org \
--cc=spear-devel-nkJGhpqTU55BDgjK7y7TUQ@public.gmane.org \
--cc=viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).