Send commitlog mailing list submissions to
[email protected]
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
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:
1. r3097 - trunk/src/host/usbpath ([EMAIL PROTECTED])
2. r3098 - trunk/src/host/usbpath ([EMAIL PROTECTED])
3. r3099 - branches/src/target/kernel/2.6.23.x/patches
([EMAIL PROTECTED])
4. r3100 - in trunk/src/host: . usbreset ([EMAIL PROTECTED])
--- Begin Message ---
Author: werner
Date: 2007-10-07 09:48:17 +0200 (Sun, 07 Oct 2007)
New Revision: 3097
Added:
trunk/src/host/usbpath/Makefile.am
trunk/src/host/usbpath/autogen.sh
trunk/src/host/usbpath/configure.ac
Removed:
trunk/src/host/usbpath/Makefile
trunk/src/host/usbpath/libusbpath.pc.in
Log:
- switched to using autotools.
- figured out how to build dfu-util without libusbpath.pc
Deleted: trunk/src/host/usbpath/Makefile
===================================================================
--- trunk/src/host/usbpath/Makefile 2007-10-07 04:05:52 UTC (rev 3096)
+++ trunk/src/host/usbpath/Makefile 2007-10-07 07:48:17 UTC (rev 3097)
@@ -1,35 +0,0 @@
-CFLAGS=-Wall -g
-LDLIBS=-L. -lusbpath -lusb
-
-PREFIX=/usr/local
-
-
-.PHONY: all install uninstall clean spotless
-
-all: usbpath libusbpath.a
-
-usbpath: libusbpath.a
-
-libusbpath.a: path2devnum.o devnum2path.o portinfo.o
- $(AR) crv $@ $^
-
-libusbpath.pc: libusbpath.pc.in
- sed 's#PREFIX#$(PREFIX)#' <$^ >$@ || { rm -f $@; exit 1; }
-
-install: libusbpath.a libusbpath.pc
- install -m 555 usbpath $(PREFIX)/bin
- install -m 444 libusbpath.a $(PREFIX)/lib
- install -m 444 usbpath.h $(PREFIX)/include
- install -D -m 444 libusbpath.pc $(PREFIX)/lib/pkgconfig
-
-uninstall:
- rm -f $(PREFIX)/bin/usbpath
- rm -f $(PREFIX)/lib/libusbpath.a
- rm -f $(PREFIX)/include/usbpath.h
- rm -f $(PREFIX)/lib/pkgconfig/libusbpath.pc
-
-clean:
- rm -f *.o
-
-spotless: clean
- rm -f libusbpath.a usbpath libusbpath.pc
Added: trunk/src/host/usbpath/Makefile.am
===================================================================
--- trunk/src/host/usbpath/Makefile.am 2007-10-07 04:05:52 UTC (rev 3096)
+++ trunk/src/host/usbpath/Makefile.am 2007-10-07 07:48:17 UTC (rev 3097)
@@ -0,0 +1,9 @@
+AM_CFLAGS = -Wall
+
+lib_LIBRARIES = libusbpath.a
+bin_PROGRAMS = usbpath
+include_HEADERS = usbpath.h
+
+libusbpath_a_SOURCES = path2devnum.c devnum2path.c portinfo.c usbpath.h
+usbpath_SOURCES = usbpath.c usbpath.h
+usbpath_LDADD = libusbpath.a
Added: trunk/src/host/usbpath/autogen.sh
===================================================================
--- trunk/src/host/usbpath/autogen.sh 2007-10-07 04:05:52 UTC (rev 3096)
+++ trunk/src/host/usbpath/autogen.sh 2007-10-07 07:48:17 UTC (rev 3097)
@@ -0,0 +1,2 @@
+#! /bin/sh
+AUTOMAKE="automake --foreign --add-missing --copy" autoreconf
Property changes on: trunk/src/host/usbpath/autogen.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/src/host/usbpath/configure.ac
===================================================================
--- trunk/src/host/usbpath/configure.ac 2007-10-07 04:05:52 UTC (rev 3096)
+++ trunk/src/host/usbpath/configure.ac 2007-10-07 07:48:17 UTC (rev 3097)
@@ -0,0 +1,13 @@
+AC_INIT([usbpath],[0.1])
+AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
+
+AC_PROG_CC
+AC_PROG_RANLIB
+
+PKG_CHECK_MODULES(USB, libusb,,
+ AC_MSG_ERROR([*** Required libusb not installed ***]))
+
+LIBS="$LIBS $USB_LIBS"
+
+AC_CONFIG_FILES(Makefile)
+AC_OUTPUT
Deleted: trunk/src/host/usbpath/libusbpath.pc.in
===================================================================
--- trunk/src/host/usbpath/libusbpath.pc.in 2007-10-07 04:05:52 UTC (rev
3096)
+++ trunk/src/host/usbpath/libusbpath.pc.in 2007-10-07 07:48:17 UTC (rev
3097)
@@ -1,10 +0,0 @@
-prefix=PREFIX
-exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
-includedir=${prefix}/include
-
-Name: libusbpath
-Description: Translation between USB device number and device path
-Version: 0.0.1
-Libs: -L${libdir} -lusb -lusbpath
-Cflags: -I${includedir}
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-10-07 11:40:32 +0200 (Sun, 07 Oct 2007)
New Revision: 3098
Modified:
trunk/src/host/usbpath/README
Log:
- README: added build instructions
Modified: trunk/src/host/usbpath/README
===================================================================
--- trunk/src/host/usbpath/README 2007-10-07 07:48:17 UTC (rev 3097)
+++ trunk/src/host/usbpath/README 2007-10-07 09:40:32 UTC (rev 3098)
@@ -26,3 +26,12 @@
usbport 1+1+2
1/19
+
+
+Compilation and installation
+----------------------------
+
+./autogen.sh
+./confgure
+make
+make install
--- End Message ---
--- Begin Message ---
Author: shoragan
Date: 2007-10-07 11:42:55 +0200 (Sun, 07 Oct 2007)
New Revision: 3099
Removed:
branches/src/target/kernel/2.6.23.x/patches/gta01-vibrator.patch
Modified:
branches/src/target/kernel/2.6.23.x/patches/gta02-core.patch
branches/src/target/kernel/2.6.23.x/patches/series
Log:
Remove gta01-vibrator patch
Ben Dooks recommends to reimplement it using the s3c24xx leds driver.
Deleted: branches/src/target/kernel/2.6.23.x/patches/gta01-vibrator.patch
===================================================================
--- branches/src/target/kernel/2.6.23.x/patches/gta01-vibrator.patch
2007-10-07 09:40:32 UTC (rev 3098)
+++ branches/src/target/kernel/2.6.23.x/patches/gta01-vibrator.patch
2007-10-07 09:42:55 UTC (rev 3099)
@@ -1,171 +0,0 @@
-This patch adds driver support for the FIC GTA01 vibrator device. The driver
-uses the existing LED class driver framework, since there's a lot of
-similarity between the LED and the vibrator function.
-
-Index: linux-2.6.22/drivers/leds/leds-gta01.c
-===================================================================
---- /dev/null
-+++ linux-2.6.22/drivers/leds/leds-gta01.c
-@@ -0,0 +1,133 @@
-+/*
-+ * LED driver for the FIC GTA01 (Neo1973) GSM Phone Vibrator
-+ *
-+ * (C) 2006-2007 by OpenMoko, Inc.
-+ * Author: Harald Welte <[EMAIL PROTECTED]>
-+ * 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 version 2 as
-+ * published by the Free Software Foundation.
-+ *
-+ * TODO: Implement PWM support for GTA01Bv4 and later
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/init.h>
-+#include <linux/platform_device.h>
-+#include <linux/leds.h>
-+#include <asm/hardware.h>
-+#include <asm/mach-types.h>
-+#include <asm/arch/gta01.h>
-+
-+struct gta01_vib_priv
-+{
-+ struct led_classdev cdev;
-+ unsigned int gpio;
-+ unsigned int has_pwm;
-+};
-+
-+static inline struct gta01_vib_priv *pdev_to_vpriv(struct platform_device
*dev)
-+{
-+ return platform_get_drvdata(dev);
-+}
-+
-+static inline struct gta01_vib_priv *to_vpriv(struct led_classdev *led_cdev)
-+{
-+ return dev_get_drvdata(led_cdev->dev);
-+}
-+
-+static void gta01vib_vib_set(struct led_classdev *led_cdev, enum
led_brightness value)
-+{
-+ struct gta01_vib_priv *vp = to_vpriv(led_cdev);
-+
-+ if (value)
-+ s3c2410_gpio_setpin(vp->gpio, 1);
-+ else
-+ s3c2410_gpio_setpin(vp->gpio, 0);
-+}
-+
-+static struct led_classdev gta01_vib_led = {
-+ .name = "gta01:vibrator",
-+ .brightness_set = gta01vib_vib_set,
-+};
-+
-+#ifdef CONFIG_PM
-+static int gta01vib_suspend(struct platform_device *dev, pm_message_t state)
-+{
-+ led_classdev_suspend(>a01_vib_led);
-+ return 0;
-+}
-+
-+static int gta01vib_resume(struct platform_device *dev)
-+{
-+ led_classdev_resume(>a01_vib_led);
-+ return 0;
-+}
-+#endif
-+
-+static int gta01vib_probe(struct platform_device *pdev)
-+{
-+ struct gta01_vib_priv *vp;
-+ struct resource *r;
-+
-+ if (!machine_is_neo1973_gta01())
-+ return -EIO;
-+
-+ r = platform_get_resource(pdev, 0, 0);
-+ if (!r || !r->start)
-+ return -EIO;
-+
-+ vp = kzalloc(sizeof(struct gta01_vib_priv), GFP_KERNEL);
-+ if (!vp)
-+ return -ENOMEM;
-+
-+ platform_set_drvdata(pdev, vp);
-+
-+ vp->gpio = r->start;
-+
-+ if (vp->gpio == S3C2410_GPB3)
-+ vp->has_pwm = 1;
-+
-+ return led_classdev_register(&pdev->dev, >a01_vib_led);
-+}
-+
-+static int gta01vib_remove(struct platform_device *pdev)
-+{
-+ struct gta01_vib_priv *vp = pdev_to_vpriv(pdev);
-+
-+ led_classdev_unregister(>a01_vib_led);
-+ platform_set_drvdata(pdev, NULL);
-+ kfree(vp);
-+
-+ return 0;
-+}
-+
-+static struct platform_driver gta01vib_driver = {
-+ .probe = gta01vib_probe,
-+ .remove = gta01vib_remove,
-+#ifdef CONFIG_PM
-+ .suspend = gta01vib_suspend,
-+ .resume = gta01vib_resume,
-+#endif
-+ .driver = {
-+ .name = "gta01-led",
-+ },
-+};
-+
-+static int __init gta01vib_init(void)
-+{
-+ return platform_driver_register(>a01vib_driver);
-+}
-+
-+static void __exit gta01vib_exit(void)
-+{
-+ platform_driver_unregister(>a01vib_driver);
-+}
-+
-+module_init(gta01vib_init);
-+module_exit(gta01vib_exit);
-+
-+MODULE_AUTHOR("Harald Welte <[EMAIL PROTECTED]>");
-+MODULE_DESCRIPTION("FIC GTA01 Vibrator driver");
-+MODULE_LICENSE("GPL");
-Index: linux-2.6.22/drivers/leds/Kconfig
-===================================================================
---- linux-2.6.22.orig/drivers/leds/Kconfig
-+++ linux-2.6.22/drivers/leds/Kconfig
-@@ -101,6 +101,12 @@
- outputs. To be useful the particular board must have LEDs
- and they must be connected to the GPIO lines.
-
-+config LEDS_GTA01
-+ tristate "Vibrator Support for the FIC Neo1973 (GTA01) Vibrator"
-+ depends on LEDS_CLASS && MACH_NEO1973_GTA01
-+ help
-+ This option enables support for the Vibrator on the FIC Neo1973.
-+
- comment "LED Triggers"
-
- config LEDS_TRIGGERS
-Index: linux-2.6.22/drivers/leds/Makefile
-===================================================================
---- linux-2.6.22.orig/drivers/leds/Makefile
-+++ linux-2.6.22/drivers/leds/Makefile
-@@ -17,6 +17,7 @@
- obj-$(CONFIG_LEDS_H1940) += leds-h1940.o
- obj-$(CONFIG_LEDS_COBALT) += leds-cobalt.o
- obj-$(CONFIG_LEDS_GPIO) += leds-gpio.o
-+obj-$(CONFIG_LEDS_GTA01) += leds-gta01.o
-
- # LED Triggers
- obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o
Modified: branches/src/target/kernel/2.6.23.x/patches/gta02-core.patch
===================================================================
--- branches/src/target/kernel/2.6.23.x/patches/gta02-core.patch
2007-10-07 09:40:32 UTC (rev 3098)
+++ branches/src/target/kernel/2.6.23.x/patches/gta02-core.patch
2007-10-07 09:42:55 UTC (rev 3099)
@@ -926,19 +926,6 @@
return sysfs_create_group(&pdev->dev.kobj, >a01_gsm_attr_group);
}
-Index: linux-2.6.22/drivers/leds/leds-gta01.c
-===================================================================
---- linux-2.6.22.orig/drivers/leds/leds-gta01.c
-+++ linux-2.6.22/drivers/leds/leds-gta01.c
-@@ -71,7 +71,7 @@
- struct gta01_vib_priv *vp;
- struct resource *r;
-
-- if (!machine_is_neo1973_gta01())
-+ if (!machine_is_neo1973_gta01() && !machine_is_neo1973_gta02())
- return -EIO;
-
- r = platform_get_resource(pdev, 0, 0);
Index: linux-2.6.22/sound/soc/s3c24xx/neo1973_wm8753.c
===================================================================
--- linux-2.6.22.orig/sound/soc/s3c24xx/neo1973_wm8753.c
Modified: branches/src/target/kernel/2.6.23.x/patches/series
===================================================================
--- branches/src/target/kernel/2.6.23.x/patches/series 2007-10-07 09:40:32 UTC
(rev 3098)
+++ branches/src/target/kernel/2.6.23.x/patches/series 2007-10-07 09:42:55 UTC
(rev 3099)
@@ -24,7 +24,6 @@
gta01-core.patch
gta01-jbt6k74.patch
gta01-backlight.patch
-gta01-vibrator.patch
gta01-inputdevice.patch
gta01-power_control.patch
gta01-no_nand_partitions.patch
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-10-07 11:44:53 +0200 (Sun, 07 Oct 2007)
New Revision: 3100
Added:
trunk/src/host/usbreset/
trunk/src/host/usbreset/Makefile.am
trunk/src/host/usbreset/README
trunk/src/host/usbreset/autogen.sh
trunk/src/host/usbreset/configure.ac
trunk/src/host/usbreset/usbreset.c
Log:
- usbreset/: moved from developers/werner to trunk/src/host
- usbreset.c: added copyright header
- Makefile: removed, using autotools instead
- usbreset.c (main): added support for selecting a specific device
- README: usage and build instructions
Added: trunk/src/host/usbreset/Makefile.am
===================================================================
--- trunk/src/host/usbreset/Makefile.am 2007-10-07 09:42:55 UTC (rev 3099)
+++ trunk/src/host/usbreset/Makefile.am 2007-10-07 09:44:53 UTC (rev 3100)
@@ -0,0 +1,5 @@
+AM_CFLAGS = -Wall
+
+bin_PROGRAMS = usbreset
+
+usbreset_SOURCES = usbreset.c
Added: trunk/src/host/usbreset/README
===================================================================
--- trunk/src/host/usbreset/README 2007-10-07 09:42:55 UTC (rev 3099)
+++ trunk/src/host/usbreset/README 2007-10-07 09:44:53 UTC (rev 3100)
@@ -0,0 +1,24 @@
+usbreset - Reset one or all USB devices
+=======================================
+
+"usbreset" performs a USB bus reset for one or all devices.
+
+If invoked without arguments, all devices on all USB busses are reset.
+
+If a bus/devnum pair is specified, only that device is reset. The bus
+and device number can be obtained with lsusb. E.g.,
+
+# lsusb
+Bus 001 Device 005: ID 047d:101f Kensington PocketMouse Pro
+# usbreset 1/5
+
+would reset the mouse in this example.
+
+
+Compilation and installation
+----------------------------
+
+./autogen.sh
+./confgure
+make
+make install
Added: trunk/src/host/usbreset/autogen.sh
===================================================================
--- trunk/src/host/usbreset/autogen.sh 2007-10-07 09:42:55 UTC (rev 3099)
+++ trunk/src/host/usbreset/autogen.sh 2007-10-07 09:44:53 UTC (rev 3100)
@@ -0,0 +1,2 @@
+#! /bin/sh
+AUTOMAKE="automake --foreign --add-missing --copy" autoreconf
Property changes on: trunk/src/host/usbreset/autogen.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/src/host/usbreset/configure.ac
===================================================================
--- trunk/src/host/usbreset/configure.ac 2007-10-07 09:42:55 UTC (rev
3099)
+++ trunk/src/host/usbreset/configure.ac 2007-10-07 09:44:53 UTC (rev
3100)
@@ -0,0 +1,12 @@
+AC_INIT([usbreset],[0.1])
+AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
+
+AC_PROG_CC
+
+PKG_CHECK_MODULES(USB, libusb,,
+ AC_MSG_ERROR([*** Required libusb not installed ***]))
+
+LIBS="$LIBS $USB_LIBS"
+
+AC_CONFIG_FILES(Makefile)
+AC_OUTPUT
Added: trunk/src/host/usbreset/usbreset.c
===================================================================
--- trunk/src/host/usbreset/usbreset.c 2007-10-07 09:42:55 UTC (rev 3099)
+++ trunk/src/host/usbreset/usbreset.c 2007-10-07 09:44:53 UTC (rev 3100)
@@ -0,0 +1,93 @@
+/*
+ * usbreset.c - Reset one or all USB devices
+ *
+ * (C) 2007 by OpenMoko, Inc.
+ * Written by Werner Almesberger <[EMAIL PROTECTED]>
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <usb.h>
+
+
+static void usage(const char *name)
+{
+ fprintf(stderr, "usage: %s [bus/device]\n", name);
+ exit(1);
+}
+
+
+int main(int argc, const char **argv)
+{
+ struct usb_bus *usb_bus;
+ struct usb_device *dev;
+ int all = 0;
+ int bus_num, dev_num;
+
+ switch (argc) {
+ case 1:
+ all = 1;
+ break;
+ case 2:
+ if (sscanf(argv[1], "%d/%d", &bus_num, &dev_num) != 2)
+ usage(*argv);
+ break;
+ case 3:
+ usage(*argv);
+ }
+
+ usb_init();
+ usb_find_busses();
+ usb_find_devices();
+ for (usb_bus = usb_get_busses(); usb_bus; usb_bus = usb_bus->next)
+ for (dev = usb_bus->devices; dev; dev = dev->next) {
+ struct usb_dev_handle *handle;
+
+ if (dev->descriptor.bDeviceClass == USB_CLASS_HUB)
+ continue;
+ if (!all &&
+ (atoi(usb_bus->dirname) != bus_num ||
+ dev->devnum != dev_num))
+ continue;
+
+ handle = usb_open(dev);
+ if (!handle) {
+ fprintf(stderr, "usb_open: %s\n",
+ usb_strerror());
+ continue;
+ }
+ if (usb_reset(handle) < 0) {
+ fprintf(stderr, "usb_reset: %s\n",
+ usb_strerror());
+ continue;
+ }
+
+ if (!all)
+ return 0;
+
+ fprintf(stderr,"reset %s/%s\n",
+ usb_bus->dirname, dev->filename);
+ }
+
+ if (!all) {
+ fprintf(stderr, "no device %d/%d found\n", bus_num, dev_num);
+ return 1;
+ }
+
+ return 0;
+}
--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog