Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186503
b: refs/heads/master
c: e79753e
h: refs/heads/master
i:
  186501: 7fc9759
  186499: 84c8f91
  186495: 9daf127
v: v3
  • Loading branch information
Pavel Machek authored and Greg Kroah-Hartman committed Mar 4, 2010
1 parent 8a71be9 commit b3b7ea2
Show file tree
Hide file tree
Showing 33 changed files with 6,150 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fcc55b309fc0d037b5d435712cf70589c6a0c7be
refs/heads/master: e79753edf88d858a3783c946c12cc4726f6590f6
2 changes: 1 addition & 1 deletion trunk/drivers/staging/dream/camera/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ config MSM_CAMERA_DEBUG

config MSM_CAMERA_FLASH
bool "Qualcomm MSM camera flash support"
depends on MSM_CAMERA
depends on MSM_CAMERA && BROKEN
---help---
Enable support for LED flash for msm camera

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/staging/dream/camera/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
EXTRA_CFLAGS=-Idrivers/staging/dream/include
obj-$(CONFIG_MT9T013) += mt9t013.o mt9t013_reg.o
obj-$(CONFIG_MT9D112) += mt9d112.o mt9d112_reg.o
obj-$(CONFIG_MT9P012) += mt9p012_fox.o mt9p012_reg.o
Expand Down
80 changes: 80 additions & 0 deletions trunk/drivers/staging/dream/include/linux/android_pmem.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/* drivers/staging/dream/include/linux/android_pmem.h
*
* Copyright (C) 2007 Google, Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/

#ifndef _ANDROID_PMEM_H_
#define _ANDROID_PMEM_H_

#define PMEM_IOCTL_MAGIC 'p'
#define PMEM_GET_PHYS _IOW(PMEM_IOCTL_MAGIC, 1, unsigned int)
#define PMEM_MAP _IOW(PMEM_IOCTL_MAGIC, 2, unsigned int)
#define PMEM_GET_SIZE _IOW(PMEM_IOCTL_MAGIC, 3, unsigned int)
#define PMEM_UNMAP _IOW(PMEM_IOCTL_MAGIC, 4, unsigned int)
/* This ioctl will allocate pmem space, backing the file, it will fail
* if the file already has an allocation, pass it the len as the argument
* to the ioctl */
#define PMEM_ALLOCATE _IOW(PMEM_IOCTL_MAGIC, 5, unsigned int)
/* This will connect a one pmem file to another, pass the file that is already
* backed in memory as the argument to the ioctl
*/
#define PMEM_CONNECT _IOW(PMEM_IOCTL_MAGIC, 6, unsigned int)
/* Returns the total size of the pmem region it is sent to as a pmem_region
* struct (with offset set to 0).
*/
#define PMEM_GET_TOTAL_SIZE _IOW(PMEM_IOCTL_MAGIC, 7, unsigned int)
/* Revokes gpu registers and resets the gpu. Pass a pointer to the
* start of the mapped gpu regs (the vaddr returned by mmap) as the argument.
*/
#define HW3D_REVOKE_GPU _IOW(PMEM_IOCTL_MAGIC, 8, unsigned int)
#define HW3D_GRANT_GPU _IOW(PMEM_IOCTL_MAGIC, 9, unsigned int)
#define HW3D_WAIT_FOR_INTERRUPT _IOW(PMEM_IOCTL_MAGIC, 10, unsigned int)

int get_pmem_file(int fd, unsigned long *start, unsigned long *vstart,
unsigned long *end, struct file **filp);
int get_pmem_user_addr(struct file *file, unsigned long *start,
unsigned long *end);
void put_pmem_file(struct file* file);
void flush_pmem_file(struct file *file, unsigned long start, unsigned long len);

struct android_pmem_platform_data
{
const char* name;
/* starting physical address of memory region */
unsigned long start;
/* size of memory region */
unsigned long size;
/* set to indicate the region should not be managed with an allocator */
unsigned no_allocator;
/* set to indicate maps of this region should be cached, if a mix of
* cached and uncached is desired, set this and open the device with
* O_SYNC to get an uncached region */
unsigned cached;
/* The MSM7k has bits to enable a write buffer in the bus controller*/
unsigned buffered;
};

struct pmem_region {
unsigned long offset;
unsigned long len;
};

int pmem_setup(struct android_pmem_platform_data *pdata,
long (*ioctl)(struct file *, unsigned int, unsigned long),
int (*release)(struct inode *, struct file *));

