LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Sebastian Reichel <sre@kernel.org>
To: Todd Brandt <todd.e.brandt@linux.intel.com>
Cc: linux-pm@vger.kernel.org, linux-iio@vger.kernel.org,
	linux-kernel@vger.kernel.org, todd.e.brandt@intel.com,
	jacob.jun.pan@linux.intel.com, sameo@linux.intel.com,
	lee.jones@linaro.org, dbaryshkov@gmail.com, dwmw2@infradead.org,
	david.woodhouse@intel.com
Subject: Re: [PATCH v2 2/3] mfd/axp20x: add support for fuel gauge cell
Date: Sun, 25 Jan 2015 13:59:05 +0100	[thread overview]
Message-ID: <20150125125905.GB2719@earth.universe> (raw)
In-Reply-To: <0d1c6b3e06c3195a87d72ca5ec8456748af463ca.1421957474.git.todd.e.brandt@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 2421 bytes --]

On Thu, Jan 22, 2015 at 12:52:06PM -0800, Todd Brandt wrote:
> Register definitions and platform data structure
> for fuel gauge cell devices.
> 
> Signed-off-by: Todd Brandt <todd.e.brandt@linux.intel.com>
> ---
>  include/linux/mfd/axp20x.h | 43 +++++++++++++++++++++++++++++++++++++++++--
>  1 file changed, 41 insertions(+), 2 deletions(-)
> 
> v2: same as v1 and is already accepted, re-included for continuity
> 
> diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h
> index 81589d1..dfabd6d 100644
> --- a/include/linux/mfd/axp20x.h
> +++ b/include/linux/mfd/axp20x.h
> @@ -124,10 +124,27 @@ enum {
>  #define AXP288_PMIC_ADC_H               0x56
>  #define AXP288_PMIC_ADC_L               0x57
>  #define AXP288_ADC_TS_PIN_CTRL          0x84
> -
>  #define AXP288_PMIC_ADC_EN              0x84
> -#define AXP288_FG_TUNE5			0xed
>  
> +/* Fuel Gauge */
> +#define AXP288_FG_RDC1_REG          0xba
> +#define AXP288_FG_RDC0_REG          0xbb
> +#define AXP288_FG_OCVH_REG          0xbc
> +#define AXP288_FG_OCVL_REG          0xbd
> +#define AXP288_FG_OCV_CURVE_REG     0xc0
> +#define AXP288_FG_DES_CAP1_REG      0xe0
> +#define AXP288_FG_DES_CAP0_REG      0xe1
> +#define AXP288_FG_CC_MTR1_REG       0xe2
> +#define AXP288_FG_CC_MTR0_REG       0xe3
> +#define AXP288_FG_OCV_CAP_REG       0xe4
> +#define AXP288_FG_CC_CAP_REG        0xe5
> +#define AXP288_FG_LOW_CAP_REG       0xe6
> +#define AXP288_FG_TUNE0             0xe8
> +#define AXP288_FG_TUNE1             0xe9
> +#define AXP288_FG_TUNE2             0xea
> +#define AXP288_FG_TUNE3             0xeb
> +#define AXP288_FG_TUNE4             0xec
> +#define AXP288_FG_TUNE5             0xed
>  
>  /* Regulators IDs */
>  enum {
> @@ -236,4 +253,26 @@ struct axp20x_dev {
>  	const struct regmap_irq_chip	*regmap_irq_chip;
>  };
>  
> +#define BATTID_LEN				64
> +#define OCV_CURVE_SIZE			32
> +#define MAX_THERM_CURVE_SIZE	25
> +#define PD_DEF_MIN_TEMP			0
> +#define PD_DEF_MAX_TEMP			55
> +
> +struct axp20x_fg_pdata {
> +	char battid[BATTID_LEN + 1];
> +	int design_cap;
> +	int min_volt;
> +	int max_volt;
> +	int max_temp;
> +	int min_temp;
> +	int cap1;
> +	int cap0;
> +	int rdc1;
> +	int rdc0;
> +	int ocv_curve[OCV_CURVE_SIZE];
> +	int tcsz;
> +	int thermistor_curve[MAX_THERM_CURVE_SIZE][2];
> +};

Acked-By: Sebastian Reichel <sre@kernel.org>

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-01-25 12:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-22 20:52 [PATCH v2 0/3] X-Power AXP288 PMIC Fuel Gauge Driver Todd Brandt
2015-01-22 20:52 ` [PATCH v2 1/3] mfd/axp20x: change battery cell name to fuel gauge Todd Brandt
2015-01-25 12:57   ` Sebastian Reichel
2015-01-22 20:52 ` [PATCH v2 2/3] mfd/axp20x: add support for fuel gauge cell Todd Brandt
2015-01-25 12:59   ` Sebastian Reichel [this message]
2015-01-22 20:52 ` [PATCH v2 3/3] X-Power AXP288 PMIC Fuel Gauge Driver Todd Brandt
2015-01-25 10:58   ` Sebastian Reichel
2015-01-25 22:34   ` Jonathan Cameron
2015-01-27  0:31   ` Jacob Pan

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=20150125125905.GB2719@earth.universe \
    --to=sre@kernel.org \
    --cc=david.woodhouse@intel.com \
    --cc=dbaryshkov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=jacob.jun.pan@linux.intel.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=todd.e.brandt@intel.com \
    --cc=todd.e.brandt@linux.intel.com \
    --subject='Re: [PATCH v2 2/3] mfd/axp20x: add support for fuel gauge cell' \
    /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

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).