* [PATCH v5 0/3] ARM: sunxi: Add support for consumer infrared devices @ 2014-04-30 15:16 Alexander Bersenev [not found] ` <1398871010-30681-1-git-send-email-bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> 0 siblings, 1 reply; 11+ messages in thread From: Alexander Bersenev @ 2014-04-30 15:16 UTC (permalink / raw) To: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, david-0WFrdVpeebksCylrc8G9yg, devicetree-u79uwXL29TY76Z2rM5mHXA, galak-sgV2jX0FEOL9JmXXK+q4OQ, grant.likely-QSEj5FYQhm4dnm+yROfE0A, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg, james.hogan-1AXoQHu6uovQT0dZR+AlfA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-lFZ/pmaqli7XmaaqVzeoHQ, m.chehab-Sze3O3UU22JBDgjK7y7TUQ, mark.rutland-5wv7dgnIgG8, maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8, pawel.moll-5wv7dgnIgG8, rdunlap-wEGCiKHe2LqWVfeAwA7xHQ, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, sean-hENCXIMQXOg, srinivas.kandagatla-qxv4g6HH51o, wingrime-3kdeTeqwOZ9EV1b7eY7vFQ, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-media-u79uwXL29TY76Z2rM5mHXA Cc: Alexander Bersenev This patch introduces Consumer IR(CIR) support for sunxi boards. This is based on Alexsey Shestacov's work based on the original driver supplied by Allwinner. Signed-off-by: Alexander Bersenev <bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> Signed-off-by: Alexsey Shestacov <wingrime-3kdeTeqwOZ9EV1b7eY7vFQ@public.gmane.org> --- Changes since version 1: - Fix timer memory leaks - Fix race condition when driver unloads while interrupt handler is active - Support Cubieboard 2(need testing) Changes since version 2: - More reliable keydown events - Documentation fixes - Rename registers accurding to A20 user manual - Remove some includes, order includes alphabetically - Use BIT macro - Typo fixes Changes since version 3: - Split the patch on smaller parts - More documentation fixes - Add clock-names in DT - Use devm_clk_get function to get the clocks - Removed gpios property from ir's DT - Changed compatible from allwinner,sunxi-ir to allwinner,sun7i-a20-ir in DT - Use spin_lock_irq instead spin_lock_irqsave in interrupt handler - Add myself in the copyright ;) - Coding style and indentation fixes Changes since version 4: - Try to fix indentation errors by sending patches with git send-mail Alexander Bersenev (3): ARM: sunxi: Add documentation for sunxi consumer infrared devices ARM: sunxi: Add driver for sunxi IR controller ARM: sunxi: Add IR controller support in DT on A20 .../devicetree/bindings/media/sunxi-ir.txt | 23 ++ arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 6 + arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 6 + arch/arm/boot/dts/sun7i-a20.dtsi | 31 +++ drivers/media/rc/Kconfig | 10 + drivers/media/rc/Makefile | 1 + drivers/media/rc/sunxi-ir.c | 303 +++++++++++++++++++++ 7 files changed, 380 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/sunxi-ir.txt create mode 100644 drivers/media/rc/sunxi-ir.c -- 1.9.2 ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <1398871010-30681-1-git-send-email-bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org>]
* [PATCH v5 1/3] ARM: sunxi: Add documentation for sunxi consumer infrared devices [not found] ` <1398871010-30681-1-git-send-email-bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> @ 2014-04-30 15:16 ` Alexander Bersenev [not found] ` <1398871010-30681-2-git-send-email-bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> 2014-04-30 15:16 ` [PATCH v5 2/3] ARM: sunxi: Add driver for sunxi IR controller Alexander Bersenev ` (3 subsequent siblings) 4 siblings, 1 reply; 11+ messages in thread From: Alexander Bersenev @ 2014-04-30 15:16 UTC (permalink / raw) To: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, david-0WFrdVpeebksCylrc8G9yg, devicetree-u79uwXL29TY76Z2rM5mHXA, galak-sgV2jX0FEOL9JmXXK+q4OQ, grant.likely-QSEj5FYQhm4dnm+yROfE0A, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg, james.hogan-1AXoQHu6uovQT0dZR+AlfA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-lFZ/pmaqli7XmaaqVzeoHQ, m.chehab-Sze3O3UU22JBDgjK7y7TUQ, mark.rutland-5wv7dgnIgG8, maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8, pawel.moll-5wv7dgnIgG8, rdunlap-wEGCiKHe2LqWVfeAwA7xHQ, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, sean-hENCXIMQXOg, srinivas.kandagatla-qxv4g6HH51o, wingrime-3kdeTeqwOZ9EV1b7eY7vFQ, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-media-u79uwXL29TY76Z2rM5mHXA Cc: Alexander Bersenev This patch adds documentation for Device-Tree bindings for sunxi IR controller. Signed-off-by: Alexander Bersenev <bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> Signed-off-by: Alexsey Shestacov <wingrime-3kdeTeqwOZ9EV1b7eY7vFQ@public.gmane.org> --- .../devicetree/bindings/media/sunxi-ir.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/sunxi-ir.txt diff --git a/Documentation/devicetree/bindings/media/sunxi-ir.txt b/Documentation/devicetree/bindings/media/sunxi-ir.txt new file mode 100644 index 0000000..d502cf4 --- /dev/null +++ b/Documentation/devicetree/bindings/media/sunxi-ir.txt @@ -0,0 +1,23 @@ +Device-Tree bindings for SUNXI IR controller found in sunXi SoC family + +Required properties: +- compatible : should be "allwinner,sun7i-a20-ir"; +- clocks : list of clock specifiers, corresponding to + entries in clock-names property; +- clock-names : should contain "apb0_ir0" and "ir0" entries; +- interrupts : should contain IR IRQ number; +- reg : should contain IO map address for IR. + +Optional properties: +- linux,rc-map-name : Remote control map name. + +Example: + +ir0: ir@01c21800 { + compatible = "allwinner,sun7i-a20-ir"; + clocks = <&apb0_gates 6>, <&ir0_clk>; + clock-names = "apb0_ir0", "ir0"; + interrupts = <0 5 1>; + reg = <0x01C21800 0x40>; + linux,rc-map-name = "rc-rc6-mce"; +}; -- 1.9.2 ^ permalink raw reply related [flat|nested] 11+ messages in thread
[parent not found: <1398871010-30681-2-git-send-email-bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org>]
* Re: [PATCH v5 1/3] ARM: sunxi: Add documentation for sunxi consumer infrared devices [not found] ` <1398871010-30681-2-git-send-email-bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> @ 2014-05-03 17:45 ` Maxime Ripard 0 siblings, 0 replies; 11+ messages in thread From: Maxime Ripard @ 2014-05-03 17:45 UTC (permalink / raw) To: Alexander Bersenev Cc: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, david-0WFrdVpeebksCylrc8G9yg, devicetree-u79uwXL29TY76Z2rM5mHXA, galak-sgV2jX0FEOL9JmXXK+q4OQ, grant.likely-QSEj5FYQhm4dnm+yROfE0A, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg, james.hogan-1AXoQHu6uovQT0dZR+AlfA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-lFZ/pmaqli7XmaaqVzeoHQ, m.chehab-Sze3O3UU22JBDgjK7y7TUQ, mark.rutland-5wv7dgnIgG8, pawel.moll-5wv7dgnIgG8, rdunlap-wEGCiKHe2LqWVfeAwA7xHQ, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, sean-hENCXIMQXOg, srinivas.kandagatla-qxv4g6HH51o, wingrime-3kdeTeqwOZ9EV1b7eY7vFQ, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-media-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 1868 bytes --] On Wed, Apr 30, 2014 at 09:16:48PM +0600, Alexander Bersenev wrote: > This patch adds documentation for Device-Tree bindings for sunxi IR > controller. > > Signed-off-by: Alexander Bersenev <bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> > Signed-off-by: Alexsey Shestacov <wingrime-3kdeTeqwOZ9EV1b7eY7vFQ@public.gmane.org> > --- > .../devicetree/bindings/media/sunxi-ir.txt | 23 ++++++++++++++++++++++ > 1 file changed, 23 insertions(+) > create mode 100644 Documentation/devicetree/bindings/media/sunxi-ir.txt > > diff --git a/Documentation/devicetree/bindings/media/sunxi-ir.txt b/Documentation/devicetree/bindings/media/sunxi-ir.txt > new file mode 100644 > index 0000000..d502cf4 > --- /dev/null > +++ b/Documentation/devicetree/bindings/media/sunxi-ir.txt > @@ -0,0 +1,23 @@ > +Device-Tree bindings for SUNXI IR controller found in sunXi SoC family > + > +Required properties: > +- compatible : should be "allwinner,sun7i-a20-ir"; > +- clocks : list of clock specifiers, corresponding to > + entries in clock-names property; > +- clock-names : should contain "apb0_ir0" and "ir0" entries; > +- interrupts : should contain IR IRQ number; > +- reg : should contain IO map address for IR. > + > +Optional properties: > +- linux,rc-map-name : Remote control map name. > + > +Example: > + > +ir0: ir@01c21800 { > + compatible = "allwinner,sun7i-a20-ir"; > + clocks = <&apb0_gates 6>, <&ir0_clk>; > + clock-names = "apb0_ir0", "ir0"; Most of the time, we use something like "apb" and "ir". The names being generic, if there ever comes a time where you have a second controller, you don't have to do anything confusing or inconsistent. Thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v5 2/3] ARM: sunxi: Add driver for sunxi IR controller [not found] ` <1398871010-30681-1-git-send-email-bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> 2014-04-30 15:16 ` [PATCH v5 1/3] ARM: sunxi: Add documentation for sunxi " Alexander Bersenev @ 2014-04-30 15:16 ` Alexander Bersenev [not found] ` <1398871010-30681-3-git-send-email-bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> 2014-04-30 15:16 ` [PATCH v5 3/3] ARM: sunxi: Add IR controller support in DT on A20 Alexander Bersenev ` (2 subsequent siblings) 4 siblings, 1 reply; 11+ messages in thread From: Alexander Bersenev @ 2014-04-30 15:16 UTC (permalink / raw) To: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, david-0WFrdVpeebksCylrc8G9yg, devicetree-u79uwXL29TY76Z2rM5mHXA, galak-sgV2jX0FEOL9JmXXK+q4OQ, grant.likely-QSEj5FYQhm4dnm+yROfE0A, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg, james.hogan-1AXoQHu6uovQT0dZR+AlfA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-lFZ/pmaqli7XmaaqVzeoHQ, m.chehab-Sze3O3UU22JBDgjK7y7TUQ, mark.rutland-5wv7dgnIgG8, maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8, pawel.moll-5wv7dgnIgG8, rdunlap-wEGCiKHe2LqWVfeAwA7xHQ, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, sean-hENCXIMQXOg, srinivas.kandagatla-qxv4g6HH51o, wingrime-3kdeTeqwOZ9EV1b7eY7vFQ, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-media-u79uwXL29TY76Z2rM5mHXA Cc: Alexander Bersenev This patch adds driver for sunxi IR controller. It is based on Alexsey Shestacov's work based on the original driver supplied by Allwinner. Signed-off-by: Alexander Bersenev <bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> Signed-off-by: Alexsey Shestacov <wingrime-3kdeTeqwOZ9EV1b7eY7vFQ@public.gmane.org> --- drivers/media/rc/Kconfig | 10 ++ drivers/media/rc/Makefile | 1 + drivers/media/rc/sunxi-ir.c | 303 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 314 insertions(+) create mode 100644 drivers/media/rc/sunxi-ir.c diff --git a/drivers/media/rc/Kconfig b/drivers/media/rc/Kconfig index 8fbd377..9427fad 100644 --- a/drivers/media/rc/Kconfig +++ b/drivers/media/rc/Kconfig @@ -343,4 +343,14 @@ config RC_ST If you're not sure, select N here. +config IR_SUNXI + tristate "SUNXI IR remote control" + depends on RC_CORE + depends on ARCH_SUNXI + ---help--- + Say Y if you want to use sunXi internal IR Controller + + To compile this driver as a module, choose M here: the module will + be called sunxi-ir. + endif #RC_DEVICES diff --git a/drivers/media/rc/Makefile b/drivers/media/rc/Makefile index f8b54ff..93cdbe9 100644 --- a/drivers/media/rc/Makefile +++ b/drivers/media/rc/Makefile @@ -32,4 +32,5 @@ obj-$(CONFIG_IR_GPIO_CIR) += gpio-ir-recv.o obj-$(CONFIG_IR_IGUANA) += iguanair.o obj-$(CONFIG_IR_TTUSBIR) += ttusbir.o obj-$(CONFIG_RC_ST) += st_rc.o +obj-$(CONFIG_IR_SUNXI) += sunxi-ir.o obj-$(CONFIG_IR_IMG) += img-ir/ diff --git a/drivers/media/rc/sunxi-ir.c b/drivers/media/rc/sunxi-ir.c new file mode 100644 index 0000000..f051d94 --- /dev/null +++ b/drivers/media/rc/sunxi-ir.c @@ -0,0 +1,303 @@ +/* + * Driver for Allwinner sunXi IR controller + * + * Copyright (C) 2014 Alexsey Shestacov <wingrime-3kdeTeqwOZ9EV1b7eY7vFQ@public.gmane.org> + * Copyright (C) 2014 Alexander Bersenev <bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> + * + * Based on sun5i-ir.c: + * Copyright (C) 2007-2012 Daniel Wang + * Allwinner Technology Co., Ltd. <www.allwinnertech.com> + * + * 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. + */ + +#include <linux/clk.h> +#include <linux/interrupt.h> +#include <linux/module.h> +#include <linux/of_platform.h> +#include <media/rc-core.h> + +#define SUNXI_IR_DEV "sunxi-ir" + +/* Registers */ +/* IR Control */ +#define SUNXI_IR_CTL_REG 0x00 +/* Rx Config */ +#define SUNXI_IR_RXCTL_REG 0x10 +/* Rx Data */ +#define SUNXI_IR_RXFIFO_REG 0x20 +/* Rx Interrupt Enable */ +#define SUNXI_IR_RXINT_REG 0x2C +/* Rx Interrupt Status */ +#define SUNXI_IR_RXSTA_REG 0x30 +/* IR Sample Config */ +#define SUNXI_IR_CIR_REG 0x34 + +/* Bit Definition of IR_RXINTS_REG Register */ +#define SUNXI_IR_RXINTS_RXOF BIT(0) /* Rx FIFO Overflow */ +#define SUNXI_IR_RXINTS_RXPE BIT(1) /* Rx Packet End */ +#define SUNXI_IR_RXINTS_RXDA BIT(4) /* Rx FIFO Data Available */ +/* Hardware supported fifo size */ +#define SUNXI_IR_FIFO_SIZE 16 +/* How much messages in fifo triggers IRQ */ +#define SUNXI_IR_FIFO_TRIG 8 +/* Required frequency for IR0 or IR1 clock in CIR mode */ +#define SUNXI_IR_BASE_CLK 8000000 +/* Frequency after IR internal divider */ +#define SUNXI_IR_CLK (SUNXI_IR_BASE_CLK / 64) +/* Sample period in ns */ +#define SUNXI_IR_SAMPLE (1000000000ul / SUNXI_IR_CLK) +/* Filter threshold in samples */ +#define SUNXI_IR_RXFILT 1 +/* Idle Threshold in samples */ +#define SUNXI_IR_RXIDLE 20 +/* Time after which device stops sending data in ms */ +#define SUNXI_IR_TIMEOUT 120 + +struct sunxi_ir { + spinlock_t ir_lock; + struct rc_dev *rc; + void __iomem *base; + int irq; + struct clk *clk; + struct clk *apb_clk; + const char *map_name; +}; + +static irqreturn_t sunxi_ir_irq(int irqno, void *dev_id) +{ + unsigned long status; + unsigned char dt; + unsigned int cnt, rc; + struct sunxi_ir *ir = dev_id; + DEFINE_IR_RAW_EVENT(rawir); + + spin_lock_irq(&ir->ir_lock); + + status = readl(ir->base + SUNXI_IR_RXSTA_REG); + + /* clean all pending statuses */ + writel(status | 0xff, ir->base + SUNXI_IR_RXSTA_REG); + + if (status & SUNXI_IR_RXINTS_RXDA) { + /* How much messages in fifo */ + rc = (status >> 8) & 0x3f; + /* Sanity check */ + rc = rc > SUNXI_IR_FIFO_SIZE ? SUNXI_IR_FIFO_SIZE : rc; + /* if we have data */ + for (cnt = 0; cnt < rc; cnt++) { + /* for each bit in fifo */ + dt = readb(ir->base + SUNXI_IR_RXFIFO_REG); + rawir.pulse = (dt & 0x80) != 0; + rawir.duration = (dt & 0x7f) * SUNXI_IR_SAMPLE; + ir_raw_event_store_with_filter(ir->rc, &rawir); + } + } + + if (status & SUNXI_IR_RXINTS_RXOF) + ir_raw_event_reset(ir->rc); + else if (status & SUNXI_IR_RXINTS_RXPE) { + ir_raw_event_set_idle(ir->rc, true); + ir_raw_event_handle(ir->rc); + } + + spin_unlock_irq(&ir->ir_lock); + + return IRQ_HANDLED; +} + + +static int sunxi_ir_probe(struct platform_device *pdev) +{ + int ret = 0; + unsigned long tmp = 0; + + struct device *dev = &pdev->dev; + struct device_node *dn = dev->of_node; + struct resource *res; + struct sunxi_ir *ir; + + ir = devm_kzalloc(dev, sizeof(struct sunxi_ir), GFP_KERNEL); + if (!ir) + return -ENOMEM; + + /* Clock */ + ir->apb_clk = devm_clk_get(dev, "apb"); + if (IS_ERR(ir->apb_clk)) { + dev_err(dev, "failed to get a apb clock.\n"); + return -EINVAL; + } + ir->clk = devm_clk_get(dev, "ir"); + if (IS_ERR(ir->clk)) { + dev_err(dev, "failed to get a ir clock.\n"); + return -EINVAL; + } + + ret = clk_set_rate(ir->clk, SUNXI_IR_BASE_CLK); + if (ret) { + dev_err(dev, "set ir base clock failed!\n"); + return -EINVAL; + } + + if (clk_prepare_enable(ir->apb_clk)) { + dev_err(dev, "try to enable apb_ir_clk failed\n"); + return -EINVAL; + } + + if (clk_prepare_enable(ir->clk)) { + dev_err(dev, "try to enable ir_clk failed\n"); + ret = -EINVAL; + goto exit_clkdisable_apb_clk; + } + + /* IO */ + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + + ir->base = devm_ioremap_resource(dev, res); + if (IS_ERR(ir->base)) { + dev_err(dev, "failed to map registers\n"); + ret = -ENOMEM; + goto exit_clkdisable_clk; + } + + /* IRQ */ + ir->irq = platform_get_irq(pdev, 0); + if (ir->irq < 0) { + dev_err(dev, "no irq resource\n"); + ret = -EINVAL; + goto exit_clkdisable_clk; + } + + ret = devm_request_irq(dev, ir->irq, sunxi_ir_irq, 0, SUNXI_IR_DEV, ir); + if (ret) { + dev_err(dev, "failed request irq\n"); + ret = -EINVAL; + goto exit_clkdisable_clk; + } + + ir->rc = rc_allocate_device(); + + if (!ir->rc) { + dev_err(dev, "failed to allocate device\n"); + ret = -ENOMEM; + goto exit_clkdisable_clk; + } + + ir->rc->priv = ir; + ir->rc->input_name = SUNXI_IR_DEV; + ir->rc->input_phys = "sunxi-ir/input0"; + ir->rc->input_id.bustype = BUS_HOST; + ir->rc->input_id.vendor = 0x0001; + ir->rc->input_id.product = 0x0001; + ir->rc->input_id.version = 0x0100; + ir->map_name = of_get_property(dn, "linux,rc-map-name", NULL); + ir->rc->map_name = ir->map_name ?: RC_MAP_EMPTY; + ir->rc->dev.parent = dev; + ir->rc->driver_type = RC_DRIVER_IR_RAW; + rc_set_allowed_protocols(ir->rc, RC_BIT_ALL); + ir->rc->rx_resolution = SUNXI_IR_SAMPLE; + ir->rc->timeout = MS_TO_NS(SUNXI_IR_TIMEOUT); + ir->rc->driver_name = SUNXI_IR_DEV; + + ret = rc_register_device(ir->rc); + if (ret) { + dev_err(dev, "failed to register rc device\n"); + ret = -EINVAL; + goto exit_free_dev; + } + + platform_set_drvdata(pdev, ir); + + /* Enable CIR Mode */ + writel(0x3 << 4, ir->base+SUNXI_IR_CTL_REG); + + /* Config IR Sample Register */ + /* Fsample = clk */ + tmp = 0; + /* Set Filter Threshold */ + tmp |= (SUNXI_IR_RXFILT & 0x3f) << 2; + /* Set Idle Threshold */ + tmp |= (SUNXI_IR_RXIDLE & 0xff) << 8; + writel(tmp, ir->base + SUNXI_IR_CIR_REG); + + /* Invert Input Signal */ + writel(0x1 << 2, ir->base + SUNXI_IR_RXCTL_REG); + + /* Clear All Rx Interrupt Status */ + writel(0xff, ir->base + SUNXI_IR_RXSTA_REG); + + /* Enable IRQ on data, overflow, packed end */ + tmp = (0x1 << 4) | 0x3; + + /* Rx FIFO Threshold */ + tmp |= (SUNXI_IR_FIFO_TRIG - 1) << 8; + + writel(tmp, ir->base + SUNXI_IR_RXINT_REG); + + /* Enable IR Module */ + tmp = readl(ir->base + SUNXI_IR_CTL_REG); + + writel(tmp | 0x3, ir->base + SUNXI_IR_CTL_REG); + + dev_info(dev, "initialized sunXi IR driver\n"); + return 0; + +exit_free_dev: + rc_free_device(ir->rc); +exit_clkdisable_clk: + clk_disable_unprepare(ir->clk); +exit_clkdisable_apb_clk: + clk_disable_unprepare(ir->apb_clk); + + return ret; +} + +static int sunxi_ir_remove(struct platform_device *pdev) +{ + unsigned long flags; + struct sunxi_ir *ir = platform_get_drvdata(pdev); + + clk_disable_unprepare(ir->clk); + clk_disable_unprepare(ir->apb_clk); + + spin_lock_irqsave(&ir->ir_lock, flags); + /* disable IR IRQ */ + writel(0, ir->base + SUNXI_IR_RXINT_REG); + /* clear All Rx Interrupt Status */ + writel(0xff, ir->base + SUNXI_IR_RXSTA_REG); + /* disable IR */ + writel(0, ir->base + SUNXI_IR_CTL_REG); + spin_unlock_irqrestore(&ir->ir_lock, flags); + + rc_unregister_device(ir->rc); + return 0; +} + +static const struct of_device_id sunxi_ir_match[] = { + { .compatible = "allwinner,sun7i-a20-ir", }, + {}, +}; + +static struct platform_driver sunxi_ir_driver = { + .probe = sunxi_ir_probe, + .remove = sunxi_ir_remove, + .driver = { + .name = SUNXI_IR_DEV, + .owner = THIS_MODULE, + .of_match_table = sunxi_ir_match, + }, +}; + +module_platform_driver(sunxi_ir_driver); + +MODULE_DESCRIPTION("Allwinner sunXi IR controller driver"); +MODULE_AUTHOR("Alexsey Shestacov <wingrime-3kdeTeqwOZ9EV1b7eY7vFQ@public.gmane.org>"); +MODULE_LICENSE("GPL"); -- 1.9.2 ^ permalink raw reply related [flat|nested] 11+ messages in thread
[parent not found: <1398871010-30681-3-git-send-email-bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org>]
* Re: [PATCH v5 2/3] ARM: sunxi: Add driver for sunxi IR controller [not found] ` <1398871010-30681-3-git-send-email-bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> @ 2014-05-03 17:53 ` Maxime Ripard 0 siblings, 0 replies; 11+ messages in thread From: Maxime Ripard @ 2014-05-03 17:53 UTC (permalink / raw) To: Alexander Bersenev Cc: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, david-0WFrdVpeebksCylrc8G9yg, devicetree-u79uwXL29TY76Z2rM5mHXA, galak-sgV2jX0FEOL9JmXXK+q4OQ, grant.likely-QSEj5FYQhm4dnm+yROfE0A, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg, james.hogan-1AXoQHu6uovQT0dZR+AlfA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-lFZ/pmaqli7XmaaqVzeoHQ, m.chehab-Sze3O3UU22JBDgjK7y7TUQ, mark.rutland-5wv7dgnIgG8, pawel.moll-5wv7dgnIgG8, rdunlap-wEGCiKHe2LqWVfeAwA7xHQ, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, sean-hENCXIMQXOg, srinivas.kandagatla-qxv4g6HH51o, wingrime-3kdeTeqwOZ9EV1b7eY7vFQ, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-media-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 9820 bytes --] On Wed, Apr 30, 2014 at 09:16:49PM +0600, Alexander Bersenev wrote: > This patch adds driver for sunxi IR controller. > It is based on Alexsey Shestacov's work based on the original driver > supplied by Allwinner. > > Signed-off-by: Alexander Bersenev <bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> > Signed-off-by: Alexsey Shestacov <wingrime-3kdeTeqwOZ9EV1b7eY7vFQ@public.gmane.org> > --- > drivers/media/rc/Kconfig | 10 ++ > drivers/media/rc/Makefile | 1 + > drivers/media/rc/sunxi-ir.c | 303 ++++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 314 insertions(+) > create mode 100644 drivers/media/rc/sunxi-ir.c > > diff --git a/drivers/media/rc/Kconfig b/drivers/media/rc/Kconfig > index 8fbd377..9427fad 100644 > --- a/drivers/media/rc/Kconfig > +++ b/drivers/media/rc/Kconfig > @@ -343,4 +343,14 @@ config RC_ST > > If you're not sure, select N here. > > +config IR_SUNXI > + tristate "SUNXI IR remote control" > + depends on RC_CORE > + depends on ARCH_SUNXI > + ---help--- > + Say Y if you want to use sunXi internal IR Controller > + > + To compile this driver as a module, choose M here: the module will > + be called sunxi-ir. > + > endif #RC_DEVICES > diff --git a/drivers/media/rc/Makefile b/drivers/media/rc/Makefile > index f8b54ff..93cdbe9 100644 > --- a/drivers/media/rc/Makefile > +++ b/drivers/media/rc/Makefile > @@ -32,4 +32,5 @@ obj-$(CONFIG_IR_GPIO_CIR) += gpio-ir-recv.o > obj-$(CONFIG_IR_IGUANA) += iguanair.o > obj-$(CONFIG_IR_TTUSBIR) += ttusbir.o > obj-$(CONFIG_RC_ST) += st_rc.o > +obj-$(CONFIG_IR_SUNXI) += sunxi-ir.o > obj-$(CONFIG_IR_IMG) += img-ir/ > diff --git a/drivers/media/rc/sunxi-ir.c b/drivers/media/rc/sunxi-ir.c > new file mode 100644 > index 0000000..f051d94 > --- /dev/null > +++ b/drivers/media/rc/sunxi-ir.c > @@ -0,0 +1,303 @@ > +/* > + * Driver for Allwinner sunXi IR controller > + * > + * Copyright (C) 2014 Alexsey Shestacov <wingrime-3kdeTeqwOZ9EV1b7eY7vFQ@public.gmane.org> > + * Copyright (C) 2014 Alexander Bersenev <bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> > + * > + * Based on sun5i-ir.c: > + * Copyright (C) 2007-2012 Daniel Wang > + * Allwinner Technology Co., Ltd. <www.allwinnertech.com> > + * > + * 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. > + */ > + > +#include <linux/clk.h> > +#include <linux/interrupt.h> > +#include <linux/module.h> > +#include <linux/of_platform.h> > +#include <media/rc-core.h> > + > +#define SUNXI_IR_DEV "sunxi-ir" > + > +/* Registers */ > +/* IR Control */ > +#define SUNXI_IR_CTL_REG 0x00 > +/* Rx Config */ > +#define SUNXI_IR_RXCTL_REG 0x10 > +/* Rx Data */ > +#define SUNXI_IR_RXFIFO_REG 0x20 > +/* Rx Interrupt Enable */ > +#define SUNXI_IR_RXINT_REG 0x2C > +/* Rx Interrupt Status */ > +#define SUNXI_IR_RXSTA_REG 0x30 > +/* IR Sample Config */ > +#define SUNXI_IR_CIR_REG 0x34 > + > +/* Bit Definition of IR_RXINTS_REG Register */ > +#define SUNXI_IR_RXINTS_RXOF BIT(0) /* Rx FIFO Overflow */ > +#define SUNXI_IR_RXINTS_RXPE BIT(1) /* Rx Packet End */ > +#define SUNXI_IR_RXINTS_RXDA BIT(4) /* Rx FIFO Data Available */ > +/* Hardware supported fifo size */ > +#define SUNXI_IR_FIFO_SIZE 16 > +/* How much messages in fifo triggers IRQ */ > +#define SUNXI_IR_FIFO_TRIG 8 > +/* Required frequency for IR0 or IR1 clock in CIR mode */ > +#define SUNXI_IR_BASE_CLK 8000000 > +/* Frequency after IR internal divider */ > +#define SUNXI_IR_CLK (SUNXI_IR_BASE_CLK / 64) > +/* Sample period in ns */ > +#define SUNXI_IR_SAMPLE (1000000000ul / SUNXI_IR_CLK) > +/* Filter threshold in samples */ > +#define SUNXI_IR_RXFILT 1 > +/* Idle Threshold in samples */ > +#define SUNXI_IR_RXIDLE 20 > +/* Time after which device stops sending data in ms */ > +#define SUNXI_IR_TIMEOUT 120 > + > +struct sunxi_ir { > + spinlock_t ir_lock; > + struct rc_dev *rc; > + void __iomem *base; > + int irq; > + struct clk *clk; > + struct clk *apb_clk; > + const char *map_name; > +}; > + > +static irqreturn_t sunxi_ir_irq(int irqno, void *dev_id) > +{ > + unsigned long status; > + unsigned char dt; > + unsigned int cnt, rc; > + struct sunxi_ir *ir = dev_id; > + DEFINE_IR_RAW_EVENT(rawir); > + > + spin_lock_irq(&ir->ir_lock); > + > + status = readl(ir->base + SUNXI_IR_RXSTA_REG); > + > + /* clean all pending statuses */ > + writel(status | 0xff, ir->base + SUNXI_IR_RXSTA_REG); > + > + if (status & SUNXI_IR_RXINTS_RXDA) { > + /* How much messages in fifo */ > + rc = (status >> 8) & 0x3f; > + /* Sanity check */ > + rc = rc > SUNXI_IR_FIFO_SIZE ? SUNXI_IR_FIFO_SIZE : rc; > + /* if we have data */ > + for (cnt = 0; cnt < rc; cnt++) { > + /* for each bit in fifo */ > + dt = readb(ir->base + SUNXI_IR_RXFIFO_REG); > + rawir.pulse = (dt & 0x80) != 0; > + rawir.duration = (dt & 0x7f) * SUNXI_IR_SAMPLE; > + ir_raw_event_store_with_filter(ir->rc, &rawir); > + } > + } > + > + if (status & SUNXI_IR_RXINTS_RXOF) > + ir_raw_event_reset(ir->rc); > + else if (status & SUNXI_IR_RXINTS_RXPE) { > + ir_raw_event_set_idle(ir->rc, true); > + ir_raw_event_handle(ir->rc); > + } > + > + spin_unlock_irq(&ir->ir_lock); > + > + return IRQ_HANDLED; > +} > + > + > +static int sunxi_ir_probe(struct platform_device *pdev) > +{ > + int ret = 0; > + unsigned long tmp = 0; > + > + struct device *dev = &pdev->dev; > + struct device_node *dn = dev->of_node; > + struct resource *res; > + struct sunxi_ir *ir; > + > + ir = devm_kzalloc(dev, sizeof(struct sunxi_ir), GFP_KERNEL); > + if (!ir) > + return -ENOMEM; > + > + /* Clock */ > + ir->apb_clk = devm_clk_get(dev, "apb"); > + if (IS_ERR(ir->apb_clk)) { > + dev_err(dev, "failed to get a apb clock.\n"); > + return -EINVAL; > + } > + ir->clk = devm_clk_get(dev, "ir"); > + if (IS_ERR(ir->clk)) { > + dev_err(dev, "failed to get a ir clock.\n"); > + return -EINVAL; > + } > + > + ret = clk_set_rate(ir->clk, SUNXI_IR_BASE_CLK); > + if (ret) { > + dev_err(dev, "set ir base clock failed!\n"); > + return -EINVAL; > + } > + > + if (clk_prepare_enable(ir->apb_clk)) { > + dev_err(dev, "try to enable apb_ir_clk failed\n"); > + return -EINVAL; > + } > + > + if (clk_prepare_enable(ir->clk)) { > + dev_err(dev, "try to enable ir_clk failed\n"); > + ret = -EINVAL; > + goto exit_clkdisable_apb_clk; > + } > + > + /* IO */ > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > + > + ir->base = devm_ioremap_resource(dev, res); > + if (IS_ERR(ir->base)) { > + dev_err(dev, "failed to map registers\n"); > + ret = -ENOMEM; > + goto exit_clkdisable_clk; > + } > + > + /* IRQ */ > + ir->irq = platform_get_irq(pdev, 0); > + if (ir->irq < 0) { > + dev_err(dev, "no irq resource\n"); > + ret = -EINVAL; > + goto exit_clkdisable_clk; > + } > + > + ret = devm_request_irq(dev, ir->irq, sunxi_ir_irq, 0, SUNXI_IR_DEV, ir); > + if (ret) { > + dev_err(dev, "failed request irq\n"); > + ret = -EINVAL; > + goto exit_clkdisable_clk; > + } > + > + ir->rc = rc_allocate_device(); > + > + if (!ir->rc) { > + dev_err(dev, "failed to allocate device\n"); > + ret = -ENOMEM; > + goto exit_clkdisable_clk; > + } > + > + ir->rc->priv = ir; > + ir->rc->input_name = SUNXI_IR_DEV; > + ir->rc->input_phys = "sunxi-ir/input0"; > + ir->rc->input_id.bustype = BUS_HOST; > + ir->rc->input_id.vendor = 0x0001; > + ir->rc->input_id.product = 0x0001; > + ir->rc->input_id.version = 0x0100; > + ir->map_name = of_get_property(dn, "linux,rc-map-name", NULL); > + ir->rc->map_name = ir->map_name ?: RC_MAP_EMPTY; > + ir->rc->dev.parent = dev; > + ir->rc->driver_type = RC_DRIVER_IR_RAW; > + rc_set_allowed_protocols(ir->rc, RC_BIT_ALL); > + ir->rc->rx_resolution = SUNXI_IR_SAMPLE; > + ir->rc->timeout = MS_TO_NS(SUNXI_IR_TIMEOUT); > + ir->rc->driver_name = SUNXI_IR_DEV; > + > + ret = rc_register_device(ir->rc); > + if (ret) { > + dev_err(dev, "failed to register rc device\n"); > + ret = -EINVAL; > + goto exit_free_dev; > + } > + > + platform_set_drvdata(pdev, ir); > + > + /* Enable CIR Mode */ > + writel(0x3 << 4, ir->base+SUNXI_IR_CTL_REG); > + > + /* Config IR Sample Register */ > + /* Fsample = clk */ > + tmp = 0; > + /* Set Filter Threshold */ > + tmp |= (SUNXI_IR_RXFILT & 0x3f) << 2; > + /* Set Idle Threshold */ > + tmp |= (SUNXI_IR_RXIDLE & 0xff) << 8; > + writel(tmp, ir->base + SUNXI_IR_CIR_REG); > + > + /* Invert Input Signal */ > + writel(0x1 << 2, ir->base + SUNXI_IR_RXCTL_REG); > + > + /* Clear All Rx Interrupt Status */ > + writel(0xff, ir->base + SUNXI_IR_RXSTA_REG); > + > + /* Enable IRQ on data, overflow, packed end */ > + tmp = (0x1 << 4) | 0x3; > + > + /* Rx FIFO Threshold */ > + tmp |= (SUNXI_IR_FIFO_TRIG - 1) << 8; > + > + writel(tmp, ir->base + SUNXI_IR_RXINT_REG); > + > + /* Enable IR Module */ > + tmp = readl(ir->base + SUNXI_IR_CTL_REG); > + > + writel(tmp | 0x3, ir->base + SUNXI_IR_CTL_REG); We don't like magic numbers too much. Please add some #define for those. Thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v5 3/3] ARM: sunxi: Add IR controller support in DT on A20 [not found] ` <1398871010-30681-1-git-send-email-bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> 2014-04-30 15:16 ` [PATCH v5 1/3] ARM: sunxi: Add documentation for sunxi " Alexander Bersenev 2014-04-30 15:16 ` [PATCH v5 2/3] ARM: sunxi: Add driver for sunxi IR controller Alexander Bersenev @ 2014-04-30 15:16 ` Alexander Bersenev [not found] ` <1398871010-30681-4-git-send-email-bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> 2014-05-01 6:00 ` [PATCH v5 0/3] ARM: sunxi: Add support for consumer infrared devices Priit Laes 2014-05-08 13:55 ` Hans de Goede 4 siblings, 1 reply; 11+ messages in thread From: Alexander Bersenev @ 2014-04-30 15:16 UTC (permalink / raw) To: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, david-0WFrdVpeebksCylrc8G9yg, devicetree-u79uwXL29TY76Z2rM5mHXA, galak-sgV2jX0FEOL9JmXXK+q4OQ, grant.likely-QSEj5FYQhm4dnm+yROfE0A, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg, james.hogan-1AXoQHu6uovQT0dZR+AlfA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-lFZ/pmaqli7XmaaqVzeoHQ, m.chehab-Sze3O3UU22JBDgjK7y7TUQ, mark.rutland-5wv7dgnIgG8, maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8, pawel.moll-5wv7dgnIgG8, rdunlap-wEGCiKHe2LqWVfeAwA7xHQ, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, sean-hENCXIMQXOg, srinivas.kandagatla-qxv4g6HH51o, wingrime-3kdeTeqwOZ9EV1b7eY7vFQ, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-media-u79uwXL29TY76Z2rM5mHXA Cc: Alexander Bersenev This patch adds IR controller in A20 Device-Tree: - Two IR devices found in A20 user manual - Pins for two devices - One IR device physically found on Cubieboard 2 - One IR device physically found on Cubietruck Signed-off-by: Alexander Bersenev <bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> Signed-off-by: Alexsey Shestacov <wingrime-3kdeTeqwOZ9EV1b7eY7vFQ@public.gmane.org> --- arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 6 ++++++ arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 6 ++++++ arch/arm/boot/dts/sun7i-a20.dtsi | 31 +++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+) diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts index feeff64..2564e8c 100644 --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts @@ -164,6 +164,12 @@ reg = <1>; }; }; + + ir0: ir@01c21800 { + pinctrl-names = "default"; + pinctrl-0 = <&ir0_pins_a>; + status = "okay"; + }; }; leds { diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts index e288562..e375e89 100644 --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts +++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts @@ -232,6 +232,12 @@ reg = <1>; }; }; + + ir0: ir@01c21800 { + pinctrl-names = "default"; + pinctrl-0 = <&ir0_pins_a>; + status = "okay"; + }; }; leds { diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi index 0ae2b77..bb655a5 100644 --- a/arch/arm/boot/dts/sun7i-a20.dtsi +++ b/arch/arm/boot/dts/sun7i-a20.dtsi @@ -724,6 +724,19 @@ allwinner,drive = <2>; allwinner,pull = <0>; }; + + ir0_pins_a: ir0@0 { + allwinner,pins = "PB3","PB4"; + allwinner,function = "ir0"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + ir1_pins_a: ir1@0 { + allwinner,pins = "PB22","PB23"; + allwinner,function = "ir1"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; }; timer@01c20c00 { @@ -937,5 +950,23 @@ #interrupt-cells = <3>; interrupts = <1 9 0xf04>; }; + + ir0: ir@01c21800 { + compatible = "allwinner,sun7i-a20-ir"; + clocks = <&apb0_gates 6>, <&ir0_clk>; + clock-names = "apb", "ir"; + interrupts = <0 5 4>; + reg = <0x01c21800 0x40>; + status = "disabled"; + }; + + ir1: ir@01c21c00 { + compatible = "allwinner,sun7i-a20-ir"; + clocks = <&apb0_gates 7>, <&ir1_clk>; + clock-names = "apb", "ir"; + interrupts = <0 6 4>; + reg = <0x01C21c00 0x40>; + status = "disabled"; + }; }; }; -- 1.9.2 ^ permalink raw reply related [flat|nested] 11+ messages in thread
[parent not found: <1398871010-30681-4-git-send-email-bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org>]
* Re: [PATCH v5 3/3] ARM: sunxi: Add IR controller support in DT on A20 [not found] ` <1398871010-30681-4-git-send-email-bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> @ 2014-05-03 18:00 ` Maxime Ripard 0 siblings, 0 replies; 11+ messages in thread From: Maxime Ripard @ 2014-05-03 18:00 UTC (permalink / raw) To: Alexander Bersenev Cc: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, david-0WFrdVpeebksCylrc8G9yg, devicetree-u79uwXL29TY76Z2rM5mHXA, galak-sgV2jX0FEOL9JmXXK+q4OQ, grant.likely-QSEj5FYQhm4dnm+yROfE0A, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg, james.hogan-1AXoQHu6uovQT0dZR+AlfA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-lFZ/pmaqli7XmaaqVzeoHQ, m.chehab-Sze3O3UU22JBDgjK7y7TUQ, mark.rutland-5wv7dgnIgG8, pawel.moll-5wv7dgnIgG8, rdunlap-wEGCiKHe2LqWVfeAwA7xHQ, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, sean-hENCXIMQXOg, srinivas.kandagatla-qxv4g6HH51o, wingrime-3kdeTeqwOZ9EV1b7eY7vFQ, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-media-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 2947 bytes --] On Wed, Apr 30, 2014 at 09:16:50PM +0600, Alexander Bersenev wrote: > This patch adds IR controller in A20 Device-Tree: > - Two IR devices found in A20 user manual > - Pins for two devices > - One IR device physically found on Cubieboard 2 > - One IR device physically found on Cubietruck > > Signed-off-by: Alexander Bersenev <bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> > Signed-off-by: Alexsey Shestacov <wingrime-3kdeTeqwOZ9EV1b7eY7vFQ@public.gmane.org> > --- > arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 6 ++++++ > arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 6 ++++++ > arch/arm/boot/dts/sun7i-a20.dtsi | 31 +++++++++++++++++++++++++++++ > 3 files changed, 43 insertions(+) > > diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts > index feeff64..2564e8c 100644 > --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts > +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts > @@ -164,6 +164,12 @@ > reg = <1>; > }; > }; > + > + ir0: ir@01c21800 { > + pinctrl-names = "default"; > + pinctrl-0 = <&ir0_pins_a>; > + status = "okay"; > + }; > }; > > leds { > diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts > index e288562..e375e89 100644 > --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts > +++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts > @@ -232,6 +232,12 @@ > reg = <1>; > }; > }; > + > + ir0: ir@01c21800 { > + pinctrl-names = "default"; > + pinctrl-0 = <&ir0_pins_a>; > + status = "okay"; > + }; > }; > > leds { > diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi > index 0ae2b77..bb655a5 100644 > --- a/arch/arm/boot/dts/sun7i-a20.dtsi > +++ b/arch/arm/boot/dts/sun7i-a20.dtsi > @@ -724,6 +724,19 @@ > allwinner,drive = <2>; > allwinner,pull = <0>; > }; > + > + ir0_pins_a: ir0@0 { > + allwinner,pins = "PB3","PB4"; > + allwinner,function = "ir0"; > + allwinner,drive = <0>; > + allwinner,pull = <0>; > + }; > + ir1_pins_a: ir1@0 { > + allwinner,pins = "PB22","PB23"; > + allwinner,function = "ir1"; > + allwinner,drive = <0>; > + allwinner,pull = <0>; > + }; > }; > > timer@01c20c00 { > @@ -937,5 +950,23 @@ > #interrupt-cells = <3>; > interrupts = <1 9 0xf04>; > }; > + > + ir0: ir@01c21800 { This line... > + compatible = "allwinner,sun7i-a20-ir"; > + clocks = <&apb0_gates 6>, <&ir0_clk>; > + clock-names = "apb", "ir"; > + interrupts = <0 5 4>; > + reg = <0x01c21800 0x40>; > + status = "disabled"; > + }; > + > + ir1: ir@01c21c00 { ... and this one are indented a tab too far. Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v5 0/3] ARM: sunxi: Add support for consumer infrared devices [not found] ` <1398871010-30681-1-git-send-email-bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> ` (2 preceding siblings ...) 2014-04-30 15:16 ` [PATCH v5 3/3] ARM: sunxi: Add IR controller support in DT on A20 Alexander Bersenev @ 2014-05-01 6:00 ` Priit Laes 2014-05-08 13:55 ` Hans de Goede 4 siblings, 0 replies; 11+ messages in thread From: Priit Laes @ 2014-05-01 6:00 UTC (permalink / raw) To: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw Cc: david-0WFrdVpeebksCylrc8G9yg, devicetree-u79uwXL29TY76Z2rM5mHXA, galak-sgV2jX0FEOL9JmXXK+q4OQ, grant.likely-QSEj5FYQhm4dnm+yROfE0A, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg, james.hogan-1AXoQHu6uovQT0dZR+AlfA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-lFZ/pmaqli7XmaaqVzeoHQ, m.chehab-Sze3O3UU22JBDgjK7y7TUQ, mark.rutland-5wv7dgnIgG8, maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8, pawel.moll-5wv7dgnIgG8, rdunlap-wEGCiKHe2LqWVfeAwA7xHQ, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, sean-hENCXIMQXOg, srinivas.kandagatla-qxv4g6HH51o, wingrime-3kdeTeqwOZ9EV1b7eY7vFQ, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-media-u79uwXL29TY76Z2rM5mHXA, Alexander Bersenev Ühel kenal päeval, K, 30.04.2014 kell 21:16, kirjutas Alexander Bersenev: > This patch introduces Consumer IR(CIR) support for sunxi boards. > > This is based on Alexsey Shestacov's work based on the original driver > supplied by Allwinner. > > Signed-off-by: Alexander Bersenev <bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> > Signed-off-by: Alexsey Shestacov <wingrime-3kdeTeqwOZ9EV1b7eY7vFQ@public.gmane.org> > --- > Changes since version 1: > - Fix timer memory leaks > - Fix race condition when driver unloads while interrupt handler is active > - Support Cubieboard 2(need testing) > > Changes since version 2: > - More reliable keydown events > - Documentation fixes > - Rename registers accurding to A20 user manual > - Remove some includes, order includes alphabetically > - Use BIT macro > - Typo fixes > > Changes since version 3: > - Split the patch on smaller parts > - More documentation fixes > - Add clock-names in DT > - Use devm_clk_get function to get the clocks > - Removed gpios property from ir's DT > - Changed compatible from allwinner,sunxi-ir to allwinner,sun7i-a20-ir in DT > - Use spin_lock_irq instead spin_lock_irqsave in interrupt handler > - Add myself in the copyright ;) > - Coding style and indentation fixes > > Changes since version 4: > - Try to fix indentation errors by sending patches with git send-mail git am still complains due to mixed tabs-spaces used for indentation > Alexander Bersenev (3): > ARM: sunxi: Add documentation for sunxi consumer infrared devices Applying: ARM: sunxi: Add documentation for sunxi consumer infrared devices /usr/src/linux/.git/rebase-apply/patch:28: space before tab in indent. compatible = "allwinner,sun7i-a20-ir"; /usr/src/linux/.git/rebase-apply/patch:29: space before tab in indent. clocks = <&apb0_gates 6>, <&ir0_clk>; /usr/src/linux/.git/rebase-apply/patch:30: space before tab in indent. clock-names = "apb0_ir0", "ir0"; /usr/src/linux/.git/rebase-apply/patch:31: space before tab in indent. interrupts = <0 5 1>; /usr/src/linux/.git/rebase-apply/patch:32: space before tab in indent. reg = <0x01C21800 0x40>; > ARM: sunxi: Add driver for sunxi IR controller OK > ARM: sunxi: Add IR controller support in DT on A20 Applying: ARM: sunxi: Add IR controller support in DT on A20 /usr/src/linux/.git/rebase-apply/patch:70: space before tab in indent. ir0: ir@01c21800 { /usr/src/linux/.git/rebase-apply/patch:71: space before tab in indent. compatible = "allwinner,sun7i-a20-ir"; /usr/src/linux/.git/rebase-apply/patch:79: space before tab in indent. ir1: ir@01c21c00 { /usr/src/linux/.git/rebase-apply/patch:80: space before tab in indent. compatible = "allwinner,sun7i-a20-ir"; -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v5 0/3] ARM: sunxi: Add support for consumer infrared devices [not found] ` <1398871010-30681-1-git-send-email-bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> ` (3 preceding siblings ...) 2014-05-01 6:00 ` [PATCH v5 0/3] ARM: sunxi: Add support for consumer infrared devices Priit Laes @ 2014-05-08 13:55 ` Hans de Goede [not found] ` <536B8CDD.7040600-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 4 siblings, 1 reply; 11+ messages in thread From: Hans de Goede @ 2014-05-08 13:55 UTC (permalink / raw) To: Alexander Bersenev, linux-sunxi, david-0WFrdVpeebksCylrc8G9yg, devicetree-u79uwXL29TY76Z2rM5mHXA, galak-sgV2jX0FEOL9JmXXK+q4OQ, grant.likely-QSEj5FYQhm4dnm+yROfE0A, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg, james.hogan-1AXoQHu6uovQT0dZR+AlfA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-lFZ/pmaqli7XmaaqVzeoHQ, m.chehab-Sze3O3UU22JBDgjK7y7TUQ, mark.rutland-5wv7dgnIgG8, maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8, pawel.moll-5wv7dgnIgG8, rdunlap-wEGCiKHe2LqWVfeAwA7xHQ, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, sean-hENCXIMQXOg, srinivas.kandagatla-qxv4g6HH51o, wingrime-3kdeTeqwOZ9EV1b7eY7vFQ, linux-doc-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-media-u79uwXL29TY76Z2rM5mHXA Hi, On 04/30/2014 05:16 PM, Alexander Bersenev wrote: > This patch introduces Consumer IR(CIR) support for sunxi boards. > > This is based on Alexsey Shestacov's work based on the original driver > supplied by Allwinner. > > Signed-off-by: Alexander Bersenev <bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> > Signed-off-by: Alexsey Shestacov <wingrime-3kdeTeqwOZ9EV1b7eY7vFQ@public.gmane.org> Alexander, v5 still has various issues which need fixing, do you plan to do a v6 soon ? Regards, Hans > > --- > Changes since version 1: > - Fix timer memory leaks > - Fix race condition when driver unloads while interrupt handler is active > - Support Cubieboard 2(need testing) > > Changes since version 2: > - More reliable keydown events > - Documentation fixes > - Rename registers accurding to A20 user manual > - Remove some includes, order includes alphabetically > - Use BIT macro > - Typo fixes > > Changes since version 3: > - Split the patch on smaller parts > - More documentation fixes > - Add clock-names in DT > - Use devm_clk_get function to get the clocks > - Removed gpios property from ir's DT > - Changed compatible from allwinner,sunxi-ir to allwinner,sun7i-a20-ir in DT > - Use spin_lock_irq instead spin_lock_irqsave in interrupt handler > - Add myself in the copyright ;) > - Coding style and indentation fixes > > Changes since version 4: > - Try to fix indentation errors by sending patches with git send-mail > > Alexander Bersenev (3): > ARM: sunxi: Add documentation for sunxi consumer infrared devices > ARM: sunxi: Add driver for sunxi IR controller > ARM: sunxi: Add IR controller support in DT on A20 > > .../devicetree/bindings/media/sunxi-ir.txt | 23 ++ > arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 6 + > arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 6 + > arch/arm/boot/dts/sun7i-a20.dtsi | 31 +++ > drivers/media/rc/Kconfig | 10 + > drivers/media/rc/Makefile | 1 + > drivers/media/rc/sunxi-ir.c | 303 +++++++++++++++++++++ > 7 files changed, 380 insertions(+) > create mode 100644 Documentation/devicetree/bindings/media/sunxi-ir.txt > create mode 100644 drivers/media/rc/sunxi-ir.c > ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <536B8CDD.7040600-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH v5 0/3] ARM: sunxi: Add support for consumer infrared devices [not found] ` <536B8CDD.7040600-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2014-05-09 13:21 ` Alexander Bersenev [not found] ` <E54FF549-B53A-406B-9871-E2C3B1ED8157-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> 0 siblings, 1 reply; 11+ messages in thread From: Alexander Bersenev @ 2014-05-09 13:21 UTC (permalink / raw) To: Hans de Goede Cc: linux-sunxi, david-0WFrdVpeebksCylrc8G9yg@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org, grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org, james.hogan-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org, m.chehab-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org, mark.rutland-5wv7dgnIgG8@public.gmane.org, maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org, pawel.moll-5wv7dgnIgG8@public.gmane.org, rdunlap-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org, robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, sean-hENCXIMQXOg@public.gmane.org, srinivas.kandagatla-qxv4g6HH51o@public.gmane.org Hello, I am in Austria/Germany in 1-11 may. I plan to make v6 after returning back to Russia. Best, Alexander Bersenev > 08 мая 2014 г., в 15:55, Hans de Goede <hdegoede@redhat.com> написал(а): > > Hi, > >> On 04/30/2014 05:16 PM, Alexander Bersenev wrote: >> This patch introduces Consumer IR(CIR) support for sunxi boards. >> >> This is based on Alexsey Shestacov's work based on the original driver >> supplied by Allwinner. >> >> Signed-off-by: Alexander Bersenev <bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> >> Signed-off-by: Alexsey Shestacov <wingrime-3kdeTeqwOZ9EV1b7eY7vFQ@public.gmane.org> > > Alexander, v5 still has various issues which need fixing, > do you plan to do a v6 soon ? > > Regards, > > Hans > >> >> --- >> Changes since version 1: >> - Fix timer memory leaks >> - Fix race condition when driver unloads while interrupt handler is active >> - Support Cubieboard 2(need testing) >> >> Changes since version 2: >> - More reliable keydown events >> - Documentation fixes >> - Rename registers accurding to A20 user manual >> - Remove some includes, order includes alphabetically >> - Use BIT macro >> - Typo fixes >> >> Changes since version 3: >> - Split the patch on smaller parts >> - More documentation fixes >> - Add clock-names in DT >> - Use devm_clk_get function to get the clocks >> - Removed gpios property from ir's DT >> - Changed compatible from allwinner,sunxi-ir to allwinner,sun7i-a20-ir in DT >> - Use spin_lock_irq instead spin_lock_irqsave in interrupt handler >> - Add myself in the copyright ;) >> - Coding style and indentation fixes >> >> Changes since version 4: >> - Try to fix indentation errors by sending patches with git send-mail >> >> Alexander Bersenev (3): >> ARM: sunxi: Add documentation for sunxi consumer infrared devices >> ARM: sunxi: Add driver for sunxi IR controller >> ARM: sunxi: Add IR controller support in DT on A20 >> >> .../devicetree/bindings/media/sunxi-ir.txt | 23 ++ >> arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 6 + >> arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 6 + >> arch/arm/boot/dts/sun7i-a20.dtsi | 31 +++ >> drivers/media/rc/Kconfig | 10 + >> drivers/media/rc/Makefile | 1 + >> drivers/media/rc/sunxi-ir.c | 303 +++++++++++++++++++++ >> 7 files changed, 380 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/media/sunxi-ir.txt >> create mode 100644 drivers/media/rc/sunxi-ir.c >> -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <E54FF549-B53A-406B-9871-E2C3B1ED8157-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org>]
* Re: [PATCH v5 0/3] ARM: sunxi: Add support for consumer infrared devices [not found] ` <E54FF549-B53A-406B-9871-E2C3B1ED8157-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> @ 2014-05-09 13:26 ` Hans de Goede 0 siblings, 0 replies; 11+ messages in thread From: Hans de Goede @ 2014-05-09 13:26 UTC (permalink / raw) To: Alexander Bersenev Cc: linux-sunxi, david-0WFrdVpeebksCylrc8G9yg@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org, grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org, james.hogan-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org, m.chehab-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org, mark.rutland-5wv7dgnIgG8@public.gmane.org, maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org, pawel.moll-5wv7dgnIgG8@public.gmane.org, rdunlap-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org, robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org Hi, On 05/09/2014 03:21 PM, Alexander Bersenev wrote: > Hello, I am in Austria/Germany in 1-11 may. I plan to make v6 after returning back to Russia. Ok, when you do please also pick up this fix: https://github.com/jwrdegoede/linux-sunxi/commit/180a3e59361ceddeed26543529ca757cc8112fb0 Which fixes an oops at startup. Other then needing that fix + coding style fixes it works well for me on the cubietruck. I'll try to also test it on sun4i and sun5i if I can find some time to do so. Regards, Hans > > Best, > Alexander Bersenev > >> 08 мая 2014 г., в 15:55, Hans de Goede <hdegoede@redhat.com> написал(а): >> >> Hi, >> >>> On 04/30/2014 05:16 PM, Alexander Bersenev wrote: >>> This patch introduces Consumer IR(CIR) support for sunxi boards. >>> >>> This is based on Alexsey Shestacov's work based on the original driver >>> supplied by Allwinner. >>> >>> Signed-off-by: Alexander Bersenev <bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> >>> Signed-off-by: Alexsey Shestacov <wingrime-3kdeTeqwOZ9EV1b7eY7vFQ@public.gmane.org> >> >> Alexander, v5 still has various issues which need fixing, >> do you plan to do a v6 soon ? >> >> Regards, >> >> Hans >> >>> >>> --- >>> Changes since version 1: >>> - Fix timer memory leaks >>> - Fix race condition when driver unloads while interrupt handler is active >>> - Support Cubieboard 2(need testing) >>> >>> Changes since version 2: >>> - More reliable keydown events >>> - Documentation fixes >>> - Rename registers accurding to A20 user manual >>> - Remove some includes, order includes alphabetically >>> - Use BIT macro >>> - Typo fixes >>> >>> Changes since version 3: >>> - Split the patch on smaller parts >>> - More documentation fixes >>> - Add clock-names in DT >>> - Use devm_clk_get function to get the clocks >>> - Removed gpios property from ir's DT >>> - Changed compatible from allwinner,sunxi-ir to allwinner,sun7i-a20-ir in DT >>> - Use spin_lock_irq instead spin_lock_irqsave in interrupt handler >>> - Add myself in the copyright ;) >>> - Coding style and indentation fixes >>> >>> Changes since version 4: >>> - Try to fix indentation errors by sending patches with git send-mail >>> >>> Alexander Bersenev (3): >>> ARM: sunxi: Add documentation for sunxi consumer infrared devices >>> ARM: sunxi: Add driver for sunxi IR controller >>> ARM: sunxi: Add IR controller support in DT on A20 >>> >>> .../devicetree/bindings/media/sunxi-ir.txt | 23 ++ >>> arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 6 + >>> arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 6 + >>> arch/arm/boot/dts/sun7i-a20.dtsi | 31 +++ >>> drivers/media/rc/Kconfig | 10 + >>> drivers/media/rc/Makefile | 1 + >>> drivers/media/rc/sunxi-ir.c | 303 +++++++++++++++++++++ >>> 7 files changed, 380 insertions(+) >>> create mode 100644 Documentation/devicetree/bindings/media/sunxi-ir.txt >>> create mode 100644 drivers/media/rc/sunxi-ir.c >>> -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2014-05-09 13:26 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-04-30 15:16 [PATCH v5 0/3] ARM: sunxi: Add support for consumer infrared devices Alexander Bersenev [not found] ` <1398871010-30681-1-git-send-email-bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> 2014-04-30 15:16 ` [PATCH v5 1/3] ARM: sunxi: Add documentation for sunxi " Alexander Bersenev [not found] ` <1398871010-30681-2-git-send-email-bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> 2014-05-03 17:45 ` Maxime Ripard 2014-04-30 15:16 ` [PATCH v5 2/3] ARM: sunxi: Add driver for sunxi IR controller Alexander Bersenev [not found] ` <1398871010-30681-3-git-send-email-bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> 2014-05-03 17:53 ` Maxime Ripard 2014-04-30 15:16 ` [PATCH v5 3/3] ARM: sunxi: Add IR controller support in DT on A20 Alexander Bersenev [not found] ` <1398871010-30681-4-git-send-email-bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> 2014-05-03 18:00 ` Maxime Ripard 2014-05-01 6:00 ` [PATCH v5 0/3] ARM: sunxi: Add support for consumer infrared devices Priit Laes 2014-05-08 13:55 ` Hans de Goede [not found] ` <536B8CDD.7040600-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2014-05-09 13:21 ` Alexander Bersenev [not found] ` <E54FF549-B53A-406B-9871-E2C3B1ED8157-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org> 2014-05-09 13:26 ` Hans de Goede
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).