Send commitlog mailing list submissions to
        commitlog@lists.openmoko.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        commitlog-requ...@lists.openmoko.org

You can reach the person managing the list at
        commitlog-ow...@lists.openmoko.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. r4945 - developers/werner/gta03/cam/patches
      (wer...@docs.openmoko.org)
   2. r4946 - in developers/werner/ahrt/host/tmc: . lib
      (wer...@docs.openmoko.org)
--- Begin Message ---
Author: werner
Date: 2009-03-03 15:07:29 +0100 (Tue, 03 Mar 2009)
New Revision: 4945

Added:
   developers/werner/gta03/cam/patches/add-64xx-hclk2.patch
   developers/werner/gta03/cam/patches/mach-om3d7k-add-cam.patch
   developers/werner/gta03/cam/patches/update-om3d7k-defconfig.patch
Removed:
   developers/werner/gta03/cam/patches/mach-gta03-add-cam.patch
   developers/werner/gta03/cam/patches/wip.patch
Modified:
   developers/werner/gta03/cam/patches/add-64xx-cam-clock.patch
   developers/werner/gta03/cam/patches/add-s3c-cam-platform.patch
   developers/werner/gta03/cam/patches/series
Log:
Restructure patches for submission. Back out the atrocities in wip.patch



Modified: developers/werner/gta03/cam/patches/add-64xx-cam-clock.patch
===================================================================
--- developers/werner/gta03/cam/patches/add-64xx-cam-clock.patch        
2009-03-03 10:48:14 UTC (rev 4944)
+++ developers/werner/gta03/cam/patches/add-64xx-cam-clock.patch        
2009-03-03 14:07:29 UTC (rev 4945)
@@ -1,45 +1,8 @@
-Index: cam/arch/arm/plat-s3c/include/plat/clock.h
-===================================================================
---- cam.orig/arch/arm/plat-s3c/include/plat/clock.h    2009-02-27 
15:19:10.000000000 +0800
-+++ cam/arch/arm/plat-s3c/include/plat/clock.h 2009-02-27 15:19:18.000000000 
+0800
-@@ -50,6 +50,7 @@
- extern struct clk clk_ext;
- 
- /* S3C64XX specific clocks */
-+extern struct clk clk_h2;
- extern struct clk clk_27m;
- extern struct clk clk_48m;
- 
-Index: cam/arch/arm/plat-s3c64xx/clock.c
-===================================================================
---- cam.orig/arch/arm/plat-s3c64xx/clock.c     2009-02-27 15:19:10.000000000 
+0800
-+++ cam/arch/arm/plat-s3c64xx/clock.c  2009-02-27 15:19:18.000000000 +0800
-@@ -27,6 +27,12 @@
- #include <plat/devs.h>
- #include <plat/clock.h>
- 
-+struct clk clk_h2 = {
-+      .name           = "hclk2",
-+      .id             = -1,
-+      .rate           = 0,
-+};
-+
- struct clk clk_27m = {
-       .name           = "clk_27m",
-       .id             = -1,
-@@ -270,6 +276,7 @@
-       &clk_epll,
-       &clk_27m,
-       &clk_48m,
-+      &clk_h2,
- };
- 
- void s3c64xx_register_clocks(void)
 Index: cam/arch/arm/plat-s3c64xx/s3c6400-clock.c
 ===================================================================
---- cam.orig/arch/arm/plat-s3c64xx/s3c6400-clock.c     2009-02-27 
15:19:10.000000000 +0800
-+++ cam/arch/arm/plat-s3c64xx/s3c6400-clock.c  2009-02-27 15:49:59.000000000 
+0800
-@@ -518,6 +518,33 @@
+--- cam.orig/arch/arm/plat-s3c64xx/s3c6400-clock.c     2009-03-03 
19:07:03.000000000 +0800
++++ cam/arch/arm/plat-s3c64xx/s3c6400-clock.c  2009-03-03 19:07:11.000000000 
+0800
+@@ -520,6 +520,33 @@
        .reg_divider    = S3C_CLK_DIV2,
  };
  
@@ -73,7 +36,7 @@
  /* Clock initialisation code */
  
  static struct clksrc_clk *init_parents[] = {
-@@ -534,6 +561,7 @@
+@@ -536,6 +563,7 @@
        &clk_audio0,
        &clk_audio1,
        &clk_irda,
@@ -81,15 +44,7 @@
  };
  
  static void __init_or_cpufreq s3c6400_set_clksrc(struct clksrc_clk *clk)
-@@ -606,6 +634,7 @@
-       clk_fout_epll.rate = epll;
-       clk_fout_apll.rate = apll;
- 
-+      clk_h2.rate = hclk2;
-       clk_h.rate = hclk;
-       clk_p.rate = pclk;
-       clk_f.rate = fclk;
-@@ -633,6 +662,7 @@
+@@ -636,6 +664,7 @@
        &clk_audio0.clk,
        &clk_audio1.clk,
        &clk_irda.clk,

