public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Jin Park <jinyoungp@nvidia.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] aat2870: Adding backlight, regulator and mfd driver
Date: Mon, 30 May 2011 02:09:42 -0700	[thread overview]
Message-ID: <1306746582.20175.13.camel@Joe-Laptop> (raw)
In-Reply-To: <1306743452-26386-2-git-send-email-jinyoungp@nvidia.com>

On Mon, 2011-05-30 at 17:17 +0900, Jin Park wrote:
> Adding backlight, regulator and mfd driver for AnalogicTech AAT2870.
> Signed-off-by: Jin Park <jinyoungp@nvidia.com>

Hi Jin, just trivia

> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
[]
> +config MFD_AAT2870_CORE
> +	bool "Support for the AnlogicTech AAT2870"

Analogic

> +++ b/drivers/mfd/aat2870-core.c
[]
> +static struct aat2870_register aat2870_regs[AAT2870_REG_NUM] = {

Might describe this as the reg_cache as well.
readable, writable could be bool.

> +	/* readable, writeable, value */
> +	{ 0, 1, 0x00 },	/* 0x00 AAT2870_BL_CH_EN */

[]

> diff --git a/drivers/regulator/aat2870-regulator.c b/drivers/regulator/aat2870-regulator.c
[]
> +static int aat2870_ldo_voltages[] = {

static const int?

> +	1200000, 1300000, 1500000, 1600000,
> +	1800000, 2000000, 2200000, 2500000,
> +	2600000, 2700000, 2800000, 2900000,
> +	3000000, 3100000, 3200000, 3300000,

[]

> diff --git a/include/linux/mfd/aat2870.h b/include/linux/mfd/aat2870.h
[]
> +/* Backlight current magnitude (mA) */
> +enum aat2870_current {
> +	AAT2870_CURRENT_0_45 = 0,

Seems odd and error prone to add enum = value
every 10 places.

> +	AAT2870_CURRENT_0_90,
> +	AAT2870_CURRENT_1_80,
> +	AAT2870_CURRENT_2_70,
> +	AAT2870_CURRENT_3_60,
> +	AAT2870_CURRENT_4_50,
> +	AAT2870_CURRENT_5_40,
> +	AAT2870_CURRENT_6_30,
> +	AAT2870_CURRENT_7_20,
> +	AAT2870_CURRENT_8_10,
> +	AAT2870_CURRENT_9_00 = 10,
[]
> +struct aat2870_register {
> +	int readable;
> +	int writeable;

bool?

> +struct aat2870_data {
> +	struct device *dev;
> +	struct i2c_client *client;
> +
> +	struct mutex io_lock;
> +	struct aat2870_register *reg_cache; /* register cache */
> +	int en_pin; /* enable GPIO pin (if < 0, ignore this value) */
> +	int is_enable;

bool?



  reply	other threads:[~2011-05-30  9:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-30  8:17 [PATCH 0/1] Submitting aat2870 driver Jin Park
2011-05-30  8:17 ` [PATCH 1/1] aat2870: Adding backlight, regulator and mfd driver Jin Park
2011-05-30  9:09   ` Joe Perches [this message]
2011-06-20 10:29   ` Samuel Ortiz
  -- strict thread matches above, loose matches on Subject: below --
2011-05-31  4:26 Jin Park
2011-05-31  6:30 ` Joe Perches
2011-05-31  6:46 Jin Park

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=1306746582.20175.13.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=jinyoungp@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@linux.intel.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