Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1231922 > unrolled thread
| Started by | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| First post | 2015-09-24 09:40 +0200 |
| Last post | 2015-10-02 11:40 +0200 |
| Articles | 6 — 4 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [RESEND PATCH v4 0/8] i2c: Relax mandatory I2C ID table passing Javier Martinez Canillas <javier@osg.samsung.com> - 2015-09-24 09:40 +0200
Re: [RESEND PATCH v4 0/8] i2c: Relax mandatory I2C ID table passing Lee Jones <lee.jones@linaro.org> - 2015-09-24 19:00 +0200
Re: [RESEND PATCH v4 0/8] i2c: Relax mandatory I2C ID table passing Javier Martinez Canillas <javier@osg.samsung.com> - 2015-09-24 19:40 +0200
Re: [RESEND PATCH v4 0/8] i2c: Relax mandatory I2C ID table passing Wolfram Sang <wsa@the-dreams.de> - 2015-10-01 23:00 +0200
Re: [RESEND PATCH v4 0/8] i2c: Relax mandatory I2C ID table passing Kieran Bingham <kieranbingham@gmail.com> - 2015-10-01 23:20 +0200
Re: [RESEND PATCH v4 0/8] i2c: Relax mandatory I2C ID table passing Lee Jones <lee.jones@linaro.org> - 2015-10-02 11:40 +0200
| From | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| Date | 2015-09-24 09:40 +0200 |
| Subject | Re: [RESEND PATCH v4 0/8] i2c: Relax mandatory I2C ID table passing |
| Message-ID | <qc9ih-4Qq-3@gated-at.bofh.it> |
Hello Lee,
On 09/20/2015 06:15 AM, Lee Jones wrote:
> On Thu, 17 Sep 2015, Javier Martinez Canillas wrote:
>
>> Hello,
>>
>> On 09/11/2015 01:55 PM, Kieran Bingham wrote:
>>> Hi Wolfram,
>>>
>>> I have picked this patchset [0] up from Lee to rebase it, with an aim to
>>> get this series moving again.
>>>
>>> This resend fixes up my SoB's as highlighted by Lee
>>>
>>> A couple of minor issues were resolved in the rebase. As it stood, Javier
>>> proposed [1] to merge this series, and use a follow up series to make sure
>>> that all I2C drivers are using a MODLE_DEVICE_TABLE(of,...)
>>>
>>> I have prepared a Coccinelle patch to work through the bulk of the changes
>>> required for the conversion, which will assist the transition process.
>>>
>>> Once this patch set is accepted, I will commence converting the other
>>> drivers, and submitting with a per subsystem breakdown or simliar to
>>> reduce traffic.
>>>
>>> [0] https://lkml.org/lkml/2014/8/28/283
>>> [1] https://lkml.org/lkml/2014/9/12/496
>>>
>>> Lee's most recent cover-letter (from 12 months ago) follows:
>>>
>>> Hi Wolfram,
>>>
>>> Placing this firmly back on your plate. I truly hope we don't miss
>>> another merge-window. This patch-set has the support of some pretty
>>> senior kernel maintainers, so I hope acceptance shouldn't be too
>>> difficult.
>>>
>>> As previously discussed I believe it should be okay for an I2C device
>>> driver _not_ supply an I2C ID table to match to. The I2C subsystem
>>> should be able to match via other means, such as via OF tables. The
>>> blocking factor during our previous conversation was to keep
>>> registering via sysfs up and running. This set does that.
>>>
>>> After thinking more deeply about the problem, it occurred to me that
>>> any I2C device driver which uses the sysfs method and issues an
>>> of_match_device() would also fail their probe(). Bolted on to this
>>> set is a new, more generic way for these devices to match against
>>> either of the I2C/OF tables.
>>>
>>
>> I reviewed this series but wonder if we shouldn't take another approach.
>>
>> There are two reasons why a I2C device ID table is needed even when devices
>> are registered via OF:
>>
>> 1) Export the module aliases from the I2C device ID table so userspace
>> can auto-load the correct module. This is because i2c_device_uevent
>> always reports a MODALIAS of the form i2c:<client->name>.
>>
>> 2) Match the I2C client with a I2C device ID so a struct i2c_device_id
>> is passed to the I2C driver probe() function.
>>
>> As Kieran mentioned I proposed a transition path to fix 1) and posted
>> these patches: https://lkml.org/lkml/2015/7/30/519
>>
>> While this series are fixing 2) by changing the matching logic and adding
>> a second probe callback for drivers that don't need to get a i2c_device_id.
>>
>> Now, the problem I see with this approach is that drivers will likely want
>> to get the struct of_device_id .data field since that is the reason why
>> the I2C core pass a pointer to the struct i2c_device_id in the first place.
>> So drivers could get the .driver_data field and take decisions depending on
>> which device was registered / matched.
>>
>> If the parameter is removed from probe, it means that drivers will have to
>> to open code to get it. This is the same issue that exist with OF today, if
>> a driver needs the .data field from the of_device_id table, is has to do:
>>
>> struct of_device_id *match of_match_node(of_match_table, i2c->dev.of_node);
>>
>> to get the match->data. And a similar helper will be needed to get the
>> struct i2c_device_id since the core won't do it anymore.
>>
>> So what I propose is to change the probe callback signature instead to have
>> a const void *data as the second parameter and the core can either lookup
>> from the I2C device ID table or the OF device ID table depending on which
>> mechanism was used to register the I2C device.
>>
>> That way legacy drivers will only need a I2C device ID table and DT drivers
>> will only need a OF device ID table and drivers won't need to open code the
>> matching logic to get the data stored in the tables.
>>
>> Drivers that support both legacy platform and OF based registration, will
>> have both tables and the I2C core will lookup the data from the right table.
>>
>> An alternative is to keep this series but have a generic function that gets
>> a pointer to a struct i2c_client as parameter and returns the data from the
>> correct table so drivers that don't need that information won't get it at
>> probe time but drivers that need it, can get it easily assisted by the core.
>
> You mean like i2c_match_id()? ;)
>
Well, I meant a more generic function that returns const void * or unsigned long
instead of a struct i2c_device_id *
> This patch already takes care of this issue. Please see:
>
> i2c: Export i2c_match_id() for direct use by device drivers
>
I know but as I said that is only used to get a struct i2c_device_id *, a
driver has to call i2c_of_match_device() to get a struct of_device_id *
> Drivers will know if they either only supply an I2C or OF table, so
> they will know which call to use in order to obtain their
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;
}
While it would be nice to have something like:
data = i2c_get_data(i2c);
and let the core handle which table should be looked up depending on
which mechanism was used to register the i2c device (legacy or OF).
> .driver_data|.data. attributes. We can generify the call if you think
> that makes things easier, but I don't see a need for it ATM.
>
As I explained above, it will make easier for drivers but I raised the
point to discuss if the table data should be looked up by the driver
or if the core should get it and pass to the probe() function as it is
made right now for the I2C device ID table. i.e:
static int foo_i2c_probe(struct i2c_client *i2c, const void *data)
If the correct approach is the former, then this series is the right
direction and as you said a generic match function can be added later.
But if the correct approach is the latter, then this series is not
the right direction and a different approach is needed. I don't have
a strong opinion but wanted to mention that we have two options here.
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Lee Jones <lee.jones@linaro.org> |
|---|---|
| Date | 2015-09-24 19:00 +0200 |
| Message-ID | <qci2e-rV-15@gated-at.bofh.it> |
| In reply to | #1231922 |
On Thu, 24 Sep 2015, Javier Martinez Canillas wrote:
> On 09/20/2015 06:15 AM, Lee Jones wrote:
> > On Thu, 17 Sep 2015, Javier Martinez Canillas wrote:
> >
> >> Hello,
> >>
> >> On 09/11/2015 01:55 PM, Kieran Bingham wrote:
> >>> Hi Wolfram,
> >>>
> >>> I have picked this patchset [0] up from Lee to rebase it, with an aim to
> >>> get this series moving again.
> >>>
> >>> This resend fixes up my SoB's as highlighted by Lee
> >>>
> >>> A couple of minor issues were resolved in the rebase. As it stood, Javier
> >>> proposed [1] to merge this series, and use a follow up series to make sure
> >>> that all I2C drivers are using a MODLE_DEVICE_TABLE(of,...)
> >>>
> >>> I have prepared a Coccinelle patch to work through the bulk of the changes
> >>> required for the conversion, which will assist the transition process.
> >>>
> >>> Once this patch set is accepted, I will commence converting the other
> >>> drivers, and submitting with a per subsystem breakdown or simliar to
> >>> reduce traffic.
> >>>
> >>> [0] https://lkml.org/lkml/2014/8/28/283
> >>> [1] https://lkml.org/lkml/2014/9/12/496
> >>>
> >>> Lee's most recent cover-letter (from 12 months ago) follows:
> >>>
> >>> Hi Wolfram,
> >>>
> >>> Placing this firmly back on your plate. I truly hope we don't miss
> >>> another merge-window. This patch-set has the support of some pretty
> >>> senior kernel maintainers, so I hope acceptance shouldn't be too
> >>> difficult.
> >>>
> >>> As previously discussed I believe it should be okay for an I2C device
> >>> driver _not_ supply an I2C ID table to match to. The I2C subsystem
> >>> should be able to match via other means, such as via OF tables. The
> >>> blocking factor during our previous conversation was to keep
> >>> registering via sysfs up and running. This set does that.
> >>>
> >>> After thinking more deeply about the problem, it occurred to me that
> >>> any I2C device driver which uses the sysfs method and issues an
> >>> of_match_device() would also fail their probe(). Bolted on to this
> >>> set is a new, more generic way for these devices to match against
> >>> either of the I2C/OF tables.
> >>>
> >>
> >> I reviewed this series but wonder if we shouldn't take another approach.
> >>
> >> There are two reasons why a I2C device ID table is needed even when devices
> >> are registered via OF:
> >>
> >> 1) Export the module aliases from the I2C device ID table so userspace
> >> can auto-load the correct module. This is because i2c_device_uevent
> >> always reports a MODALIAS of the form i2c:<client->name>.
> >>
> >> 2) Match the I2C client with a I2C device ID so a struct i2c_device_id
> >> is passed to the I2C driver probe() function.
> >>
> >> As Kieran mentioned I proposed a transition path to fix 1) and posted
> >> these patches: https://lkml.org/lkml/2015/7/30/519
> >>
> >> While this series are fixing 2) by changing the matching logic and adding
> >> a second probe callback for drivers that don't need to get a i2c_device_id.
> >>
> >> Now, the problem I see with this approach is that drivers will likely want
> >> to get the struct of_device_id .data field since that is the reason why
> >> the I2C core pass a pointer to the struct i2c_device_id in the first place.
> >> So drivers could get the .driver_data field and take decisions depending on
> >> which device was registered / matched.
> >>
> >> If the parameter is removed from probe, it means that drivers will have to
> >> to open code to get it. This is the same issue that exist with OF today, if
> >> a driver needs the .data field from the of_device_id table, is has to do:
> >>
> >> struct of_device_id *match of_match_node(of_match_table, i2c->dev.of_node);
> >>
> >> to get the match->data. And a similar helper will be needed to get the
> >> struct i2c_device_id since the core won't do it anymore.
> >>
> >> So what I propose is to change the probe callback signature instead to have
> >> a const void *data as the second parameter and the core can either lookup
> >> from the I2C device ID table or the OF device ID table depending on which
> >> mechanism was used to register the I2C device.
> >>
> >> That way legacy drivers will only need a I2C device ID table and DT drivers
> >> will only need a OF device ID table and drivers won't need to open code the
> >> matching logic to get the data stored in the tables.
> >>
> >> Drivers that support both legacy platform and OF based registration, will
> >> have both tables and the I2C core will lookup the data from the right table.
> >>
> >> An alternative is to keep this series but have a generic function that gets
> >> a pointer to a struct i2c_client as parameter and returns the data from the
> >> correct table so drivers that don't need that information won't get it at
> >> probe time but drivers that need it, can get it easily assisted by the core.
> >
> > You mean like i2c_match_id()? ;)
> >
>
> Well, I meant a more generic function that returns const void * or unsigned long
> instead of a struct i2c_device_id *
>
> > This patch already takes care of this issue. Please see:
> >
> > i2c: Export i2c_match_id() for direct use by device drivers
> >
>
> I know but as I said that is only used to get a struct i2c_device_id *, a
> driver has to call i2c_of_match_device() to get a struct of_device_id *
>
> > Drivers will know if they either only supply an I2C or OF table, so
> > they will know which call to use in order to obtain their
>
> 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;
> }
>
> While it would be nice to have something like:
>
> data = i2c_get_data(i2c);
>
> and let the core handle which table should be looked up depending on
> which mechanism was used to register the i2c device (legacy or OF).
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.
> > .driver_data|.data. attributes. We can generify the call if you think
> > that makes things easier, but I don't see a need for it ATM.
> >
>
> As I explained above, it will make easier for drivers but I raised the
> point to discuss if the table data should be looked up by the driver
> or if the core should get it and pass to the probe() function as it is
> made right now for the I2C device ID table. i.e:
>
> static int foo_i2c_probe(struct i2c_client *i2c, const void *data)
>
> If the correct approach is the former, then this series is the right
> direction and as you said a generic match function can be added later.
>
> But if the correct approach is the latter, then this series is not
> the right direction and a different approach is needed. I don't have
> a strong opinion but wanted to mention that we have two options here.
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
in. Using a look-up call to fetch ACPI/OF/I2C/etc data is the current
norm and is a very viable option.
Wolfram, please (finally :D) take this set.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| Date | 2015-09-24 19:40 +0200 |
| Message-ID | <qciEY-1qz-29@gated-at.bofh.it> |
| In reply to | #1232256 |
Hello Lee,
On 09/24/2015 06:58 PM, Lee Jones wrote:
[snip]
>>
>>> Drivers will know if they either only supply an I2C or OF table, so
>>> they will know which call to use in order to obtain their
>>
>> 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;
>> }
>>
>> While it would be nice to have something like:
>>
>> data = i2c_get_data(i2c);
>>
>> and let the core handle which table should be looked up depending on
>> which mechanism was used to register the i2c device (legacy or OF).
>
> 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.
>
I didn't mean this should be a blocker and yes can be done as a follow up.
>>> .driver_data|.data. attributes. We can generify the call if you think
>>> that makes things easier, but I don't see a need for it ATM.
>>>
>>
>> As I explained above, it will make easier for drivers but I raised the
>> point to discuss if the table data should be looked up by the driver
>> or if the core should get it and pass to the probe() function as it is
>> made right now for the I2C device ID table. i.e:
>>
>> static int foo_i2c_probe(struct i2c_client *i2c, const void *data)
>>
>> If the correct approach is the former, then this series is the right
>> direction and as you said a generic match function can be added later.
>>
>> But if the correct approach is the latter, then this series is not
>> the right direction and a different approach is needed. I don't have
>> a strong opinion but wanted to mention that we have two options here.
>
> 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
> in. Using a look-up call to fetch ACPI/OF/I2C/etc data is the current
> norm and is a very viable option.
>
Ok, as I said I don't have a strong opinion and you are right that this
set will make I2C to be more aligned with other subsystems (i.e: SPI that
the I2C implementation is very similar to).
> Wolfram, please (finally :D) take this set.
>
Indeed :)
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Wolfram Sang <wsa@the-dreams.de> |
|---|---|
| Date | 2015-10-01 23:00 +0200 |
| Message-ID | <qeT7m-7th-41@gated-at.bofh.it> |
| In reply to | #1232256 |
[Multipart message — attachments visible in raw view] — view raw
> > 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
[toc] | [prev] | [next] | [standalone]
| From | Kieran Bingham <kieranbingham@gmail.com> |
|---|---|
| Date | 2015-10-01 23:20 +0200 |
| Message-ID | <qeTqF-87V-3@gated-at.bofh.it> |
| In reply to | #1237737 |
Hi Wolfram,
On 1 October 2015 at 21:50, Wolfram Sang <wsa@the-dreams.de> wrote:
>
>> > 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? :)
Well if Lee doesn't, then I'll be trying to take it on.
I've already written an spatch to help with the conversion of other
drivers to follow on for this series.
Between us I think we've got motivation to make progress.
>> 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?
I don't think Lee is coming to Dublin, but I'll be there all week, if
you find time for a chat.
I'll look out for you in the hallway track, or at least on stage for
the final ELCE games :)
>
> Thanks,
>
> Wolfram
>
--
Regards
Kieran
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Lee Jones <lee.jones@linaro.org> |
|---|---|
| Date | 2015-10-02 11:40 +0200 |
| Message-ID | <qf4YO-7RN-13@gated-at.bofh.it> |
| In reply to | #1237737 |
On Thu, 01 Oct 2015, Wolfram Sang wrote:
>
> > > 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? :)
Yes.
> > 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 ;)
Great. Although, I don't see a "applied, thanks". :)
Please just take it, so we can breathe a sigh of relief and move on to
the next stage. :D
> Maybe we can talk in Dublin a bit about a possible
> next step after this series?
I'm happy to chat, although I'm afraid I won't be in Dublin this
time. Kieran will be though, so feel free to so some lobby loitering
and I'll discuss with him when he returns. Failing that we can
hook-up on Gtalk or IRC etc.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web