devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Ranostay <mranostay@gmail.com>
To: Daniel Mack <daniel@zonque.org>
Cc: Kumar Gala <galak@codeaurora.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Daniel Mack <zonque@gmail.com>,
	linux-input@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] cap1106: Add support for various cap11xx devices
Date: Tue, 23 Sep 2014 20:28:53 -0700	[thread overview]
Message-ID: <CAKzfze_EiS1XAmDsA9cFMuxKhOx-Lea7ruxLeQiJdbtfVaphmA@mail.gmail.com> (raw)
In-Reply-To: <5421174A.7060101@zonque.org>

On Mon, Sep 22, 2014 at 11:46 PM, Daniel Mack <daniel@zonque.org> wrote:
> On 09/23/2014 06:04 AM, Matt Ranostay wrote:
>> diff --git a/drivers/input/keyboard/cap1106.c b/drivers/input/keyboard/cap1106.c
>> index d70b65a..07f9e88 100644
>> --- a/drivers/input/keyboard/cap1106.c
>> +++ b/drivers/input/keyboard/cap1106.c
>> @@ -55,8 +55,6 @@
>>  #define CAP1106_REG_MANUFACTURER_ID  0xfe
>>  #define CAP1106_REG_REVISION         0xff
>>
>> -#define CAP1106_NUM_CHN 6
>> -#define CAP1106_PRODUCT_ID   0x55
>>  #define CAP1106_MANUFACTURER_ID      0x5d
>>
>>  struct cap1106_priv {
>> @@ -64,7 +62,25 @@ struct cap1106_priv {
>>       struct input_dev *idev;
>>
>>       /* config */
>> -     unsigned short keycodes[CAP1106_NUM_CHN];
>> +     u32 *keycodes;
>> +     unsigned int num_channels;
>> +};
>> +
>> +struct cap11xx_hw_model {
>> +     uint8_t product_id;
>> +     unsigned int num_channels;
>> +};
>> +
>> +enum {
>> +     CAP1106,
>> +     CAP1126,
>> +     CAP1188,
>> +};
>> +
>> +struct cap11xx_hw_model cap11xx_devices[] = {
>
> This can be static const.
>
D'oh how did I miss that?

> And, as I said, there should be a 3rd patch that renames the file and
> its functions, structs, defines etc to the more generic "11xx" variants.
>

Ok will do and resubmit.

>
> Thanks,
> Daniel
>

  reply	other threads:[~2014-09-24  3:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-23  4:04 [PATCH v2 0/2] cap1106: add support for cap11xx variants Matt Ranostay
2014-09-23  4:04 ` [PATCH v2 1/2] cap1106: Add support for various cap11xx devices Matt Ranostay
2014-09-23  6:46   ` Daniel Mack
2014-09-24  3:28     ` Matt Ranostay [this message]
2014-09-23  4:04 ` [PATCH v2 2/2] cap1106: support for irq-active-high option Matt Ranostay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKzfze_EiS1XAmDsA9cFMuxKhOx-Lea7ruxLeQiJdbtfVaphmA@mail.gmail.com \
    --to=mranostay@gmail.com \
    --cc=daniel@zonque.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=galak@codeaurora.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=zonque@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).