From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Mack Subject: Re: [PATCH 1/3] cap1106: Add support for various cap11xx devices Date: Mon, 22 Sep 2014 09:36:40 +0200 Message-ID: <541FD188.6030602@zonque.org> References: <1411268469-21283-1-git-send-email-mranostay@gmail.com> <1411268469-21283-2-git-send-email-mranostay@gmail.com> <541EA149.5000408@zonque.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from svenfoo.org ([82.94.215.22]:40048 "EHLO mail.zonque.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750763AbaIVHgn (ORCPT ); Mon, 22 Sep 2014 03:36:43 -0400 In-Reply-To: Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Matt Ranostay Cc: Kumar Gala , linux-input@vger.kernel.org, "linux-kernel@vger.kernel.org" , Dmitry Torokhov , Rob Herring , "devicetree@vger.kernel.org" On 09/22/2014 12:46 AM, Matt Ranostay wrote: > On Sun, Sep 21, 2014 at 2:58 AM, Daniel Mack 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