lkml.org 
[lkml]   [2014]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] cap1106: Add support for various cap11xx devices
On 09/22/2014 12:46 AM, Matt Ranostay wrote:
> On Sun, Sep 21, 2014 at 2:58 AM, Daniel Mack <daniel@zonque.org> wrote:
>> On 09/21/2014 05:01 AM, Matt Ranostay wrote:

>>> @@ -313,12 +307,16 @@ static int cap1106_i2c_probe(struct i2c_client *i2c_client,
>>>
>>> static const struct of_device_id cap1106_dt_ids[] = {
>>> { .compatible = "microchip,cap1106", },
>>> + { .compatible = "microchip,cap1126", },
>>> + { .compatible = "microchip,cap1188", },
>>
>> Hmm, how can that work unless you set .data to the number of channels
>> here? Did you test that with a DT-enabled board?
>>
> Yes it was tested on a BBB. The num_channels is set from cap1106_i2c_ids

Ah ok. I forgot there's this fallback to the i2c ids. What others driver
do is to use of_match_device() in the probe function, and then access
->data of the returned match.

But I'm fine with falling back to cap1106_i2c_ids unless anyone else has
objections.


Thanks,
Daniel




\
 
 \ /
  Last update: 2014-09-22 10:21    [W:0.553 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site