atmel_tc library
authorDavid Brownell <david-b@pacbell.net>
Sat, 23 Feb 2008 01:23:23 +0000 (17:23 -0800)
committerHaavard Skinnemoen <hskinnemoen@atmel.com>
Tue, 4 Mar 2008 12:41:23 +0000 (13:41 +0100)
commit2a341f5cf57dce9d89b41484a69e88adc6422f6c
tree3534a1f251749b64e7b53f5834800f182a6b4786
parent976dde010e513a9c7c3117a32b7b015f84b37430
atmel_tc library

Create <linux/atmel_tc.h> based on <asm-arm/arch-at91/at91-tc.h> and the
at91sam9263 and at32ap7000 datasheets.  Most AT91 and AT32 SOCs have one
or two of these TC blocks, which include three 16-bit timers that can be
interconnected in various ways.

These TC blocks can be used for external interfacing (such as PWM and
measurement), or used as somewhat quirky sixteen-bit timers.

Changes relative to the original version:
  * Drop unneeded inclusion of <linux/mutex.h>
  * Support an arbitrary number of TC blocks
  * Return a struct with information about a TC block from
    atmel_tc_alloc() instead of using a combination of return values
    and "out" parameters.
  * ioremap() the I/O registers on allocation
  * Look up clocks and irqs for all channels
  * Add "name" parameter to atmel_tc_alloc() and use this when
    requesting the iomem resource.
  * Check if the platform provided the necessary resources at probe()
    time instead of when the TCB is allocated.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
drivers/misc/Kconfig
drivers/misc/Makefile
drivers/misc/atmel_tclib.c [new file with mode: 0644]
include/linux/atmel_tc.h [new file with mode: 0644]