Thread (13 messages) 13 messages, 3 authors, 2014-09-22

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

From: Daniel Mack <daniel@zonque.org>
Date: 2014-09-22 07:36:45
Also in: linux-input, lkml

On 09/22/2014 12:46 AM, Matt Ranostay wrote:
On Sun, Sep 21, 2014 at 2:58 AM, Daniel Mack [off-list ref] wrote:
quoted
On 09/21/2014 05:01 AM, Matt Ranostay wrote:
quoted
quoted
@@ -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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help