aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/bq27000_battery.h16
-rw-r--r--include/linux/hdq.h32
-rw-r--r--include/linux/jbt6k74.h21
-rw-r--r--include/linux/leds_pwm.h20
-rw-r--r--include/linux/mfd/pcf50633/backlight.h44
-rw-r--r--include/linux/mfd/pcf50633/core.h14
-rw-r--r--include/linux/mfd/pcf50633/gpio.h59
-rw-r--r--include/linux/mmc/sdio_ids.h5
-rw-r--r--include/linux/platform_battery.h12
9 files changed, 190 insertions, 33 deletions
diff --git a/include/linux/bq27000_battery.h b/include/linux/bq27000_battery.h
new file mode 100644
index 00000000000..a617466a517
--- /dev/null
+++ b/include/linux/bq27000_battery.h
@@ -0,0 +1,16 @@
+#ifndef __BQ27000_BATTERY_H__
+#define __BQ27000_BATTERY_H__
+
+void bq27000_charging_state_change(struct platform_device *pdev);
+
+struct bq27000_platform_data {
+ const char *name;
+ int rsense_mohms;
+ int (*hdq_read)(int);
+ int (*hdq_write)(int, u8);
+ int (*hdq_initialized)(void);
+ int (*get_charger_online_status)(void);
+ int (*get_charger_active_status)(void);
+};
+
+#endif
diff --git a/include/linux/hdq.h b/include/linux/hdq.h
new file mode 100644
index 00000000000..377ab387eb3
--- /dev/null
+++ b/include/linux/hdq.h
@@ -0,0 +1,32 @@
+#ifndef __LINUX_HDQ_H__
+#define __LINUX_HDQ_H__
+
+#include <linux/device.h>
+
+#define HDQ_SAMPLE_PERIOD_US 10
+
+/* platform data */
+
+struct hdq_platform_data {
+ /*
+ * give an opportunity to use us as parent for
+ * devices that depend on us
+ */
+ void (*attach_child_devices)(struct device *parent_device);
+
+ void (*gpio_dir_out)(void);
+ void (*gpio_dir_in)(void);
+ void (*gpio_set)(int);
+ int (*gpio_get)(void);
+
+ int (*enable_fiq)(void);
+ void (*disable_fiq)(void);
+ void (*kick_fiq)(void);
+
+};
+
+int hdq_read(int address);
+int hdq_write(int address, u8 data);
+int hdq_initialized(void);
+
+#endif
diff --git a/include/linux/jbt6k74.h b/include/linux/jbt6k74.h
new file mode 100644
index 00000000000..75488c41136
--- /dev/null
+++ b/include/linux/jbt6k74.h
@@ -0,0 +1,21 @@
+#ifndef __JBT6K74_H__
+#define __JBT6K74_H__
+
+#include <linux/spi/spi.h>
+
+/*
+ * struct jbt6k74_platform_data - Platform data for jbt6k74 driver
+ * @probe_completed: Callback to be called when the driver has been
+ * successfully probed.
+ * @enable_pixel_clock: Callback to enable or disable the pixelclock of the
+ * gpu.
+ * @gpio_reset: Reset gpio pin number.
+ */
+struct jbt6k74_platform_data {
+ void (*probe_completed)(struct device *dev);
+ void (*enable_pixel_clock)(struct device *dev, int enable);
+
+ int gpio_reset;
+};
+
+#endif
diff --git a/include/linux/leds_pwm.h b/include/linux/leds_pwm.h
index 33a07116748..42d49694cbd 100644
--- a/include/linux/leds_pwm.h
+++ b/include/linux/leds_pwm.h
@@ -16,6 +16,26 @@ struct led_pwm {
struct led_pwm_platform_data {
int num_leds;
struct led_pwm *leds;
+
+ /* @init: The init callback is called after the pwm device for a led has
+ * been successfully configured. If the return value is negative it will be
+ * seen as an error and initzalisation of the leds-pwm device will fail.
+ */
+ int (*init)(struct device *dev, struct led_pwm *led);
+
+ /* @notify: The notify callback is called whenever the brightness of a led
+ * is changed.
+ * The return value of the callback will be the brightness which is used to
+ * configure the pwm device.
+ */
+ enum led_brightness (*notify)(struct device *dev, struct led_pwm *led,
+ enum led_brightness brightness);
+
+ /* @exit: The exit callback is called, whenever a led device registered by
+ * the leds-pwm device is unregistered. It will be called prior to freeing
+ * the pwm device.
+ */
+ void (*exit)(struct device *dev, struct led_pwm *led);
};
#endif
diff --git a/include/linux/mfd/pcf50633/backlight.h b/include/linux/mfd/pcf50633/backlight.h
new file mode 100644
index 00000000000..9d3646af056
--- /dev/null
+++ b/include/linux/mfd/pcf50633/backlight.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2009, Lars-Peter Clausen <lars@metafoo.de>
+ * PCF50633 backlight device driver
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#ifndef __LINUX_MFD_PCF50633_BACKLIGHT
+#define __LINUX_MFD_PCF50633_BACKLIGHT
+
+/*
+* @default_brightness: Brightness to be used after the driver has been
+ probed. Valid range 0-63.
+* @default_brightness_limit: Brightness limit to be used after the driver has
+* been probed. This is usfull when it is not known
+* how much power is available for the backlight
+* during probe. Valid range 0-63
+* @ramp_time: When changing the backlights brightness the change
+* is not instant, instead it fades smooth from one
+* state to another. This value specifies how long the
+* fade should take. The lower the value the higher
+* the fade time. Valid range 0-255
+*/
+struct pcf50633_bl_platform_data {
+ unsigned int default_brightness;
+ unsigned int default_brightness_limit;
+ uint8_t ramp_time;
+};
+
+
+struct pcf50633;
+
+int pcf50633_bl_set_brightness_limit(struct pcf50633 *pcf, unsigned int limit);
+
+#endif
+
diff --git a/include/linux/mfd/pcf50633/core.h b/include/linux/mfd/pcf50633/core.h
index 3398bd9aab1..ae2bd97a4c8 100644
--- a/include/linux/mfd/pcf50633/core.h
+++ b/include/linux/mfd/pcf50633/core.h
@@ -18,6 +18,8 @@
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/power_supply.h>
+#include <linux/mfd/pcf50633/backlight.h>
+#include <linux/gpio.h>
struct pcf50633;
@@ -43,6 +45,10 @@ struct pcf50633_platform_data {
void (*force_shutdown)(struct pcf50633 *);
u8 resumers[5];
+
+ struct pcf50633_bl_platform_data *backlight_data;
+
+ int gpio_base;
};
struct pcf50633_irq {
@@ -148,11 +154,9 @@ struct pcf50633 {
int onkey1s_held;
- struct platform_device *rtc_pdev;
- struct platform_device *mbc_pdev;
- struct platform_device *adc_pdev;
- struct platform_device *input_pdev;
- struct platform_device *regulator_pdev[PCF50633_NUM_REGULATORS];
+ struct pcf50633_mbc *mbc;
+ struct pcf50633_adc *adc;
+ struct pcf50633_bl *bl;
};
enum pcf50633_reg_int1 {
diff --git a/include/linux/mfd/pcf50633/gpio.h b/include/linux/mfd/pcf50633/gpio.h
index a42b845efc5..af2c341d5f6 100644
--- a/include/linux/mfd/pcf50633/gpio.h
+++ b/include/linux/mfd/pcf50633/gpio.h
@@ -15,37 +15,40 @@
#include <linux/mfd/pcf50633/core.h>
-#define PCF50633_GPIO1 1
-#define PCF50633_GPIO2 2
-#define PCF50633_GPIO3 3
-#define PCF50633_GPO 4
-
-#define PCF50633_REG_GPIO1CFG 0x14
-#define PCF50633_REG_GPIO2CFG 0x15
-#define PCF50633_REG_GPIO3CFG 0x16
-#define PCF50633_REG_GPOCFG 0x17
-
-#define PCF50633_GPOCFG_GPOSEL_MASK 0x07
-
-enum pcf50633_reg_gpocfg {
- PCF50633_GPOCFG_GPOSEL_0 = 0x00,
- PCF50633_GPOCFG_GPOSEL_LED_NFET = 0x01,
- PCF50633_GPOCFG_GPOSEL_SYSxOK = 0x02,
- PCF50633_GPOCFG_GPOSEL_CLK32K = 0x03,
- PCF50633_GPOCFG_GPOSEL_ADAPUSB = 0x04,
- PCF50633_GPOCFG_GPOSEL_USBxOK = 0x05,
- PCF50633_GPOCFG_GPOSEL_ACTPH4 = 0x06,
- PCF50633_GPOCFG_GPOSEL_1 = 0x07,
- PCF50633_GPOCFG_GPOSEL_INVERSE = 0x08,
+#define PCF50633_GPIO1 0
+#define PCF50633_GPIO2 1
+#define PCF50633_GPIO3 2
+#define PCF50633_GPO 3
+
+#define PCF50633_REG_GPIOCFG(x) (0x14 + (x))
+
+enum pcf50633_gpio_config {
+ PCF50633_GPIO_CONFIG_OUTPUT = 0x0,
+ PCF50633_GPIO_CONFIG_SYSxOK = 0x2,
+ PCF50633_GPIO_CONFIG_CHARGING = 0x3,
+ PCF50633_GPIO_CONFIG_MOBILE_MODE = 0x4,
+ PCF50633_GPIO_CONFIG_USBxOK = 0x5,
+ PCF50633_GPIO_CONFIG_ACTPH = 0x6,
+ PCF50633_GPIO_CONFIG_INPUT = 0x7,
+
+ PCF50633_GPIO_CONFIG_INVERT = 0x8,
+
+ PCF50633_GPO_CONFIG_OUTPUT = 0x0,
+ PCF50633_GPO_CONFIG_LED_NFET = 0x1,
+ PCF50633_GPO_CONFIG_SYSxOK = 0x2,
+ PCF50633_GPO_CONFIG_CLK32K = 0x3,
+ PCF50633_GPO_CONFIG_MOBILE_MODE = 0x4,
+ PCF50633_GPO_CONFIG_USBxOK = 0x5,
+ PCF50633_GPO_CONFIG_ACTPH = 0x6,
+ PCF50633_GPO_CONFIG_INPUT = 0x7,
+
+ PCF50633_GPO_CONFIG_INVERT = 0x8,
};
-int pcf50633_gpio_set(struct pcf50633 *pcf, int gpio, u8 val);
-u8 pcf50633_gpio_get(struct pcf50633 *pcf, int gpio);
+int pcf50633_gpio_set_config(struct pcf50633 *pcf, unsigned gpio,
+ enum pcf50633_gpio_config config);
-int pcf50633_gpio_invert_set(struct pcf50633 *, int gpio, int invert);
-int pcf50633_gpio_invert_get(struct pcf50633 *pcf, int gpio);
-
-int pcf50633_gpio_power_supply_set(struct pcf50633 *,
+int pcf50633_gpio_power_supply_set(struct pcf50633 *pcf,
int gpio, int regulator, int on);
#endif /* __LINUX_MFD_PCF50633_GPIO_H */
diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h
index 33b2ea09a4a..1beba57e5af 100644
--- a/include/linux/mmc/sdio_ids.h
+++ b/include/linux/mmc/sdio_ids.h
@@ -43,4 +43,9 @@
#define SDIO_DEVICE_ID_SIANO_NOVA_A0 0x1100
#define SDIO_DEVICE_ID_SIANO_STELLAR 0x5347
+#define SDIO_DEVICE_ID_MARVELL_88W8688 0x9104
+#define SDIO_VENDOR_ID_ATHEROS 0x0271
+#define SDIO_DEVICE_ID_ATHEROS_AR6001 0x0100
+#define SDIO_DEVICE_ID_ATHEROS_AR6002 0x0200
+
#endif
diff --git a/include/linux/platform_battery.h b/include/linux/platform_battery.h
new file mode 100644
index 00000000000..00f7651096a
--- /dev/null
+++ b/include/linux/platform_battery.h
@@ -0,0 +1,12 @@
+#ifndef __PLATFORM_BATTERY_H__
+#define __PLATFORM_BATTERY_H__
+
+struct platform_bat_platform_data {
+ const char *name;
+ int (**get_property)(void);
+ int (*is_present)(void);
+ enum power_supply_property *properties;
+ size_t num_properties;
+};
+
+#endif