Re: [PATCH 1/3] cap1106: Add support for various cap11xx devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 09/22/2014 12:46 AM, Matt Ranostay wrote:
> On Sun, Sep 21, 2014 at 2:58 AM, Daniel Mack <daniel@xxxxxxxxxx> 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


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux