* [PATCH 2/3] mfd/axp20x: add support for fuel gauge cell driver
@ 2015-01-07 21:25 Todd E Brandt
[not found] ` <20150107212552.GC3440-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Todd E Brandt @ 2015-01-07 21:25 UTC (permalink / raw)
To: linux-pm, linux-iio, linux-kernel
Cc: jacob.jun.pan, sameo, lee.jones, sre, dbaryshkov, dwmw2,
david.woodhouse, todd.e.brandt
mfd/axp20x: add support for fuel gauge cell
Register definitions and platform data structure
for fuel gauge cell devices.
Signed-off-by: Todd Brandt <todd.e.brandt@intel.com>
----
include/linux/mfd/axp20x.h | 43 +++++++++++++++++++++++++++++++++++++++++--
1 file changed, 41 insertions(+), 2 deletions(-)
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];
+};
+
#endif /* __LINUX_MFD_AXP20X_H */
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <20150107212552.GC3440-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>]
* Re: [PATCH 2/3] mfd/axp20x: add support for fuel gauge cell driver [not found] ` <20150107212552.GC3440-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> @ 2015-01-08 1:05 ` Jacob Pan 2015-01-20 11:49 ` Lee Jones 1 sibling, 0 replies; 3+ messages in thread From: Jacob Pan @ 2015-01-08 1:05 UTC (permalink / raw) To: todd.e.brandt-VuQAYsv1563Yd54FQh9/CA Cc: linux-pm-u79uwXL29TY76Z2rM5mHXA, linux-iio-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, sameo-VuQAYsv1563Yd54FQh9/CA, lee.jones-QSEj5FYQhm4dnm+yROfE0A, sre-DgEjT+Ai2ygdnm+yROfE0A, dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w, dwmw2-wEGCiKHe2LqWVfeAwA7xHQ, david.woodhouse-ral2JQCrhuEAvxtiuMwx3w, todd.e.brandt-ral2JQCrhuEAvxtiuMwx3w On Wed, 7 Jan 2015 13:25:52 -0800 Todd E Brandt <todd.e.brandt-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> wrote: > mfd/axp20x: add support for fuel gauge cell > Acked-by: Jacob Pan <jacob.jun.pan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> > Register definitions and platform data structure > for fuel gauge cell devices. > > Signed-off-by: Todd Brandt <todd.e.brandt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > ---- > include/linux/mfd/axp20x.h | 43 > +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 > insertions(+), 2 deletions(-) > > 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]; > +}; > + > #endif /* __LINUX_MFD_AXP20X_H */ [Jacob Pan] ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/3] mfd/axp20x: add support for fuel gauge cell driver [not found] ` <20150107212552.GC3440-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> 2015-01-08 1:05 ` Jacob Pan @ 2015-01-20 11:49 ` Lee Jones 1 sibling, 0 replies; 3+ messages in thread From: Lee Jones @ 2015-01-20 11:49 UTC (permalink / raw) To: Todd E Brandt Cc: linux-pm-u79uwXL29TY76Z2rM5mHXA, linux-iio-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, jacob.jun.pan-VuQAYsv1563Yd54FQh9/CA, sameo-VuQAYsv1563Yd54FQh9/CA, sre-DgEjT+Ai2ygdnm+yROfE0A, dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w, dwmw2-wEGCiKHe2LqWVfeAwA7xHQ, david.woodhouse-ral2JQCrhuEAvxtiuMwx3w, todd.e.brandt-ral2JQCrhuEAvxtiuMwx3w FYI: It's easier to track patch-sets when they are connected. Please send them as 'threaded'. Take a look at the man page for `git send-email` for more details. > mfd/axp20x: add support for fuel gauge cell > > Register definitions and platform data structure > for fuel gauge cell devices. > > Signed-off-by: Todd Brandt <todd.e.brandt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > ---- > include/linux/mfd/axp20x.h | 43 +++++++++++++++++++++++++++++++++++++++++-- > 1 file changed, 41 insertions(+), 2 deletions(-) Applied, thanks. > 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]; > +}; > + > #endif /* __LINUX_MFD_AXP20X_H */ -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-20 11:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-07 21:25 [PATCH 2/3] mfd/axp20x: add support for fuel gauge cell driver Todd E Brandt
[not found] ` <20150107212552.GC3440-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-01-08 1:05 ` Jacob Pan
2015-01-20 11:49 ` Lee Jones
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).