int pmem_remap(struct pmem_region *region, struct file *file,
unsigned operation);

#endif //_ANDROID_PPP_H_

154 changes: 154 additions & 0 deletions trunk/drivers/staging/dream/include/linux/gpio_event.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
/* drivers/staging/dream/include/linux/gpio_event.h
*
* Copyright (C) 2007 Google, Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/

#ifndef _LINUX_GPIO_EVENT_H
#define _LINUX_GPIO_EVENT_H

#include <linux/input.h>

enum {
GPIO_EVENT_FUNC_UNINIT = 0x0,
GPIO_EVENT_FUNC_INIT = 0x1,
GPIO_EVENT_FUNC_SUSPEND = 0x2,
GPIO_EVENT_FUNC_RESUME = 0x3,
};
struct gpio_event_info {
int (*func)(struct input_dev *input_dev,
struct gpio_event_info *info,
void **data, int func);
int (*event)(struct input_dev *input_dev,
struct gpio_event_info *info,
void **data, unsigned int type,
unsigned int code, int value); /* out events */
};

struct gpio_event_platform_data {
const char *name;
struct gpio_event_info **info;
size_t info_count;
int (*power)(const struct gpio_event_platform_data *pdata, bool on);
};

#define GPIO_EVENT_DEV_NAME "gpio-event"

/* Key matrix */

enum gpio_event_matrix_flags {
/* unset: drive active output low, set: drive active output high */
GPIOKPF_ACTIVE_HIGH = 1U << 0,
GPIOKPF_DEBOUNCE = 1U << 1,
GPIOKPF_REMOVE_SOME_PHANTOM_KEYS = 1U << 2,
GPIOKPF_REMOVE_PHANTOM_KEYS = GPIOKPF_REMOVE_SOME_PHANTOM_KEYS |
GPIOKPF_DEBOUNCE,
GPIOKPF_DRIVE_INACTIVE = 1U << 3,
GPIOKPF_LEVEL_TRIGGERED_IRQ = 1U << 4,
GPIOKPF_PRINT_UNMAPPED_KEYS = 1U << 16,
GPIOKPF_PRINT_MAPPED_KEYS = 1U << 17,
GPIOKPF_PRINT_PHANTOM_KEYS = 1U << 18,
};

extern int gpio_event_matrix_func(struct input_dev *input_dev,
struct gpio_event_info *info, void **data, int func);
struct gpio_event_matrix_info {
/* initialize to gpio_event_matrix_func */
struct gpio_event_info info;
/* size must be ninputs * noutputs */
const unsigned short *keymap;
unsigned int *input_gpios;
unsigned int *output_gpios;
unsigned int ninputs;
unsigned int noutputs;
/* time to wait before reading inputs after driving each output */
ktime_t settle_time;
/* time to wait before scanning the keypad a second time */
ktime_t debounce_delay;
ktime_t poll_time;
unsigned flags;
};

/* Directly connected inputs and outputs */

enum gpio_event_direct_flags {
GPIOEDF_ACTIVE_HIGH = 1U << 0,
/* GPIOEDF_USE_DOWN_IRQ = 1U << 1, */
/* GPIOEDF_USE_IRQ = (1U << 2) | GPIOIDF_USE_DOWN_IRQ, */
GPIOEDF_PRINT_KEYS = 1U << 8,
GPIOEDF_PRINT_KEY_DEBOUNCE = 1U << 9,
};

struct gpio_event_direct_entry {
uint32_t gpio:23;
uint32_t code:9;
};

/* inputs */
extern int gpio_event_input_func(struct input_dev *input_dev,
struct gpio_event_info *info, void **data, int func);
struct gpio_event_input_info {
/* initialize to gpio_event_input_func */
struct gpio_event_info info;
ktime_t debounce_time;
ktime_t poll_time;
uint16_t flags;
uint16_t type;
const struct gpio_event_direct_entry *keymap;
size_t keymap_size;
};

/* outputs */
extern int gpio_event_output_func(struct input_dev *input_dev,
struct gpio_event_info *info, void **data, int func);
extern int gpio_event_output_event(struct input_dev *input_dev,
struct gpio_event_info *info, void **data,
unsigned int type, unsigned int code, int value);
struct gpio_event_output_info {
/* initialize to gpio_event_output_func and gpio_event_output_event */
struct gpio_event_info info;
uint16_t flags;
uint16_t type;
const struct gpio_event_direct_entry *keymap;
size_t keymap_size;
};