Added: developers/werner/gta03/cam/patches/add-64xx-hclk2.patch
===================================================================
--- developers/werner/gta03/cam/patches/add-64xx-hclk2.patch                    
        (rev 0)
+++ developers/werner/gta03/cam/patches/add-64xx-hclk2.patch    2009-03-03 
14:07:29 UTC (rev 4945)
@@ -0,0 +1,49 @@
+Index: cam/arch/arm/plat-s3c/include/plat/clock.h
+===================================================================
+--- cam.orig/arch/arm/plat-s3c/include/plat/clock.h    2009-03-03 
19:06:53.000000000 +0800
++++ cam/arch/arm/plat-s3c/include/plat/clock.h 2009-03-03 19:07:03.000000000 
+0800
+@@ -50,6 +50,7 @@
+ extern struct clk clk_ext;
+ 
+ /* S3C64XX specific clocks */
++extern struct clk clk_h2;
+ extern struct clk clk_27m;
+ extern struct clk clk_48m;
+ 
+Index: cam/arch/arm/plat-s3c64xx/clock.c
+===================================================================
+--- cam.orig/arch/arm/plat-s3c64xx/clock.c     2009-03-03 19:06:53.000000000 
+0800
++++ cam/arch/arm/plat-s3c64xx/clock.c  2009-03-03 19:07:03.000000000 +0800
+@@ -27,6 +27,12 @@
+ #include <plat/devs.h>
+ #include <plat/clock.h>
+ 
++struct clk clk_h2 = {
++      .name           = "hclk2",
++      .id             = -1,
++      .rate           = 0,
++};
++
+ struct clk clk_27m = {
+       .name           = "clk_27m",
+       .id             = -1,
+@@ -270,6 +276,7 @@
+       &clk_epll,
+       &clk_27m,
+       &clk_48m,
++      &clk_h2,
+ };
+ 
+ void s3c64xx_register_clocks(void)
+Index: cam/arch/arm/plat-s3c64xx/s3c6400-clock.c
+===================================================================
+--- cam.orig/arch/arm/plat-s3c64xx/s3c6400-clock.c     2009-03-03 
19:07:01.000000000 +0800
++++ cam/arch/arm/plat-s3c64xx/s3c6400-clock.c  2009-03-03 19:07:03.000000000 
+0800
+@@ -608,6 +608,7 @@
+       clk_fout_epll.rate = epll;
+       clk_fout_apll.rate = apll;
+ 
++      clk_h2.rate = hclk2;
+       clk_h.rate = hclk;
+       clk_p.rate = pclk;
+       clk_f.rate = fclk;

