excellent, i just tested the cmpc driver on the beagle. here's a
nano-patch for cmpc.c, as otherwise the gpio ports aren't accessible via
/sys/class/gpio after configuring.
@@ -250,6 +250,8 @@ static ssize_t cmpc_write(struct file *filp, const char __user *buff,
printk(KERN_ERR PREFIX "gpio_request failed for pin %ld \n", pin);
// read the new pin state
reg = ioread16(base + gp_map[pin]);
Frank Agius <ftagius@...> writes:
> I've uploaded to github a couple of device drivers that might be of
> 1) OMAP capture driver. This driver can set up a pin on the OMAP 35xx
> processor as an input capture source. The original purpose was to
> measure the frequency of a signal that corresponded to the RPM of a
> motor. Only 4 pins on the 35XX can be used for capture: 144, 145, 146
> nd 147. The driver assumes that the capture pin is in "Mode 2"
> (pwm_evt). The driver default is to set up pin 147 for capture. To set
> up one of the other pins as capture,invoke the driver with
> "capture_pin=xxx", where "xxx" is one of 144, 145, 146 and 147. Pulse
> width (rising edge to falling edge) and frequency measurements can be
> made on a signal connected to the capture pin. The driver continuously
> captures width and frequency counts. If there is no input on the pin,
> or the input goes away, the driver will report 0 for pulse width and
> frequency counts. The ioctl interface will provide an integer count for
> pulse width, frequency and clock source. To determine the values in
> milliseconds, divide the returned count of width or frequency by the
> clock source count and multiply by 1000.
> Source code:
> 2) OMAP 35xx control module pad configuration (aka cmpc) driver.
> Derived from the mux driver code by Scott Ellis. This driver can set
> the control module configuration register on the OMAP 35xx processor.
> This allow configuring from user space the mode (from mode 0 to mode 7)
> for individual pins.
> Source code:
> Both drivers should work, but are a little rough around the edges.
> Comments are welcome.
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> gumstix-users mailing list