aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-3.10/0051-Added-inverted-transmitter-support.patch
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2014-02-28 20:30:08 +0000
committerFlorian Fainelli <florian@openwrt.org>2014-02-28 20:30:08 +0000
commitbb39b8d99aae1f7eb13a97bd874838da91080de6 (patch)
tree3046f53937c0bc5dc13e2b2ab7b688a1932199bf /target/linux/brcm2708/patches-3.10/0051-Added-inverted-transmitter-support.patch
parentc6c0d09f85c211560a1405441925681cfa25e8b1 (diff)
downloadupstream-bb39b8d99aae1f7eb13a97bd874838da91080de6.tar.gz
upstream-bb39b8d99aae1f7eb13a97bd874838da91080de6.tar.bz2
upstream-bb39b8d99aae1f7eb13a97bd874838da91080de6.zip
brcm2708: update against latest rpi-3.10.y branch
Update our copies of the brcm2708 patches to the latest rpi-3.10-y rebased against linux-3.10.y stable (3.10.32). This should hopefully make it easier for us in the future to leverage the raspberry/rpi-* branches. Signed-off-by: Florian Fainelli <florian@openwrt.org> SVN-Revision: 39770
Diffstat (limited to 'target/linux/brcm2708/patches-3.10/0051-Added-inverted-transmitter-support.patch')
-rw-r--r--target/linux/brcm2708/patches-3.10/0051-Added-inverted-transmitter-support.patch78
1 files changed, 78 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-3.10/0051-Added-inverted-transmitter-support.patch b/target/linux/brcm2708/patches-3.10/0051-Added-inverted-transmitter-support.patch
new file mode 100644
index 0000000000..893e9d6c8e
--- /dev/null
+++ b/target/linux/brcm2708/patches-3.10/0051-Added-inverted-transmitter-support.patch
@@ -0,0 +1,78 @@
+From f1f13a6b3798161ccc3852320bd2184b85c9209b Mon Sep 17 00:00:00 2001
+From: pjennings <pjennings-git@pjennings.net>
+Date: Wed, 20 Feb 2013 17:51:43 -0600
+Subject: [PATCH 051/174] Added inverted transmitter support
+
+---
+ drivers/staging/media/lirc/lirc_rpi.c | 17 +++++++++++------
+ 1 file changed, 11 insertions(+), 6 deletions(-)
+
+--- a/drivers/staging/media/lirc/lirc_rpi.c
++++ b/drivers/staging/media/lirc/lirc_rpi.c
+@@ -68,6 +68,8 @@ static int debug;
+ static int sense = -1;
+ /* use softcarrier by default */
+ static int softcarrier = 1;
++/* 0 = do not invert output, 1 = invert output */
++static int invert = 0;
+
+ struct gpio_chip *gpiochip;
+ struct irq_chip *irqchip;
+@@ -135,10 +137,10 @@ static long send_pulse_softcarrier(unsig
+ actual = 0; target = 0; flag = 0;
+ while (actual < length) {
+ if (flag) {
+- gpiochip->set(gpiochip, gpio_out_pin, 0);
++ gpiochip->set(gpiochip, gpio_out_pin, invert);
+ target += space_width;
+ } else {
+- gpiochip->set(gpiochip, gpio_out_pin, 1);
++ gpiochip->set(gpiochip, gpio_out_pin, !invert);
+ target += pulse_width;
+ }
+ d = (target - actual -
+@@ -162,7 +164,7 @@ static long send_pulse(unsigned long len
+ if (softcarrier) {
+ return send_pulse_softcarrier(length);
+ } else {
+- gpiochip->set(gpiochip, gpio_out_pin, 1);
++ gpiochip->set(gpiochip, gpio_out_pin, !invert);
+ safe_udelay(length);
+ return 0;
+ }
+@@ -170,7 +172,7 @@ static long send_pulse(unsigned long len
+
+ static void send_space(long length)
+ {
+- gpiochip->set(gpiochip, gpio_out_pin, 0);
++ gpiochip->set(gpiochip, gpio_out_pin, invert);
+ if (length <= 0)
+ return;
+ safe_udelay(length);
+@@ -318,7 +320,7 @@ static int init_port(void)
+
+ gpiochip->direction_input(gpiochip, gpio_in_pin);
+ gpiochip->direction_output(gpiochip, gpio_out_pin, 1);
+- gpiochip->set(gpiochip, gpio_out_pin, 0);
++ gpiochip->set(gpiochip, gpio_out_pin, invert);
+
+ irq = gpiochip->to_irq(gpiochip, gpio_in_pin);
+ dprintk("to_irq %d\n", irq);
+@@ -457,7 +459,7 @@ static ssize_t lirc_write(struct file *f
+ else
+ delta = send_pulse(wbuf[i]);
+ }
+- gpiochip->set(gpiochip, gpio_out_pin, 0);
++ gpiochip->set(gpiochip, gpio_out_pin, invert);
+
+ spin_unlock_irqrestore(&lock, flags);
+ kfree(wbuf);
+@@ -683,5 +685,8 @@ MODULE_PARM_DESC(sense, "Override autode
+ module_param(softcarrier, bool, S_IRUGO);
+ MODULE_PARM_DESC(softcarrier, "Software carrier (0 = off, 1 = on, default on)");
+
++module_param(invert, bool, S_IRUGO);
++MODULE_PARM_DESC(invert, "Invert output (0 = off, 1 = on, default off");
++
+ module_param(debug, bool, S_IRUGO | S_IWUSR);
+ MODULE_PARM_DESC(debug, "Enable debugging messages");