Modified: developers/werner/gta03/cam/patches/add-s3c-cam-platform.patch
===================================================================
--- developers/werner/gta03/cam/patches/add-s3c-cam-platform.patch      
2009-03-03 10:48:14 UTC (rev 4944)
+++ developers/werner/gta03/cam/patches/add-s3c-cam-platform.patch      
2009-03-03 14:07:29 UTC (rev 4945)
@@ -1,7 +1,7 @@
 Index: cam/arch/arm/plat-s3c/dev-camif.c
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ cam/arch/arm/plat-s3c/dev-camif.c  2009-02-27 12:32:43.000000000 +0800
++++ cam/arch/arm/plat-s3c/dev-camif.c  2009-03-03 19:06:20.000000000 +0800
 @@ -0,0 +1,59 @@
 +/* linux/arch/arm/plat-s3c/dev-hsmmc.c
 + *
@@ -64,8 +64,8 @@
 +EXPORT_SYMBOL(s3c_device_camif);
 Index: cam/arch/arm/plat-s3c/Kconfig
 ===================================================================
---- cam.orig/arch/arm/plat-s3c/Kconfig 2009-02-27 12:29:18.000000000 +0800
-+++ cam/arch/arm/plat-s3c/Kconfig      2009-02-27 12:29:23.000000000 +0800
+--- cam.orig/arch/arm/plat-s3c/Kconfig 2009-03-03 16:50:36.000000000 +0800
++++ cam/arch/arm/plat-s3c/Kconfig      2009-03-03 19:06:20.000000000 +0800
 @@ -193,4 +193,9 @@
        help
          Compile in platform device definition for framebuffer
@@ -78,9 +78,9 @@
  endif
 Index: cam/arch/arm/plat-s3c/Makefile
 ===================================================================
---- cam.orig/arch/arm/plat-s3c/Makefile        2009-02-27 12:29:18.000000000 
+0800
-+++ cam/arch/arm/plat-s3c/Makefile     2009-02-27 12:29:23.000000000 +0800
-@@ -31,6 +31,7 @@
+--- cam.orig/arch/arm/plat-s3c/Makefile        2009-03-03 16:50:36.000000000 
+0800
++++ cam/arch/arm/plat-s3c/Makefile     2009-03-03 19:06:20.000000000 +0800
+@@ -35,6 +35,7 @@
  obj-y                         += dev-i2c0.o
  obj-$(CONFIG_S3C_DEV_I2C1)    += dev-i2c1.o
  obj-$(CONFIG_S3C_DEV_FB)      += dev-fb.o

Deleted: developers/werner/gta03/cam/patches/mach-gta03-add-cam.patch
===================================================================
--- developers/werner/gta03/cam/patches/mach-gta03-add-cam.patch        
2009-03-03 10:48:14 UTC (rev 4944)
+++ developers/werner/gta03/cam/patches/mach-gta03-add-cam.patch        
2009-03-03 14:07:29 UTC (rev 4945)
@@ -1,54 +0,0 @@
-Index: cam/arch/arm/mach-s3c6410/mach-om-gta03.c
-===================================================================
---- cam.orig/arch/arm/mach-s3c6410/mach-om-gta03.c     2009-02-27 
17:54:12.000000000 +0800
-+++ cam/arch/arm/mach-s3c6410/mach-om-gta03.c  2009-02-27 18:20:14.000000000 
+0800
-@@ -84,6 +84,8 @@
- #include <plat/regs-usb-hs-otg.h>
- 
- extern struct platform_device s3c_device_usbgadget;
-+extern struct platform_device s3c_device_camif; /* @@@ chgange plat/devs.h */
-+
- 
- /* 
-------------------------------------------------------------------------------
-  * GTA03 FIQ related
-@@ -878,6 +880,9 @@
-               .irq = GTA03_IRQ_LED,
-               .platform_data = &om_gta03_lp5521_pdata,
-       },
-+      {
-+              I2C_BOARD_INFO("s5k4xa", 0x2d),
-+      },
- 
- };
- 
-@@ -894,6 +899,7 @@
-       &gta03_device_spi_lcm,
-       &s3c_device_usbgadget,
-       &s3c24xx_pwm_device,
-+      &s3c_device_camif,
- };
- 
- 
-@@ -951,6 +957,10 @@
-       pcf50633_reg_write(pcf, PCF50633_REG_LEDENA, 0x01);
-       pcf50633_reg_write(pcf, PCF50633_REG_LEDOUT, 0x3f);
- 
-+      /* @@@ do this properly later - WA */
-+      pcf50633_reg_write(om_gta03_pcf, 0x30, 0x21);
-+      pcf50633_reg_write(om_gta03_pcf, 0x39, 0x13);
-+      pcf50633_reg_write(om_gta03_pcf, 0x3a, 0x21);
- }
- 
- static void gta03_l1k002_pwronoff(int level)
-Index: cam/arch/arm/mach-s3c6410/Kconfig
-===================================================================
---- cam.orig/arch/arm/mach-s3c6410/Kconfig     2009-02-27 17:54:12.000000000 
+0800
-+++ cam/arch/arm/mach-s3c6410/Kconfig  2009-02-27 17:54:24.000000000 +0800
-@@ -70,6 +70,7 @@
-       select S3C6410_SETUP_SDHCI
-       select S3C64XX_SETUP_I2C1
-       select S3C_DEV_FB
-+      select S3C_DEV_CAMIF
-       select S3C64XX_SETUP_FB_24BPP
- #     select SENSORS_PCF50633
-       select POWER_SUPPLY

Added: developers/werner/gta03/cam/patches/mach-om3d7k-add-cam.patch
===================================================================
--- developers/werner/gta03/cam/patches/mach-om3d7k-add-cam.patch               
                (rev 0)
