From: Wolfram Sang <wsa@the-dreams.de>
To: Lee Jones <lee.jones@linaro.org>
Cc: Javier Martinez Canillas <javier@osg.samsung.com>,
Kieran Bingham <kieranbingham@gmail.com>,
Samuel Ortiz <sameo@linux.intel.com>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
grant.likely@linaro.org
Subject: Re: [RESEND PATCH v4 0/8] i2c: Relax mandatory I2C ID table passing
Date: Thu, 1 Oct 2015 22:50:35 +0200 [thread overview]
Message-ID: <20151001205035.GB7514@katana> (raw)
In-Reply-To: <20150924165807.GA27197@x1>
[-- Attachment #1: Type: text/plain, Size: 1982 bytes --]
> > Yes but that is not true for drivers that support both OF and legacy board
> > files. For those drivers, there will be a lot of boiler plate code duplicated
> > that would look something like:
> >
> > unsigned long data;
> > struct of_device_id *match;
> > struct i2c_devicd_id *id;
> >
> > if (i2c->dev.of_node) {
> > match = i2c_of_match_device(of_match_table, i2c);
> > if (!match)
> > return -EINVAL;
> >
> > data = (unsigned long)match->data;
> > } else {
> > id = i2c_match_id(id_table, i2c);
> > if (!id)
> > return -EINVAL;
> >
> > data = id->driver_data;
> > }
I said this before: It is not only the additional code, I think it is
quite unelegant to to do the matching again which has already been done.
(and DT boottime has already increased, partly due to the excessive
string matching). Also, I wouldn't like to see an I2C specific solution;
this problem exists for other subsystems, too.
> I'm fine with a new API for this stuff. I'm even happy to go ahead
> and code it up, but it's important to note that this is work which
> should be based on this set and not a blocker for this set to be
> accepted.
Is that a promise? :)
> The correct approach is the former. One of the aims of this set was
> to bring the I2C .probe() call-back more into line with the majority
> of the other .probe() calls in the kernel i.e. with only a single
> parameter. I'm really not a fan of passing some random void pointer
Yes, I like this about this series.
> in. Using a look-up call to fetch ACPI/OF/I2C/etc data is the current
> norm and is a very viable option.
It is the status quo, but that doesn't make it better IMO.
> Wolfram, please (finally :D) take this set.
I tend to give in ;) Maybe we can talk in Dublin a bit about a possible
next step after this series?
Thanks,
Wolfram
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-10-01 20:50 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-11 11:55 [RESEND PATCH v4 0/8] i2c: Relax mandatory I2C ID table passing Kieran Bingham
2015-09-11 11:55 ` [RESEND PATCH v4 1/8] i2c: Add pointer dereference protection to i2c_match_id() Kieran Bingham
2015-09-11 11:55 ` [RESEND PATCH v4 2/8] i2c: Add the ability to match device to compatible string without an of_node Kieran Bingham
2015-09-11 11:55 ` [RESEND PATCH v4 3/8] i2c: Match using traditional OF methods, then by vendor-less compatible strings Kieran Bingham
2015-09-11 11:56 ` [RESEND PATCH v4 5/8] i2c: Export i2c_match_id() for direct use by device drivers Kieran Bingham
[not found] ` <1441972564-9621-1-git-send-email-kieranbingham-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-11 11:56 ` [RESEND PATCH v4 4/8] i2c: Make I2C ID tables non-mandatory for DT'ed devices Kieran Bingham
2015-09-11 11:56 ` [RESEND PATCH v4 6/8] i2c: Provide a temporary .probe2() call-back type Kieran Bingham
2015-09-11 11:56 ` [RESEND PATCH v4 7/8] mfd: 88pm860x: Move over to new I2C device .probe() call Kieran Bingham
2015-09-11 11:56 ` [RESEND PATCH v4 8/8] mfd: as3722: Rid driver of superfluous I2C device ID structure Kieran Bingham
2015-09-17 15:46 ` [RESEND PATCH v4 0/8] i2c: Relax mandatory I2C ID table passing Javier Martinez Canillas
2015-09-20 4:15 ` Lee Jones
2015-09-24 7:38 ` Javier Martinez Canillas
2015-09-24 16:58 ` Lee Jones
2015-09-24 17:32 ` Javier Martinez Canillas
2015-10-01 20:50 ` Wolfram Sang [this message]
2015-10-01 21:10 ` Kieran Bingham
2015-10-02 9:35 ` Lee Jones
2015-09-11 16:30 ` Lee Jones
2015-10-09 21:16 ` Wolfram Sang
2015-10-12 11:36 ` Kieran Bingham
2016-03-08 4:22 ` Lee Jones
[not found] ` <CAB3z_RpyRr5T4W2iLJfA8xiZLuiMgAN=-EN=xgv2RDTNMmOdzg@mail.gmail.com>
2016-03-09 5:30 ` Lee Jones
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=20151001205035.GB7514@katana \
--to=wsa@the-dreams.de \
--cc=grant.likely@linaro.org \
--cc=javier@osg.samsung.com \
--cc=kieranbingham@gmail.com \
--cc=lee.jones@linaro.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sameo@linux.intel.com \
/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).