From 65bc9c0fc7c80e1b0a4b29dafeb3289eb2ff42c0 Mon Sep 17 00:00:00 2001 From: mokopatches Date: Wed, 19 Nov 2008 17:03:16 +0000 Subject: pcf506xx.patch Moved shared PMU code from pcf50606.h and pcf50633.h (which prevented inclusion of both at the same time) to pcf506xx.h - include/linux/pcf50606.h (struct pmu_voltage_rail, enum pmu_event, pmu_cb): moved to pcf506xx.h - include/linux/pcf50633.h (struct pmu_voltage_rail, enum pmu_event, pmu_cb): moved to pcf506xx.h Signed off-by: Werner Almesberger --- include/linux/pcf50606.h | 23 +++-------------------- include/linux/pcf50633.h | 27 +++------------------------ include/linux/pcf506xx.h | 31 +++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 44 deletions(-) create mode 100644 include/linux/pcf506xx.h (limited to 'include') diff --git a/include/linux/pcf50606.h b/include/linux/pcf50606.h index bc98e476128..167328fa659 100644 --- a/include/linux/pcf50606.h +++ b/include/linux/pcf50606.h @@ -1,6 +1,9 @@ #ifndef _LINUX_PCF50606_H #define _LINUX_PCF50606_H +#include + + /* public in-kernel pcf50606 api */ enum pcf50606_regulator_id { PCF50606_REGULATOR_DCD, @@ -48,26 +51,6 @@ pcf50606_onoff_set(struct pcf50606_data *pcf, extern void pcf50606_charge_fast(struct pcf50606_data *pcf, int on); -#define PMU_VRAIL_F_SUSPEND_ON 0x00000001 /* Remains on during suspend */ -#define PMU_VRAIL_F_UNUSED 0x00000002 /* This rail is not used */ -struct pmu_voltage_rail { - char *name; - unsigned int flags; - struct { - unsigned int init; - unsigned int max; - } voltage; -}; - -enum pmu_event { - PMU_EVT_NONE, - PMU_EVT_INSERT, - PMU_EVT_REMOVE, - __NUM_PMU_EVTS -}; - -typedef int pmu_cb(struct device *dev, unsigned int feature, - enum pmu_event event); #define PCF50606_FEAT_EXTON 0x00000001 /* not yet supported */ #define PCF50606_FEAT_MBC 0x00000002 diff --git a/include/linux/pcf50633.h b/include/linux/pcf50633.h index 5f32004602c..bf50fe4e70d 100644 --- a/include/linux/pcf50633.h +++ b/include/linux/pcf50633.h @@ -1,6 +1,9 @@ #ifndef _LINUX_PCF50633_H #define _LINUX_PCF50633_H +#include + + /* public in-kernel pcf50633 api */ enum pcf50633_regulator_id { PCF50633_REGULATOR_AUTO, @@ -57,30 +60,6 @@ pcf50633_usb_curlim_set(struct pcf50633_data *pcf, int ma); extern void pcf50633_charge_enable(struct pcf50633_data *pcf, int on); -/* FIXME: sharded with pcf50606 */ -#define PMU_VRAIL_F_SUSPEND_ON 0x00000001 /* Remains on during suspend */ -#define PMU_VRAIL_F_UNUSED 0x00000002 /* This rail is not used */ -struct pmu_voltage_rail { - char *name; - unsigned int flags; - struct { - unsigned int init; - unsigned int max; - } voltage; -}; - -enum pmu_event { - PMU_EVT_NONE, - PMU_EVT_INSERT, - PMU_EVT_REMOVE, - PMU_EVT_USB_INSERT, - PMU_EVT_USB_REMOVE, - __NUM_PMU_EVTS -}; - -typedef int pmu_cb(struct device *dev, unsigned int feature, - enum pmu_event event); - #define PCF50633_FEAT_EXTON 0x00000001 /* not yet supported */ #define PCF50633_FEAT_MBC 0x00000002 #define PCF50633_FEAT_BBC 0x00000004 /* not yet supported */ diff --git a/include/linux/pcf506xx.h b/include/linux/pcf506xx.h new file mode 100644 index 00000000000..33be73eeb2c --- /dev/null +++ b/include/linux/pcf506xx.h @@ -0,0 +1,31 @@ +#ifndef _LINUX_PCF506XX_H +#define _LINUX_PCF506XX_H + + +#define PMU_VRAIL_F_SUSPEND_ON 0x00000001 /* Remains on during suspend */ +#define PMU_VRAIL_F_UNUSED 0x00000002 /* This rail is not used */ +struct pmu_voltage_rail { + char *name; + unsigned int flags; + struct { + unsigned int init; + unsigned int max; + } voltage; +}; + +enum pmu_event { + PMU_EVT_NONE, + PMU_EVT_INSERT, + PMU_EVT_REMOVE, +#ifdef CONFIG_SENSORS_PCF50633 + PMU_EVT_USB_INSERT, + PMU_EVT_USB_REMOVE, +#endif + __NUM_PMU_EVTS +}; + +typedef int pmu_cb(struct device *dev, unsigned int feature, + enum pmu_event event); + + +#endif /* !_LINUX_PCF506XX_H */ -- cgit v1.2.3