aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2009-11-04 11:04:48 +0100
committerLars-Peter Clausen <lars@metafoo.de>2009-11-04 11:04:48 +0100
commitbcb21e994dcb5bdb3687ffa9e576ad543f5c9a92 (patch)
treeb50177ea8c0ea2e3aee502934fe41504f7e307fa
parent701cd3522117634ce028644a72c7ba126531bf4a (diff)
parentd166f09d709cce9e702f91adb5cb248ba6a1f1cb (diff)
Merge branch 'om-gta01-2.6.31' into om-2.6.31
-rw-r--r--arch/arm/mach-s3c2410/mach-gta01.c19
-rw-r--r--drivers/power/pcf50606-charger.c29
2 files changed, 34 insertions, 14 deletions
diff --git a/arch/arm/mach-s3c2410/mach-gta01.c b/arch/arm/mach-s3c2410/mach-gta01.c
index c559a28d442..e9b73a1ce7d 100644
--- a/arch/arm/mach-s3c2410/mach-gta01.c
+++ b/arch/arm/mach-s3c2410/mach-gta01.c
@@ -90,15 +90,14 @@
#include <linux/gpio.h>
-/*
-#include <../drivers/input/touchscreen/ts_filter_chain.h>
+#include <mach/ts.h>
+#include <linux/input/touchscreen/ts_filter_chain.h>
#ifdef CONFIG_TOUCHSCREEN_FILTER
-#include <../drivers/input/touchscreen/ts_filter_linear.h>
-#include <../drivers/input/touchscreen/ts_filter_mean.h>
-#include <../drivers/input/touchscreen/ts_filter_median.h>
-#include <../drivers/input/touchscreen/ts_filter_group.h>
+#include <linux/input/touchscreen/ts_filter_linear.h>
+#include <linux/input/touchscreen/ts_filter_mean.h>
+#include <linux/input/touchscreen/ts_filter_median.h>
+#include <linux/input/touchscreen/ts_filter_group.h>
#endif
-*/
static void gta01_pmu_attach_child_devices(struct pcf50606 *pcf);
@@ -642,7 +641,6 @@ static struct s3c2410_udc_mach_info gta01_udc_cfg = {
/* Touchscreen configuration. */
-#if 0
#ifdef CONFIG_TOUCHSCREEN_FILTER
const static struct ts_filter_group_configuration gta01_ts_group = {
@@ -686,7 +684,6 @@ const static struct s3c2410_ts_mach_info gta01_ts_cfg = {
.presc = 0xff, /* slow as we can go */
.filter_config = gta01_filter_configuration,
};
-#endif
/* SPI / Display */
@@ -832,7 +829,7 @@ static struct platform_device *gta01_devices[] __initdata = {
&s3c_device_usbgadget,
&s3c_device_nand,
&s3c_device_adc,
-/* &s3c_device_ts,*/
+ &s3c_device_ts,
&s3c_device_timer[0],
&s3c_device_timer[3],
&gta01_bl_device,
@@ -922,7 +919,7 @@ static void __init gta01_machine_init(void)
s3c24xx_udc_set_platdata(&gta01_udc_cfg);
s3c_i2c0_set_platdata(NULL);
-/* set_s3c2410ts_info(&gta01_ts_cfg);*/
+ set_s3c2410ts_info(&gta01_ts_cfg);
#if 0
switch (S3C_SYSTEM_REV_ATAG) {
diff --git a/drivers/power/pcf50606-charger.c b/drivers/power/pcf50606-charger.c
index a35b671061b..a4b77950788 100644
--- a/drivers/power/pcf50606-charger.c
+++ b/drivers/power/pcf50606-charger.c
@@ -65,15 +65,38 @@ int pcf50606_charge_fast(struct pcf50606 *pcf, int on)
}
EXPORT_SYMBOL_GPL(pcf50606_charge_fast);
+static const char *charge_mode_descs[] = {
+ "qualification",
+ "pre",
+ "trickle",
+ "fast_cccv",
+ "idle",
+};
+
static ssize_t
show_charge_mode(struct device *dev, struct device_attribute *attr, char *buf)
{
struct pcf50606_mbc *mbc = dev_get_drvdata(dev);
+ const char **desc = charge_mode_descs;
uint8_t charge_mode = pcf50606_reg_read(mbc->pcf, PCF50606_REG_MBCC1);
charge_mode &= PCF50606_MBCC1_CHGMOD_MASK;
-
- return sprintf(buf, "%d\n", charge_mode);
+ switch (charge_mode) {
+ case PCF50606_MBCC1_CHGMOD_IDLE:
+ ++desc;
+ case PCF50606_MBCC1_CHGMOD_FAST_CCCV:
+ ++desc;
+ case PCF50606_MBCC1_CHGMOD_TRICKLE:
+ ++desc;
+ case PCF50606_MBCC1_CHGMOD_PRE:
+ ++desc;
+ case PCF50606_MBCC1_CHGMOD_QUAL:
+ return sprintf(buf, "%s\n", *desc);
+ break;
+ default:
+ return sprintf(buf, "unkown: %d\n", charge_mode);
+ break;
+ }
}
static ssize_t set_charge_mode(struct device *dev, struct device_attribute *attr,
@@ -103,7 +126,7 @@ static ssize_t set_charge_mode(struct device *dev, struct device_attribute *attr
return count;
}
-static DEVICE_ATTR(charge_mode, S_IRUGO, show_charge_mode, set_charge_mode);
+static DEVICE_ATTR(charge_mode, S_IRUGO | S_IWUSR, show_charge_mode, set_charge_mode);
static void
pcf50606_mbc_irq_handler(int irq, void *data)