[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20100714102448.GE5933@sirena.org.uk>
Date: Wed, 14 Jul 2010 11:24:49 +0100
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Dajun Chen <dajun.chen@...il.com>
Cc: cbou@...l.ru, dwmw2@...radead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCHv2 4/11] Power:Battery module of DA9052 PMIC device
driver (RESEND)
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists