aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndy Green <andy@openmoko.com>2008-11-21 16:40:58 +0000
committerAndy Green <andy@openmoko.com>2008-11-21 16:40:58 +0000
commit4a922dc8ab2915b61ff6adfe8e0a01069893b52b (patch)
tree6909728173fc18e8a88eaa9aa46eaebffbcabd93 /include/linux
parenta7e6827348e9e85466c9ab6488769bf862e9fd0b (diff)
MERGE-via-balaji-tracking-balaji-updates
Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mfd/pcf50633/adc.h28
-rw-r--r--include/linux/mfd/pcf50633/core.h14
-rw-r--r--include/linux/mfd/pcf50633/gpio.h30
-rw-r--r--include/linux/mfd/pcf50633/input.h12
-rw-r--r--include/linux/mfd/pcf50633/led.h12
-rw-r--r--include/linux/mfd/pcf50633/mbc.h14
-rw-r--r--include/linux/mfd/pcf50633/rtc.h14
7 files changed, 93 insertions, 31 deletions
diff --git a/include/linux/mfd/pcf50633/adc.h b/include/linux/mfd/pcf50633/adc.h
index 54246e72bcc..27eabb21683 100644
--- a/include/linux/mfd/pcf50633/adc.h
+++ b/include/linux/mfd/pcf50633/adc.h
@@ -1,3 +1,15 @@
+/*
+ * adc.h -- Driver for NXP PCF50633 ADC
+ *
+ * (C) 2006-2008 by Openmoko, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
#ifndef __LINUX_MFD_PCF50633_ADC_H
#define __LINUX_MFD_PCF50633_ADC_H
@@ -66,27 +78,11 @@ struct pcf50633_adc {
struct mutex queue_mutex;
};
-#ifdef CONFIG_MFD_PCF50633_ADC
extern int
pcf50633_adc_async_read(struct pcf50633 *pcf, int mux, int avg,
void (*callback)(struct pcf50633 *, void *, int),
void *callback_param);
extern int
pcf50633_adc_sync_read(struct pcf50633 *pcf, int mux, int avg);
-#else
-int
-pcf50633_adc_async_read(struct pcf50633 *pcf, int mux, int avg,
- void (*callback)(struct pcf50633 *, void *, int),
- void *callback_param)
-{
- return -ENODEV;
-}
-
-int
-pcf50633_adc_sync_read(struct pcf50633 *pcf, int mux, int avg)
-{
- return -ENODEV;
-}
-#endif /* CONFIG_PCF50633_ADC */
#endif /* __LINUX_PCF50633_ADC_H */
diff --git a/include/linux/mfd/pcf50633/core.h b/include/linux/mfd/pcf50633/core.h
index 6c80e1310a5..8c550895a5a 100644
--- a/include/linux/mfd/pcf50633/core.h
+++ b/include/linux/mfd/pcf50633/core.h
@@ -1,3 +1,15 @@
+/*
+ * core.h -- Core driver for NXP PCF50633
+ *
+ * (C) 2006-2008 by Openmoko, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
#ifndef __LINUX_MFD_PCF50633_CORE_H
#define __LINUX_MFD_PCF50633_CORE_H
@@ -8,7 +20,6 @@
#include <linux/power_supply.h>
#include <linux/mfd/pcf50633/pmic.h>
-#include <linux/mfd/pcf50633/gpio.h>
#include <linux/mfd/pcf50633/input.h>
#include <linux/mfd/pcf50633/mbc.h>
#include <linux/mfd/pcf50633/rtc.h>
@@ -133,7 +144,6 @@ struct pcf50633 {
int onkey1s_held;
struct pcf50633_pmic pmic;
- struct pcf50633_gpio gpio;
struct pcf50633_input input;
struct pcf50633_mbc mbc;
struct pcf50633_rtc rtc;
diff --git a/include/linux/mfd/pcf50633/gpio.h b/include/linux/mfd/pcf50633/gpio.h
index f5038012bae..da74df6d849 100644
--- a/include/linux/mfd/pcf50633/gpio.h
+++ b/include/linux/mfd/pcf50633/gpio.h
@@ -1,12 +1,18 @@
+/*
+ * gpio.h -- GPIO driver for NXP PCF50633
+ *
+ * (C) 2006-2008 by Openmoko, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
#ifndef __LINUX_MFD_PCF50633_GPIO_H
#define __LINUX_MFD_PCF50633_GPIO_H
-#include <linux/platform_device.h>
-
-struct pcf50633_gpio {
- struct platform_device *pdev;
-};
-
#define PCF50633_GPIO1 1
#define PCF50633_GPIO2 2
#define PCF50633_GPIO3 3
@@ -32,12 +38,14 @@ enum pcf50633_reg_gpocfg {
struct pcf50633;
-extern void
-pcf50633_gpio_set(struct pcf50633 *pcf, int gpio, int on);
+extern void pcf50633_gpio_set(struct pcf50633 *pcf, int gpio, int on);
+extern int pcf50633_gpio_get(struct pcf50633 *pcf, int gpio);
-extern int
-pcf50633_gpio_get(struct pcf50633 *pcf, int gpio);
+extern void pcf50633_gpio_invert_set(struct pcf50633 *, int gpio, int invert);
+extern int pcf50633_gpio_invert_get(struct pcf50633 *pcf, int gpio);
+extern void pcf50633_gpio_power_supply_set(struct pcf50633 *,
+ int gpio, int regulator, int on);
+#endif /* __LINUX_MFD_PCF50633_GPIO_H */
-#endif
diff --git a/include/linux/mfd/pcf50633/input.h b/include/linux/mfd/pcf50633/input.h
index 5f8d78ffea0..fd1030269e2 100644
--- a/include/linux/mfd/pcf50633/input.h
+++ b/include/linux/mfd/pcf50633/input.h
@@ -1,3 +1,15 @@
+/*
+ * input.h -- Input driver for NXP PCF50633
+ *
+ * (C) 2006-2008 by Openmoko, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
#ifndef __LINUX_MFD_PCF50633_INPUT_H
#define __LINUX_MFD_PCF50633_INPUT_H
diff --git a/include/linux/mfd/pcf50633/led.h b/include/linux/mfd/pcf50633/led.h
index 2f866b208f8..c84a97e0a58 100644
--- a/include/linux/mfd/pcf50633/led.h
+++ b/include/linux/mfd/pcf50633/led.h
@@ -1,3 +1,15 @@
+/*
+ * led.h -- LED driver for NXP PCF50633
+ *
+ * (C) 2006-2008 by Openmoko, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
#ifndef __LINUX_MFD_PCF50633_LED_H
#define __LINUX_MFD_PCF50633_LED_H
diff --git a/include/linux/mfd/pcf50633/mbc.h b/include/linux/mfd/pcf50633/mbc.h
index d0549c53ddd..a59bd382db4 100644
--- a/include/linux/mfd/pcf50633/mbc.h
+++ b/include/linux/mfd/pcf50633/mbc.h
@@ -1,3 +1,15 @@
+/*
+ * mbc.h -- Driver for NXP PCF50633 Main Battery Charger
+ *
+ * (C) 2006-2008 by Openmoko, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
#ifndef __LINUX_MFD_PCF50633_MBC_H
#define __LINUX_MFD_PCF50633_MBC_H
@@ -106,6 +118,8 @@ enum pcf50633_reg_mbcs3 {
#define PCF50633_MBCC2_VBATCOND_MASK 0x03
#define PCF50633_MBCC2_VMAX_MASK 0x3c
+struct pcf50633;
+
void pcf50633_mbc_usb_curlim_set(struct pcf50633 *pcf, int ma);
struct pcf50633_mbc {
diff --git a/include/linux/mfd/pcf50633/rtc.h b/include/linux/mfd/pcf50633/rtc.h
index 0919590dbb9..ce8ad8f5928 100644
--- a/include/linux/mfd/pcf50633/rtc.h
+++ b/include/linux/mfd/pcf50633/rtc.h
@@ -1,3 +1,15 @@
+/*
+ * rtc.h -- RTC driver for NXP PCF50633
+ *
+ * (C) 2006-2008 by Openmoko, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
#ifndef __LINUX_MFD_PCF50633_RTC_H
#define __LINUX_MFD_PCF50633_RTC_H
@@ -19,8 +31,6 @@
#define PCF50633_REG_RTCMTA 0x65 /* Alarm Month */
#define PCF50633_REG_RTCYRA 0x66 /* Alarm Year */
-#define PCF50633_F_RTC_SECOND (1 << PCF50633_FIDX_RTC_SECOND)
-
struct pcf50633_rtc {
int alarm_enabled;
int second_enabled;