+++ developers/werner/gta03/cam/patches/mach-om3d7k-add-cam.patch       
2009-03-03 14:07:29 UTC (rev 4945)
@@ -0,0 +1,54 @@
+Index: cam/arch/arm/mach-s3c6410/mach-om-3d7k.c
+===================================================================
+--- cam.orig/arch/arm/mach-s3c6410/mach-om-3d7k.c      2009-03-03 
16:51:22.000000000 +0800
++++ cam/arch/arm/mach-s3c6410/mach-om-3d7k.c   2009-03-03 19:13:13.000000000 
+0800
+@@ -84,6 +84,8 @@
+ #include <plat/regs-usb-hs-otg.h>
+ 
+ extern struct platform_device s3c_device_usbgadget;
++extern struct platform_device s3c_device_camif; /* @@@ chgange plat/devs.h */
++
+ 
+ /* 
-------------------------------------------------------------------------------
+  * OM_3D7K FIQ related
+@@ -879,6 +881,9 @@
+               .platform_data = &om_3d7k_lp5521_pdata,
+       },
+       {
++              I2C_BOARD_INFO("s5k4xa", 0x2d),
++      },
++      {
+               I2C_BOARD_INFO("wm8753", 0x1a),
+       },
+ };
+@@ -896,6 +901,7 @@
+       &om_3d7k_device_spi_lcm,
+       &s3c_device_usbgadget,
+       &s3c24xx_pwm_device,
++      &s3c_device_camif,
+ };
+ 
+ 
+@@ -953,6 +959,10 @@
+       pcf50633_reg_write(pcf, PCF50633_REG_LEDENA, 0x01);
+       pcf50633_reg_write(pcf, PCF50633_REG_LEDOUT, 0x3f);
+ 
++      /* @@@ do this properly later - WA */
++      pcf50633_reg_write(om_3d7k_pcf, 0x30, 0x21);
++      pcf50633_reg_write(om_3d7k_pcf, 0x39, 0x13);
++      pcf50633_reg_write(om_3d7k_pcf, 0x3a, 0x21);
+ }
+ 
+ static void om_3d7k_l1k002_pwronoff(int level)
+Index: cam/arch/arm/mach-s3c6410/Kconfig
+===================================================================
+--- cam.orig/arch/arm/mach-s3c6410/Kconfig     2009-03-03 16:51:22.000000000 
+0800
++++ cam/arch/arm/mach-s3c6410/Kconfig  2009-03-03 19:12:24.000000000 +0800
+@@ -70,6 +70,7 @@
+       select S3C6410_SETUP_SDHCI
+       select S3C64XX_SETUP_I2C1
+       select S3C_DEV_FB
++      select S3C_DEV_CAMIF
+       select S3C64XX_SETUP_FB_24BPP
+ #     select SENSORS_PCF50633
+       select POWER_SUPPLY

Modified: developers/werner/gta03/cam/patches/series
===================================================================
--- developers/werner/gta03/cam/patches/series  2009-03-03 10:48:14 UTC (rev 
4944)
+++ developers/werner/gta03/cam/patches/series  2009-03-03 14:07:29 UTC (rev 
4945)
@@ -1,10 +1,12 @@
-add-s3c-cam-config.patch
+fix-s3c64xx_setrate_clksrc.patch
+add-64xx-hclk2.patch
+add-64xx-cam-clock.patch
 add-s3c-camif-regs.patch
+add-s3c-camif.patch
+add-s3c-cam-platform.patch
 add-samsung-cams-i2c.patch
 add-s5k4.patch
-add-s3c-cam-platform.patch
-add-64xx-cam-clock.patch
-add-s3c-camif.patch
-mach-gta03-add-cam.patch
-fix-s3c64xx_setrate_clksrc.patch
-wip.patch
+add-s3c-cam-config.patch
+mach-om3d7k-add-cam.patch
+# defconfig
+update-om3d7k-defconfig.patch

Added: developers/werner/gta03/cam/patches/update-om3d7k-defconfig.patch
===================================================================
--- developers/werner/gta03/cam/patches/update-om3d7k-defconfig.patch           
                (rev 0)
