[kernel] r5609 - in dists/sid/linux-2.6/debian: . arch/arm patches
patches/series
Martin Michlmayr
tbm at costa.debian.org
Fri Jan 27 23:48:48 UTC 2006
Author: tbm
Date: Fri Jan 27 23:48:47 2006
New Revision: 5609
Added:
dists/sid/linux-2.6/debian/patches/arm-nslu2-beeper.patch
dists/sid/linux-2.6/debian/patches/input-ixp4xx-beeper.patch
Modified:
dists/sid/linux-2.6/debian/arch/arm/config.nslu2
dists/sid/linux-2.6/debian/changelog
dists/sid/linux-2.6/debian/patches/series/4
Log:
add beeper support for NSLU2
Modified: dists/sid/linux-2.6/debian/arch/arm/config.nslu2
==============================================================================
--- dists/sid/linux-2.6/debian/arch/arm/config.nslu2 (original)
+++ dists/sid/linux-2.6/debian/arch/arm/config.nslu2 Fri Jan 27 23:48:47 2006
@@ -1488,3 +1488,4 @@
CONFIG_TEXTSEARCH_KMP=m
CONFIG_TEXTSEARCH_BM=m
CONFIG_TEXTSEARCH_FSM=m
+CONFIG_INPUT_IXP4XX_BEEPER=y
Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog (original)
+++ dists/sid/linux-2.6/debian/changelog Fri Jan 27 23:48:47 2006
@@ -21,8 +21,12 @@
* [alpha] set __attribute__((always_inline)) on __cmpxchg(), to avoid
wrong optimizations with -Os (closes: #347556).
+ [ Martin Michlmayr ]
+ * Add input support for the ixp4xx beeper driver (Alessandro Zummo).
+ * Add NSLU2 specific portion of ixp4xx beeper driver (Alessandro Zummo).
+
-- Steve Langasek <vorlon at debian.org> Fri, 27 Jan 2006 13:25:34 -0800
-
+
linux-2.6 (2.6.15-3) unstable; urgency=low
[ Martin Michlmayr ]
Added: dists/sid/linux-2.6/debian/patches/arm-nslu2-beeper.patch
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/arm-nslu2-beeper.patch Fri Jan 27 23:48:47 2006
@@ -0,0 +1,32 @@
+# DP: arm/mach-ixp4xx portion of the beeper support for the NSLU2.
+
+Beeper support for the NSLU2.
+
+Signed-off-by: Alessandro Zummo <a.zummo at towertech.it>
+
+ arch/arm/mach-ixp4xx/nslu2-setup.c | 7 +
+
+--- linux-nslu2.orig/arch/arm/mach-ixp4xx/nslu2-setup.c 2006-01-23 02:13:55.000000000 +0100
++++ linux-nslu2/arch/arm/mach-ixp4xx/nslu2-setup.c 2006-01-25 11:32:14.000000000 +0100
+@@ -52,6 +52,12 @@ static struct platform_device nslu2_i2c_
+ .num_resources = 0,
+ };
+
++static struct platform_device nslu2_beeper = {
++ .name = "ixp4xx-beeper",
++ .id = NSLU2_GPIO_BUZZ,
++ .num_resources = 0,
++};
++
+ static struct resource nslu2_uart_resources[] = {
+ {
+ .start = IXP4XX_UART1_BASE_PHYS,
+@@ -99,6 +105,7 @@ static struct platform_device *nslu2_dev
+ &nslu2_i2c_controller,
+ &nslu2_flash,
+ &nslu2_uart,
++ &nslu2_beeper,
+ };
+
+ static void nslu2_power_off(void)
+
Added: dists/sid/linux-2.6/debian/patches/input-ixp4xx-beeper.patch
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/input-ixp4xx-beeper.patch Fri Jan 27 23:48:47 2006
@@ -0,0 +1,231 @@
+## DP: Add input support for ixp4xx beeper
+## DP: Patch author: Alessandro Zummo <alessandro.zummo at towertech.it>
+## DP: Upstream status: in input git tree (as of 2006-01-25)
+#
+
+author Alessandro Zummo <alessandro.zummo at towertech.it>
+ Wed, 25 Jan 2006 05:35:28 +0000 (00:35 -0500)
+committer Dmitry Torokhov <dtor_core at ameritech.net>
+ Wed, 25 Jan 2006 05:35:28 +0000 (00:35 -0500)
+commit 1d8e68ed936312822786678a1a04afcd3c21ba24
+tree ffadc5b38bedc1a6fd871fc7f17594b25b6ad463 tree
+parent 3ee68c4af3fd7228c1be63254b9f884614f9ebb2
+
+
+From: Alessandro Zummo <alessandro.zummo at towertech.it>
+Date: Wed, 25 Jan 2006 05:35:28 +0000 (-0500)
+Subject: Input: add ixp4xx beeper driver
+X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/dtor/input.git;a=commitdiff;h=1d8e68ed936312822786678a1a04afcd3c21ba24
+
+Input: add ixp4xx beeper driver
+
+This is a driver for beeper found in LinkSys NSLU2 boxes. It should work
+on any ixp4xx based platform.
+
+Signed-off-by: Alessandro Zummo <a.zummo at towertech.it>
+Signed-off-by: Dmitry Torokhov <dtor at mail.ru>
+---
+
+--- a/drivers/input/misc/Kconfig
++++ b/drivers/input/misc/Kconfig
+@@ -50,6 +50,18 @@ config INPUT_WISTRON_BTNS
+ To compile this driver as a module, choose M here: the module will
+ be called wistron_btns.
+
++config INPUT_IXP4XX_BEEPER
++ tristate "IXP4XX Beeper support"
++ depends on ARCH_IXP4XX
++ help
++ If you say yes here, you can connect a beeper to the
++ ixp4xx gpio pins. This is used by the LinkSys NSLU2.
++
++ If unsure, say Y.
++
++ To compile this driver as a module, choose M here: the
++ module will be called ixp4xx-beeper.
++
+ config INPUT_UINPUT
+ tristate "User level driver support"
+ help
+--- a/drivers/input/misc/Makefile
++++ b/drivers/input/misc/Makefile
+@@ -11,3 +11,4 @@ obj-$(CONFIG_INPUT_98SPKR) += 98spkr.o
+ obj-$(CONFIG_INPUT_UINPUT) += uinput.o
+ obj-$(CONFIG_INPUT_WISTRON_BTNS) += wistron_btns.o
+ obj-$(CONFIG_HP_SDC_RTC) += hp_sdc_rtc.o
++obj-$(CONFIG_INPUT_IXP4XX_BEEPER) += ixp4xx-beeper.o
+--- /dev/null
++++ b/drivers/input/misc/ixp4xx-beeper.c
+@@ -0,0 +1,172 @@
++/*
++ * Generic IXP4xx beeper driver
++ *
++ * Copyright (C) 2005 Tower Technologies
++ *
++ * based on nslu2-io.c
++ * Copyright (C) 2004 Karen Spearel
++ *
++ * Author: Alessandro Zummo <a.zummo at towertech.it>
++ * Maintainers: http://www.nslu2-linux.org/
++ *
++ * 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.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/input.h>
++#include <linux/delay.h>
++#include <linux/platform_device.h>
++#include <asm/hardware.h>
++
++MODULE_AUTHOR("Alessandro Zummo <a.zummo at towertech.it>");
++MODULE_DESCRIPTION("ixp4xx beeper driver");
++MODULE_LICENSE("GPL");
++
++static DEFINE_SPINLOCK(beep_lock);
++
++static int ixp4xx_spkr_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
++{
++ unsigned int pin = (unsigned int) dev->private;
++ unsigned int count = 0;
++ unsigned long flags;
++
++ if (type != EV_SND)
++ return -1;
++
++ switch (code) {
++ case SND_BELL:
++ if (value)
++ value = 1000;
++ case SND_TONE:
++ break;
++ default:
++ return -1;
++ }
++
++ if (value > 20 && value < 32767)
++#ifndef FREQ
++ count = (ixp4xx_get_board_tick_rate() / (value * 4)) - 1;
++#else
++ count = (FREQ / (value * 4)) - 1;
++#endif
++ spin_lock_irqsave(&beep_lock, flags);
++
++ if (count) {
++ gpio_line_config(pin, IXP4XX_GPIO_OUT);
++ gpio_line_set(pin, IXP4XX_GPIO_LOW);
++
++ *IXP4XX_OSRT2 = (count & ~IXP4XX_OST_RELOAD_MASK) | IXP4XX_OST_ENABLE;
++ } else {
++ gpio_line_config(pin, IXP4XX_GPIO_IN);
++ gpio_line_set(pin, IXP4XX_GPIO_HIGH);
++
++ *IXP4XX_OSRT2 = 0;
++ }
++
++ spin_unlock_irqrestore(&beep_lock, flags);
++
++ return 0;
++}
++
++static irqreturn_t ixp4xx_spkr_interrupt(int irq, void *dev_id, struct pt_regs *regs)
++{
++ /* clear interrupt */
++ *IXP4XX_OSST = IXP4XX_OSST_TIMER_2_PEND;
++
++ /* flip the beeper output */
++ *IXP4XX_GPIO_GPOUTR ^= (1 << (unsigned int) dev_id);
++
++ return IRQ_HANDLED;
++}
++
++static int __devinit ixp4xx_spkr_probe(struct platform_device *dev)
++{
++ struct input_dev *input_dev;
++ int err;
++
++ input_dev = input_allocate_device();
++ if (!input_dev)
++ return -ENOMEM;
++
++ input_dev->private = (void *) dev->id;
++ input_dev->name = "ixp4xx beeper",
++ input_dev->phys = "ixp4xx/gpio";
++ input_dev->id.bustype = BUS_HOST;
++ input_dev->id.vendor = 0x001f;
++ input_dev->id.product = 0x0001;
++ input_dev->id.version = 0x0100;
++ input_dev->cdev.dev = &dev->dev;
++
++ input_dev->evbit[0] = BIT(EV_SND);
++ input_dev->sndbit[0] = BIT(SND_BELL) | BIT(SND_TONE);
++ input_dev->event = ixp4xx_spkr_event;
++
++ err = request_irq(IRQ_IXP4XX_TIMER2, &ixp4xx_spkr_interrupt,
++ SA_INTERRUPT | SA_TIMER, "ixp4xx-beeper", (void *) dev->id);
++ if (err)
++ goto err_free_device;
++
++ err = input_register_device(input_dev);
++ if (err)
++ goto err_free_irq;
++
++ platform_set_drvdata(dev, input_dev);
++
++ return 0;
++
++ err_free_irq:
++ free_irq(IRQ_IXP4XX_TIMER2, dev);
++ err_free_device:
++ input_free_device(input_dev);
++
++ return err;
++}
++
++static int __devexit ixp4xx_spkr_remove(struct platform_device *dev)
++{
++ struct input_dev *input_dev = platform_get_drvdata(dev);
++
++ input_unregister_device(input_dev);
++ platform_set_drvdata(dev, NULL);
++
++ /* turn the speaker off */
++ disable_irq(IRQ_IXP4XX_TIMER2);
++ ixp4xx_spkr_event(NULL, EV_SND, SND_BELL, 0);
++
++ free_irq(IRQ_IXP4XX_TIMER2, dev);
++
++ return 0;
++}
++
++static void ixp4xx_spkr_shutdown(struct platform_device *dev)
++{
++ /* turn off the speaker */
++ disable_irq(IRQ_IXP4XX_TIMER2);
++ ixp4xx_spkr_event(NULL, EV_SND, SND_BELL, 0);
++}
++
++static struct platform_driver ixp4xx_spkr_platform_driver = {
++ .driver = {
++ .name = "ixp4xx-beeper",
++ .owner = THIS_MODULE,
++ },
++ .probe = ixp4xx_spkr_probe,
++ .remove = __devexit_p(ixp4xx_spkr_remove),
++ .shutdown = ixp4xx_spkr_shutdown,
++};
++
++static int __init ixp4xx_spkr_init(void)
++{
++ return platform_driver_register(&ixp4xx_spkr_platform_driver);
++}
++
++static void __exit ixp4xx_spkr_exit(void)
++{
++ platform_driver_unregister(&ixp4xx_spkr_platform_driver);
++}
++
++module_init(ixp4xx_spkr_init);
++module_exit(ixp4xx_spkr_exit);
Modified: dists/sid/linux-2.6/debian/patches/series/4
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/4 (original)
+++ dists/sid/linux-2.6/debian/patches/series/4 Fri Jan 27 23:48:47 2006
@@ -1,3 +1,5 @@
+ m68k-vmeints.patch
+ sparc64-jumping-time.patch
+ alpha-cmpxchg-inline.patch
++ input-ixp4xx-beeper.patch
++ arm-nslu2-beeper.patch
More information about the Kernel-svn-changes
mailing list