X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Fs3c24xx%2Fpatches-2.6.24%2F1172-introduce-pcf50633-resume-dependency-list.patch.patch;fp=target%2Flinux%2Fs3c24xx%2Fpatches-2.6.24%2F1172-introduce-pcf50633-resume-dependency-list.patch.patch;h=0000000000000000000000000000000000000000;hb=26e3776a22bf894ced5af4c28968dc1dc99968eb;hp=ac90c58d33f2d4f4a7445084eac14bd6d237413e;hpb=4bd70fc26256cf485f19e0c8b881e078dc36134f;p=openwrt.git diff --git a/target/linux/s3c24xx/patches-2.6.24/1172-introduce-pcf50633-resume-dependency-list.patch.patch b/target/linux/s3c24xx/patches-2.6.24/1172-introduce-pcf50633-resume-dependency-list.patch.patch deleted file mode 100644 index ac90c58d33..0000000000 --- a/target/linux/s3c24xx/patches-2.6.24/1172-introduce-pcf50633-resume-dependency-list.patch.patch +++ /dev/null @@ -1,115 +0,0 @@ -From bf63ca6b17328413611a9d7594ca2c2f710a1def Mon Sep 17 00:00:00 2001 -From: Andy Green -Date: Wed, 2 Jul 2008 22:38:06 +0100 -Subject: [PATCH] introduce-pcf50633-resume-dependency-list.patch - -Adds resume dependency support to pcf50633 - -Signed-off-by: Andy Green ---- - drivers/i2c/chips/pcf50633.c | 26 ++++++++++++++++++++++++-- - include/linux/pcf50633.h | 5 +++++ - 2 files changed, 29 insertions(+), 2 deletions(-) - -diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c -index 2ed6dc0..ec6b9f1 100644 ---- a/drivers/i2c/chips/pcf50633.c -+++ b/drivers/i2c/chips/pcf50633.c -@@ -53,6 +53,7 @@ - #include - - #include "pcf50633.h" -+#include - - #if 0 - #define DEBUGP(x, args ...) printk("%s: " x, __FUNCTION__, ## args) -@@ -167,6 +168,9 @@ struct pcf50633_data { - u_int8_t ena; - } ldo[__NUM_PCF50633_REGS]; - } standby_regs; -+ -+ struct resume_dependency resume_dependency; -+ - #endif - }; - -@@ -1933,6 +1937,8 @@ static int pcf50633_detect(struct i2c_adapter *adapter, int address, int kind) - - pcf50633_global = data; - -+ init_resume_dependency_list(data->resume_dependency); -+ - populate_sysfs_group(data); - - err = sysfs_create_group(&new_client->dev.kobj, &pcf_attr_group); -@@ -2142,6 +2148,17 @@ int pcf50633_report_resumers(struct pcf50633_data *pcf, char *buf) - - #ifdef CONFIG_PM - -+/* -+ * we need to export this because pcf50633_data is kept opaque -+ */ -+ -+void pcf50633_register_resume_dependency(struct pcf50633_data *pcf, -+ struct pcf50633_resume_dependency *dep) -+{ -+ register_resume_dependency(pcf->resume_dependency, dep); -+} -+EXPORT_SYMBOL_GPL(pcf50633_register_resume_dep); -+ - - static int pcf50633_suspend(struct device *dev, pm_message_t state) - { -@@ -2234,8 +2251,11 @@ static int pcf50633_resume(struct device *dev) - struct i2c_client *client = to_i2c_client(dev); - struct pcf50633_data *pcf = i2c_get_clientdata(client); - int i; -+ struct list_head *pos, *q; -+ struct pcf50633_resume_dependency *dep; -+ - -- /* mutex_lock(&pcf->lock); */ /* resume in atomic context */ -+ mutex_lock(&pcf->lock); - - __reg_write(pcf, PCF50633_REG_LEDENA, 0x01); - -@@ -2274,10 +2294,12 @@ static int pcf50633_resume(struct device *dev) - __reg_write(pcf, reg_out+1, pcf->standby_regs.ldo[i].ena); - } - -- /* mutex_unlock(&pcf->lock); */ /* resume in atomic context */ -+ mutex_unlock(&pcf->lock); - - pcf50633_irq(pcf->irq, pcf); - -+ callback_all_resume_dependencies(pcf->resume_dependency); -+ - return 0; - } - #else -diff --git a/include/linux/pcf50633.h b/include/linux/pcf50633.h -index 837037e..2bef616 100644 ---- a/include/linux/pcf50633.h -+++ b/include/linux/pcf50633.h -@@ -2,6 +2,7 @@ - #define _LINUX_PCF50633_H - - #include -+#include - - - /* public in-kernel pcf50633 api */ -@@ -124,6 +125,10 @@ pcf50633_battvolt(struct pcf50633_data *pcf); - extern int - pcf50633_report_resumers(struct pcf50633_data *pcf, char *buf); - -+extern void -+pcf50633_register_resume_dependency(struct pcf50633_data *pcf, -+ struct pcf50633_resume_dependency *dep); -+ - - #define PCF50633_FEAT_EXTON 0x00000001 /* not yet supported */ - #define PCF50633_FEAT_MBC 0x00000002 --- -1.5.6.5 -