+++ developers/werner/gta03/cam/patches/update-om3d7k-defconfig.patch   
2009-03-03 14:07:29 UTC (rev 4945)
@@ -0,0 +1,125 @@
+Index: cam/arch/arm/configs/om_3d7k_defconfig
+===================================================================
+--- cam.orig/arch/arm/configs/om_3d7k_defconfig        2009-03-03 
21:52:58.000000000 +0800
++++ cam/arch/arm/configs/om_3d7k_defconfig     2009-03-03 21:53:04.000000000 
+0800
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+ # Linux kernel version: 2.6.29-rc3
+-# Mon Mar  2 16:20:27 2009
++# Tue Mar  3 19:23:50 2009
+ #
+ CONFIG_ARM=y
+ CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+@@ -204,6 +204,7 @@
+ CONFIG_S3C_DEV_HSMMC1=y
+ CONFIG_S3C_DEV_I2C1=y
+ CONFIG_S3C_DEV_FB=y
++CONFIG_S3C_DEV_CAMIF=y
+ CONFIG_CPU_S3C6410=y
+ CONFIG_S3C6410_SETUP_SDHCI=y
+ # CONFIG_MACH_SMDK6410 is not set
+@@ -1010,13 +1011,101 @@
+ #
+ # Multimedia core support
+ #
+-# CONFIG_VIDEO_DEV is not set
++CONFIG_VIDEO_DEV=y
++CONFIG_VIDEO_V4L2_COMMON=y
++# CONFIG_VIDEO_ALLOW_V4L1 is not set
++# CONFIG_VIDEO_V4L1_COMPAT is not set
+ # CONFIG_DVB_CORE is not set
+-# CONFIG_VIDEO_MEDIA is not set
++CONFIG_VIDEO_MEDIA=y
+ 
+ #
+ # Multimedia drivers
+ #
++# CONFIG_MEDIA_ATTACH is not set
++CONFIG_MEDIA_TUNER=y
++CONFIG_MEDIA_TUNER_CUSTOMIZE=y
++# CONFIG_MEDIA_TUNER_SIMPLE is not set
++# CONFIG_MEDIA_TUNER_TDA8290 is not set
++# CONFIG_MEDIA_TUNER_TDA827X is not set
++# CONFIG_MEDIA_TUNER_TDA18271 is not set
++# CONFIG_MEDIA_TUNER_TDA9887 is not set
++# CONFIG_MEDIA_TUNER_TEA5761 is not set
++# CONFIG_MEDIA_TUNER_TEA5767 is not set
++# CONFIG_MEDIA_TUNER_MT20XX is not set
++# CONFIG_MEDIA_TUNER_MT2060 is not set
++# CONFIG_MEDIA_TUNER_MT2266 is not set
++# CONFIG_MEDIA_TUNER_MT2131 is not set
++# CONFIG_MEDIA_TUNER_QT1010 is not set
++# CONFIG_MEDIA_TUNER_XC2028 is not set
++# CONFIG_MEDIA_TUNER_XC5000 is not set
++# CONFIG_MEDIA_TUNER_MXL5005S is not set
++# CONFIG_MEDIA_TUNER_MXL5007T is not set
++CONFIG_VIDEO_V4L2=y
++CONFIG_VIDEO_CAPTURE_DRIVERS=y
++# CONFIG_VIDEO_ADV_DEBUG is not set
++# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
++# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set
++
++#
++# Encoders/decoders and other helper chips
++#
++
++#
++# Audio decoders
++#
++# CONFIG_VIDEO_TVAUDIO is not set
++# CONFIG_VIDEO_TDA7432 is not set
++# CONFIG_VIDEO_TDA9840 is not set
++# CONFIG_VIDEO_TDA9875 is not set
++# CONFIG_VIDEO_TEA6415C is not set
++# CONFIG_VIDEO_TEA6420 is not set
++# CONFIG_VIDEO_MSP3400 is not set
++# CONFIG_VIDEO_CS5345 is not set
++# CONFIG_VIDEO_CS53L32A is not set
++# CONFIG_VIDEO_M52790 is not set
++# CONFIG_VIDEO_TLV320AIC23B is not set
++# CONFIG_VIDEO_WM8775 is not set
++# CONFIG_VIDEO_WM8739 is not set
++# CONFIG_VIDEO_VP27SMPX is not set
++
++#
++# Video decoders
++#
++# CONFIG_VIDEO_OV7670 is not set
++# CONFIG_VIDEO_TCM825X is not set
++# CONFIG_VIDEO_SAA711X is not set
++# CONFIG_VIDEO_SAA717X is not set
++# CONFIG_VIDEO_TVP514X is not set
++# CONFIG_VIDEO_TVP5150 is not set
++
++#
++# Video and audio decoders
++#
++# CONFIG_VIDEO_CX25840 is not set
++
++#
++# MPEG video encoders
++#
++# CONFIG_VIDEO_CX2341X is not set
++
++#
++# Video encoders
++#
++# CONFIG_VIDEO_SAA7127 is not set
++
++#
++# Video improvement chips
++#
++# CONFIG_VIDEO_UPD64031A is not set
++# CONFIG_VIDEO_UPD64083 is not set
++# CONFIG_VIDEO_VIVI is not set
++# CONFIG_VIDEO_SAA5246A is not set
++# CONFIG_VIDEO_SAA5249 is not set
++CONFIG_VIDEO_SAMSUNG=y
++CONFIG_VIDEO_SAMSUNG_S5K4BA=y
++# CONFIG_SOC_CAMERA is not set
++# CONFIG_V4L_USB_DRIVERS is not set
++# CONFIG_RADIO_ADAPTERS is not set
+ # CONFIG_DAB is not set
+ 
+ #

