All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Mack <daniel@zonque.org>
To: Matt Ranostay <mranostay@gmail.com>,
	galak@codeaurora.org, dmitry.torokhov@gmail.com,
	zonque@gmail.com, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org, robh+dt@kernel.org
Cc: devicetree@vger.kernel.org
Subject: Re: [PATCH v2 1/2] cap1106: Add support for various cap11xx devices
Date: Tue, 23 Sep 2014 08:46:34 +0200	[thread overview]
Message-ID: <5421174A.7060101@zonque.org> (raw)
In-Reply-To: <1411445057-30048-2-git-send-email-mranostay@gmail.com>

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.

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.


Thanks,
Daniel


  reply	other threads:[~2014-09-23  6:46 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 [this message]
2014-09-24  3:28     ` Matt Ranostay
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=5421174A.7060101@zonque.org \
    --to=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=mranostay@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.