From 9125bbc537742bc9684345ff5b2e5dfca6fb8ae4 Mon Sep 17 00:00:00 2001 From: Markinus Date: Mon, 8 Nov 2010 18:01:09 +0100 Subject: [PATCH 1/3] htcleo: fixed disabled 5MPCamera with last commit The files from evo and desire need other sysfs directories, now both are created --- drivers/media/video/msm/s5k3e2fx.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/media/video/msm/s5k3e2fx.c b/drivers/media/video/msm/s5k3e2fx.c index 32aa4fe2..abe64fa7 100644 --- a/drivers/media/video/msm/s5k3e2fx.c +++ b/drivers/media/video/msm/s5k3e2fx.c @@ -3379,11 +3379,27 @@ static DEVICE_ATTR(sensor, 0444, sensor_vendor_show, NULL); static DEVICE_ATTR(node, 0444, sensor_read_node, NULL); static struct kobject *android_s5k3e2fx; +static struct kobject *android_s5k3e2fx_des; static int s5k3e2fx_sysfs_init(void) { int ret ; pr_info("s5k3e2fx:kobject creat and add\n"); + android_s5k3e2fx_des = kobject_create_and_add("android_camera", NULL); + if (android_s5k3e2fx_des == NULL) { + pr_info("s5k3e2fx_sysfs_init: subsystem_register " \ + "failed\n"); + ret = -ENOMEM; + return ret ; + } + pr_info("s5k3e2fx:sysfs_create_file\n"); + ret = sysfs_create_file(android_s5k3e2fx_des, &dev_attr_sensor.attr); + if (ret) { + pr_info("s5k3e2fx_sysfs_init: sysfs_create_file " \ + "failed\n"); + kobject_del(android_s5k3e2fx_des); + } + android_s5k3e2fx = kobject_create_and_add("android_camera2", NULL); if (android_s5k3e2fx == NULL) { pr_info("s5k3e2fx_sysfs_init: subsystem_register " \ From d3740f8695a3c3c41f58a2409c232eeecf3f7387 Mon Sep 17 00:00:00 2001 From: Markinus Date: Mon, 8 Nov 2010 20:15:38 +0100 Subject: [PATCH 2/3] htcleo: add support for rmnet as module --- arch/arm/configs/htcleo_defconfig | 5 +++-- arch/arm/mach-msm/smd.c | 4 ++++ drivers/net/msm_rmnet_wince.c | 5 +++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/arm/configs/htcleo_defconfig b/arch/arm/configs/htcleo_defconfig index 7593df05..5dbd354d 100644 --- a/arch/arm/configs/htcleo_defconfig +++ b/arch/arm/configs/htcleo_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.32.15 -# Fri Oct 29 13:59:28 2010 +# Mon Nov 8 20:09:00 2010 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -965,7 +965,8 @@ CONFIG_PPPOPNS=y # CONFIG_SLIP is not set CONFIG_SLHC=y # CONFIG_NETCONSOLE is not set -# CONFIG_MSM_RMNET is not set +CONFIG_MSM_RMNET=m +# CONFIG_MSM_RMNET_DEBUG is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set # CONFIG_KINETO_GAN is not set diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c index 4df7c09c..8ab340c6 100644 --- a/arch/arm/mach-msm/smd.c +++ b/arch/arm/mach-msm/smd.c @@ -885,6 +885,7 @@ int smd_open(const char *name, smd_channel_t **_ch, return 0; } +EXPORT_SYMBOL(smd_open); int smd_close(smd_channel_t *ch) { @@ -915,6 +916,7 @@ int smd_read(smd_channel_t *ch, void *data, int len) { return ch->read(ch, data, len); } +EXPORT_SYMBOL(smd_read); int smd_write(smd_channel_t *ch, const void *data, int len) { @@ -930,11 +932,13 @@ int smd_write_atomic(smd_channel_t *ch, const void *data, int len) spin_unlock_irqrestore(&smd_lock, flags); return res; } +EXPORT_SYMBOL(smd_write_atomic); int smd_read_avail(smd_channel_t *ch) { return ch->read_avail(ch); } +EXPORT_SYMBOL(smd_read_avail); int smd_write_avail(smd_channel_t *ch) { diff --git a/drivers/net/msm_rmnet_wince.c b/drivers/net/msm_rmnet_wince.c index ad1d1c93..7085d17b 100644 --- a/drivers/net/msm_rmnet_wince.c +++ b/drivers/net/msm_rmnet_wince.c @@ -87,6 +87,11 @@ static int count_this_packet(void *_hdr, int len) static int in_suspend; static unsigned long timeout_us; static struct workqueue_struct *rmnet_wq; +extern int smd_read(smd_channel_t *ch, void *data, int len); +extern int smd_open(const char *name, smd_channel_t **_ch, + void *priv, void (*notify)(void *, unsigned)); +extern int smd_write_atomic(smd_channel_t *ch, const void *data, int len); +extern int smd_read_avail(smd_channel_t *ch); static void do_check_active(struct work_struct *work) { From 7d8b0f7344ff23f92905ef95e990838e56fc3ef4 Mon Sep 17 00:00:00 2001 From: Markinus Date: Tue, 9 Nov 2010 18:42:56 +0100 Subject: [PATCH 3/3] htcleo: enabled 720p camera Some identification is missed, have to find it. if I create the devices with node 0, then the driver will have 1. If I do 1 the driver will have 0 . . argh. But do simple a link from 0 ->1 and then it works. ln -s /dev/msm_camera/control0 /dev/msm_camera/control1 ln -s /dev/msm_camera/frame0 /dev/msm_camera/frame1 ln -s /dev/msm_camera/config0 /dev/msm_camera/config1 --- arch/arm/configs/htcleo_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/configs/htcleo_defconfig b/arch/arm/configs/htcleo_defconfig index 5dbd354d..1aa391ba 100644 --- a/arch/arm/configs/htcleo_defconfig +++ b/arch/arm/configs/htcleo_defconfig @@ -1280,7 +1280,7 @@ CONFIG_VIDEO_HELPER_CHIPS_AUTO=y CONFIG_MSM_CAMERA=y CONFIG_MSM_CAMERA_LEGACY=y # CONFIG_MSM_CAMERA_7X30 is not set -# CONFIG_720P_CAMERA is not set +CONFIG_720P_CAMERA=y # CONFIG_MSM_CAMERA_DEBUG is not set #