/* axes */

enum gpio_event_axis_flags {
GPIOEAF_PRINT_UNKNOWN_DIRECTION = 1U << 16,
GPIOEAF_PRINT_RAW = 1U << 17,
GPIOEAF_PRINT_EVENT = 1U << 18,
};

extern int gpio_event_axis_func(struct input_dev *input_dev,
struct gpio_event_info *info, void **data, int func);
struct gpio_event_axis_info {
/* initialize to gpio_event_axis_func */
struct gpio_event_info info;
uint8_t count;
uint8_t type; /* EV_REL or EV_ABS */
uint16_t code;
uint16_t decoded_size;
uint16_t (*map)(struct gpio_event_axis_info *info, uint16_t in);
uint32_t *gpio;
uint32_t flags;
};
#define gpio_axis_2bit_gray_map gpio_axis_4bit_gray_map
#define gpio_axis_3bit_gray_map gpio_axis_4bit_gray_map
uint16_t gpio_axis_4bit_gray_map(
struct gpio_event_axis_info *info, uint16_t in);
uint16_t gpio_axis_5bit_singletrack_map(
struct gpio_event_axis_info *info, uint16_t in);

#endif
84 changes: 84 additions & 0 deletions trunk/drivers/staging/dream/include/linux/msm_adsp.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/* drivers/staging/dream/include/linux/msm_adsp.h
*
* Copyright (c) QUALCOMM Incorporated
* Copyright (C) 2007 Google, Inc.
* Author: Iliyan Malchev <ibm@android.com>
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef __LINUX_MSM_ADSP_H
#define __LINUX_MSM_ADSP_H

#include <linux/types.h>
#include <linux/ioctl.h>

#define ADSP_IOCTL_MAGIC 'q'

/* ADSP_IOCTL_WRITE_COMMAND */
struct adsp_command_t {
uint16_t queue;
uint32_t len; /* bytes */
uint8_t *data;
};

/* ADSP_IOCTL_GET_EVENT */
struct adsp_event_t {
uint16_t type; /* 1 == event (RPC), 0 == message (adsp) */
uint32_t timeout_ms; /* -1 for infinite, 0 for immediate return */
uint16_t msg_id;
uint16_t flags; /* 1 == 16--bit event, 0 == 32-bit event */
uint32_t len; /* size in, number of bytes out */
uint8_t *data;
};

#define ADSP_IOCTL_ENABLE \
_IOR(ADSP_IOCTL_MAGIC, 1, unsigned)

#define ADSP_IOCTL_DISABLE \
_IOR(ADSP_IOCTL_MAGIC, 2, unsigned)

#define ADSP_IOCTL_DISABLE_ACK \
_IOR(ADSP_IOCTL_MAGIC, 3, unsigned)

#define ADSP_IOCTL_WRITE_COMMAND \
_IOR(ADSP_IOCTL_MAGIC, 4, struct adsp_command_t *)

#define ADSP_IOCTL_GET_EVENT \
_IOWR(ADSP_IOCTL_MAGIC, 5, struct adsp_event_data_t *)

#define ADSP_IOCTL_SET_CLKRATE \
_IOR(ADSP_IOCTL_MAGIC, 6, unsigned)

#define ADSP_IOCTL_DISABLE_EVENT_RSP \
_IOR(ADSP_IOCTL_MAGIC, 10, unsigned)

struct adsp_pmem_info {
int fd;
void *vaddr;
};

#define ADSP_IOCTL_REGISTER_PMEM \
_IOW(ADSP_IOCTL_MAGIC, 13, unsigned)

#define ADSP_IOCTL_UNREGISTER_PMEM \
_IOW(ADSP_IOCTL_MAGIC, 14, unsigned)

/* Cause any further GET_EVENT ioctls to fail (-ENODEV)
* until the device is closed and reopened. Useful for
* terminating event dispatch threads
*/
#define ADSP_IOCTL_ABORT_EVENT_READ \
_IOW(ADSP_IOCTL_MAGIC, 15, unsigned)

#define ADSP_IOCTL_LINK_TASK \
_IOW(ADSP_IOCTL_MAGIC, 16, unsigned)

#endif
Loading

0 comments on commit b3b7ea2

Please sign in to comment.