Deleted: developers/werner/gta03/cam/patches/wip.patch
===================================================================
--- developers/werner/gta03/cam/patches/wip.patch       2009-03-03 10:48:14 UTC 
(rev 4944)
+++ developers/werner/gta03/cam/patches/wip.patch       2009-03-03 14:07:29 UTC 
(rev 4945)
@@ -1,190 +0,0 @@
-Index: cam/drivers/i2c/i2c-core.c
-===================================================================
---- cam.orig/drivers/i2c/i2c-core.c    2009-02-27 20:35:46.000000000 +0800
-+++ cam/drivers/i2c/i2c-core.c 2009-02-27 20:35:50.000000000 +0800
-@@ -1139,6 +1139,7 @@
- {
-       int err;
- 
-+printk("*** addr 0x%x kind %d\n", addr, kind);
-       /* Make sure the address is valid */
-       /*if (addr < 0x03 || addr > 0x77) {
-               dev_warn(&adapter->dev, "Invalid probe address 0x%02x\n",
-@@ -1152,9 +1153,11 @@
- 
-       /* Make sure there is something at this address, unless forced */
-       if (kind < 0) {
-+printk("*** [1]\n");
-               if (i2c_smbus_xfer(adapter, addr, 0, 0, 0,
-                                  I2C_SMBUS_QUICK, NULL) < 0)
-                       return 0;
-+printk("*** [2]\n");
- 
-               /* prevent 24RF08 corruption */
-               if ((addr & ~0x0f) == 0x50)
-@@ -1163,7 +1166,9 @@
-       }
- 
-       /* Finally call the custom detection function */
-+printk("*** [3]\n");
-       err = found_proc(adapter, addr, kind);
-+printk("*** err = %d\n", err);
-       /* -ENODEV can be returned if there is a chip at the given address
-          but it isn't supported by this chip driver. We catch it here as
-          this isn't an error. */
-Index: cam/drivers/media/video/s3c_camera_driver.c
-===================================================================
---- cam.orig/drivers/media/video/s3c_camera_driver.c   2009-02-27 
20:35:50.000000000 +0800
-+++ cam/drivers/media/video/s3c_camera_driver.c        2009-02-27 
20:35:50.000000000 +0800
-@@ -56,27 +56,21 @@
- extern camif_cis_t msdma_input;
- extern int s3c_camif_do_postprocess(camif_cfg_t *cfg);
- 
-+int codec_minor = CODEC_MINOR, preview_minor = PREVIEW_MINOR;
- /*************************************************************************
-  * Utility part
-  ************************************************************************/
- camif_cfg_t *s3c_camif_get_fimc_object(int nr)
- {
-       camif_cfg_t *ret = NULL;
--
--      switch (nr) {
--      case CODEC_MINOR:
--              ret = &s3c_fimc[FIMC_CODEC_INDEX];
--              break;
--
--      case PREVIEW_MINOR:
--              ret = &s3c_fimc[FIMC_PREVIEW_INDEX];
--              break;
--
--      default:
--              printk(KERN_ERR "Unknown minor number\n");
--      }
--
--      return ret;
-+/* @@@ */
-+return &s3c_fimc[FIMC_PREVIEW_INDEX];
-+      if (nr == codec_minor)
-+              return &s3c_fimc[FIMC_CODEC_INDEX];
-+      if (nr == preview_minor)
-+              return &s3c_fimc[FIMC_PREVIEW_INDEX];
-+      printk(KERN_ERR "Unknown minor number\n");
-+      return NULL;
- }
- 
- #if defined(FSM_ON_PREVIEW)
-@@ -1362,7 +1356,12 @@
- int s3c_camif_open(struct file *file)
- {
-       int err;
-+printk("file %p\n", file);
-+printk("f_dentry %p\n", file->f_dentry);
-+printk("d_inode %p\n", file->f_dentry->d_inode);
-+printk("min %d\n", MINOR(file->f_dentry->d_inode->i_rdev));
-       camif_cfg_t *cfg = 
s3c_camif_get_fimc_object(MINOR(file->f_dentry->d_inode->i_rdev));
-+printk("cfg %p\n", cfg);
- 
-       if (!cfg->cis) {
-               printk(KERN_ERR "An object for a CIS is missing\n");
-@@ -1665,7 +1664,7 @@
-       cfg->status = CAMIF_STOPPED;
- 
-       /* To get the handle of CODEC */
--      cfg->other = s3c_camif_get_fimc_object(CODEC_MINOR);
-+      cfg->other = s3c_camif_get_fimc_object(codec_minor);
- 
-       return cfg->status;
- }
-@@ -1691,7 +1690,7 @@
-       cfg->status = CAMIF_STOPPED;
- 
-       /* To get the handle of PREVIEW */
--      cfg->other = s3c_camif_get_fimc_object(PREVIEW_MINOR);
-+      cfg->other = s3c_camif_get_fimc_object(preview_minor);
- 
-       return cfg->status;
- }
-@@ -1703,8 +1702,8 @@
-       int ret = 0;
- 
-       /* Initialize fimc objects */
--      codec = s3c_camif_get_fimc_object(CODEC_MINOR);
--      preview = s3c_camif_get_fimc_object(PREVIEW_MINOR);
-+      codec = s3c_camif_get_fimc_object(codec_minor);
-+      preview = s3c_camif_get_fimc_object(preview_minor);
- 
-       memset(codec, 0, sizeof(camif_cfg_t));
-       memset(preview, 0, sizeof(camif_cfg_t));
-@@ -1766,6 +1765,8 @@
-               printk(KERN_ERR "Couldn't register this preview driver\n");
-               return -1;
-       }
-+codec_minor = codec->v->minor;
-+preview_minor = preview->v->minor;
- 
- #if defined(CONFIG_CPU_S3C6400) || defined(CONFIG_CPU_S3C6410)
-       cam_clock = clk_get(&pdev->dev, "camera");
-@@ -1793,8 +1794,8 @@
- {
-       camif_cfg_t *codec, *preview;
- 
--      codec = s3c_camif_get_fimc_object(CODEC_MINOR);
--      preview = s3c_camif_get_fimc_object(PREVIEW_MINOR);
-+      codec = s3c_camif_get_fimc_object(codec_minor);
-+      preview = s3c_camif_get_fimc_object(preview_minor);
- 
-       s3c_camif_release_irq(codec);
-       s3c_camif_release_irq(preview);
-@@ -1850,8 +1851,8 @@
-       camif_cfg_t *codec, *preview;
-       camif_cis_t *cis = i2c_get_clientdata(ptr);
- 
--      codec = s3c_camif_get_fimc_object(CODEC_MINOR);
--      preview = s3c_camif_get_fimc_object(PREVIEW_MINOR);
-+      codec = s3c_camif_get_fimc_object(codec_minor);
-+      preview = s3c_camif_get_fimc_object(preview_minor);
- 
-       codec->cis = preview->cis = cis;
- 
-Index: cam/drivers/media/video/samsung/4xa_sensor.c
-===================================================================
---- cam.orig/drivers/media/video/samsung/4xa_sensor.c  2009-02-27 
20:35:50.000000000 +0800
-+++ cam/drivers/media/video/samsung/4xa_sensor.c       2009-02-27 
20:38:55.000000000 +0800
-@@ -104,7 +104,7 @@
- static unsigned short normal_addr[] = { (CAM_ID >> 1), I2C_CLIENT_END };
- static const unsigned short *forces[] = { NULL };
- 
--static struct i2c_client_address_data addr_data = {
-+static struct i2c_client_address_data exitaddr_data = {
-       .normal_i2c     = normal_addr,
-       .probe          = ignore,
-       .ignore         = ignore,
-@@ -164,6 +164,7 @@
- {
-       struct i2c_client *c;
- 
-+printk("*** s5k4xa_attach\n");
-       c = kmalloc(sizeof(*c), GFP_KERNEL);
-       if (!c)
-               return -ENOMEM;
-@@ -184,8 +185,11 @@
- 
- static int sensor_attach_adapter(struct i2c_adapter *adap)
- {
-+printk("*** sensor_attach_adapter\n");
-       s3c_camif_open_sensor(&data);
--      return i2c_probe(adap, &addr_data, s5k4xa_attach);
-+/* I2C core thinks it's already there. weird. */
-+return s5k4xa_attach(adap, 0x2d, -1);
-+//    return i2c_probe(adap, &addr_data, s5k4xa_attach);
- }
- 
- static int sensor_detach(struct i2c_client *client)
-@@ -328,6 +332,7 @@
- 
- static __init int camif_sensor_init(void)
- {
-+printk("*** camif_sensor_init\n");
-       return i2c_add_driver(&sensor_driver);
- }
- 




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2009-03-03 15:37:21 +0100 (Tue, 03 Mar 2009)
New Revision: 4946

Modified:
   developers/werner/ahrt/host/tmc/lib/scope.py
   developers/werner/ahrt/host/tmc/lib/wave.py
   developers/werner/ahrt/host/tmc/python.c
Log:
- python.c: increase buffer size from 1 MB to > 20 MB
- lib/scope.py: added basic support for Tektronix MSO4000 series
- lib/wave.py: label assignment logic in "binary" incorrectly assumed that we
  only use waves, no scalars



Modified: developers/werner/ahrt/host/tmc/lib/scope.py
===================================================================
--- developers/werner/ahrt/host/tmc/lib/scope.py        2009-03-03 14:07:29 UTC 
(rev 4945)
+++ developers/werner/ahrt/host/tmc/lib/scope.py        2009-03-03 14:37:21 UTC 
(rev 4946)
@@ -451,3 +451,76 @@
                t0 = t1-self.samples/real_rate
            center = (t0+t1)/2.0
            self.hor.pos = center-trigger
+
+
+class tektronix_mso4000(scope):
+    channels = 4
+    div_hor = 10
+    div_vert = 10
+    samples_per_div = 50       # ???
+
+    def __init__(self):
+       scope.__init__(self, "usbtmc", "timeout=10", "retry",
+          "vendor=0x0699", "product=0x0401")
+       self.ch = []
+       self.d = map(lambda x: x, range(0, 16))
+       for n in range(1, self.channels+1):
+           self.ch.append(channel(self, n))
+       self.trigger = None
+       self.hor = horizontal(self)
+       self.lock_attr()
+
+# for now, we treat it almost like a Rigol
+
+    def forget(self):
+       for ch in self.ch:
+           ch.forget()
+       self.hor.forget()
+
+    def download_wave(self, channel, start, end, step):
+       self.send(":DATA:SOU CH"+str(channel.number))
+       self.send(":DATA:ENC RPB")
+       self.send(":WFMO:BYT_NR 1")
+       self.send(":CURVE B")
+       s = self.query(":WFMO?")
+       info = s.split(";")
+       pts = info[6]
+       hincr = float(info[9])
+       hzero = float(info[10])
+       vincr = float(info[13])
+       vzero = float(info[14])
+       start = 400000
+       self.send(":DATA:START "+str(start))
+       self.send(":DATA:STOP 700000")
+       d = self.query(":CURVE?")
+       digits = int(d[1])
+       d = d[2+digits:-1]
+       wave = analog()
+       t = hzero+hincr*start
+       for c in d:
+           wave.append(t, (ord(c)-vzero)*vincr)
+           t += hincr
+       return wave
+
+    def sampling_rate(self):
+       return float(self.query(":ACQ:SAMP? CH1"))
+
+    def screendump(self):
+       self.send(":SAV:IMAG:FILEF PNG");
+       return self.query(":HARDCOPY START")
+
+    def wave(self, channels, start = None, end = None, step = None):
+       if not hasattr(channels, "__iter__"):
+           return self.wave([channels], start, end, step)[0]
+       la = None
+       res = waves()
+       for ch in channels:
+           if isinstance(ch, channel):
+               res.append(self.download_wave(ch, start, end, step))
+               res[-1].label = ch.name
+           else:
+               if la is None:
+                   la = self.download_la(start, end, step)
+               res.append(la[ch])
+               res[-1].label = "D"+str(ch)
+       return res

Modified: developers/werner/ahrt/host/tmc/lib/wave.py
===================================================================
--- developers/werner/ahrt/host/tmc/lib/wave.py 2009-03-03 14:07:29 UTC (rev 
4945)
+++ developers/werner/ahrt/host/tmc/lib/wave.py 2009-03-03 14:37:21 UTC (rev 
4946)
@@ -1,7 +1,7 @@
 #
 # wave.py - Analog and digital waveforms
 #
-# Copyright (C) 2008 by OpenMoko, Inc.
+# Copyright (C) 2008, 2009 by OpenMoko, Inc.
 # Written by Werner Almesberger <wer...@openmoko.org>
 # All Rights Reserved
 #  
@@ -114,23 +114,25 @@
 
     def binary(self, other, op):
        res = analog()
-       s = self.label
-       if not s:
-           s = ""
-       if other.label:
-           if s:
-               s += "_"
-           s += other.label
        if isinstance(self, wave):
+           s = self.label
+           if not s:
+               s = ""
            if isinstance(other, wave):
+               if False: # other.label:
+                   if s:
+                       s += "_"
+                   s += other.label
                for v in waves(self, other).iterate():
                    res.append(v[0], op(float(v[1]), float(v[2])))
            else:
                for p in self:
                    res.append(p[0], op(float(p[1]), float(other)))
        else:
+           s = other.label
            for p in other:
                res.append(p[0], op(float(self), float(p[1])))
+       res.label = s
        return res
 
     def __add__(self, other):

Modified: developers/werner/ahrt/host/tmc/python.c
===================================================================
--- developers/werner/ahrt/host/tmc/python.c    2009-03-03 14:07:29 UTC (rev 
4945)
+++ developers/werner/ahrt/host/tmc/python.c    2009-03-03 14:37:21 UTC (rev 
4946)
@@ -1,7 +1,7 @@
 /*
  * python.c - Python binding for TMC functions
  *
- * Copyright (C) 2008 by OpenMoko, Inc.
+ * Copyright (C) 2008, 2009 by OpenMoko, Inc.
  * Written by Werner Almesberger <wer...@openmoko.org>
  * All Rights Reserved
  *
@@ -17,7 +17,7 @@
 #include "tmc.h"
 
 
-#define BUF_SIZE (1024*1024)
+#define BUF_SIZE (21*1024*1024)        /* Tek MSO4000 can return about 20 MB */
 #define ERROR fprintf(stderr, "ERROR %d\n", __LINE__)
        /* @@@FIXME: raise exceptions */
 
@@ -27,6 +27,9 @@
 };
 
 
+static char *buf;
+
+
 /*
  * @@@FIXME: how to _properly_ deallocate these strings ?
  */
@@ -139,7 +142,6 @@
 static PyObject *tmc_py_read(PyObject *self, PyObject *noarg)
 {
        struct py_instr *s = (struct py_instr *) self;
-       static char buf[BUF_SIZE];
        int len;
 
 //fprintf(stderr, "tmc_py_read\n");
@@ -248,7 +250,12 @@
        tmc_instr_type.tp_new = PyType_GenericNew;
        if (PyType_Ready(&tmc_instr_type) < 0)
                return;
-       m = Py_InitModule3("_tmc", tmc_methods, "Test & Mesurement Control");
+       m = Py_InitModule3("_tmc", tmc_methods, "Test & Measurement Control");
        Py_INCREF(&tmc_instr_type);
        PyModule_AddObject(m, "Instr", (PyObject *) &tmc_instr_type);
+       buf = malloc(BUF_SIZE);
+       if (!buf) {
+               perror("malloc");
+               exit(1);
+       }
 }




--- End Message ---
_______________________________________________
commitlog mailing list
commitlog@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to