mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Dajun Chen <dajun.chen@gmail.com>
Cc: cbou@mail.ru, dwmw2@infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCHv2 4/11] Power:Battery module of DA9052 PMIC device driver (RESEND)
Date: Wed, 14 Jul 2010 11:24:49 +0100	[thread overview]
Message-ID: <20100714102448.GE5933@sirena.org.uk> (raw)
In-Reply-To: <AANLkTilbY_V_0E2NtXwrhV8Rd4Efpy8p8FvrAigH6A00@mail.gmail.com>

On Wed, Jul 14, 2010 at 10:44:10AM +0100, Dajun Chen wrote:

> +#ifndef _BAT_H
> +#define _BAT_H

This is likely to run into namespace conflicts with other stuff -
including the chip name should fix that.

> +
> +#define DA9052_CHG_MEASUREMENT_FAIL			-154

As has been pointed out with all your other patches please you standard
Linux error codes rather than making up your own.  This applies to
pretty much all kernel code.

> +/* STATIC CONFIGURATION */
> +#define SW_TEMP_CONTROL_EN			0
> +#define MONITORING_INTERVAL			500
> +#define SW_BAT_TEMP_THRESHOLD			60
> +#define SW_JUNC_TEMP_THRESHOLD			120

This all needs to be platform data rather than #defines in the header -
the kernel contains code for a very wide range of boards so editing the
header file per-board isn't going to work and the valeus you pick may be
actively harmful if they fail to correspond to the actual battery
properties.

      reply	other threads:[~2010-07-14 10:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-14  9:44 Dajun Chen
2010-07-14 10:24 ` Mark Brown [this message]

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=20100714102448.GE5933@sirena.org.uk \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=cbou@mail.ru \
    --cc=dajun.chen@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®