aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/ir-hix5hd2.c
AgeCommit message (Collapse)Author
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 422Thomas Gleixner
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms and conditions of the gnu general public license version 2 as published by the free software foundation extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 101 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190531190113.822954939@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-04media: rc: Remove init_ir_raw_event and DEFINE_IR_RAW_EVENT macrosSean Young
This can be done with c99 initializers, which makes the code cleaner and more transparent. It does require gcc 4.6, because of this bug in earlier versions: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676 Since commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6"), this is the case. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-02-14media: rc: ir-hix5hd2: fix error handling of clk_prepare_enable()Alexey Khoroshilov
Return code of clk_prepare_enable() is ignored in many places. The patch adds error handling for all of them. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: rc: rename RC_TYPE_* to RC_PROTO_* and RC_BIT_* to RC_PROTO_BIT_*Sean Young
RC_TYPE is confusing and it's just the protocol. So rename it. Suggested-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Sean Young <sean@mess.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: rc-core: rename input_name to device_nameSean Young
When an ir-spi is registered, you get this message. rc rc0: Unspecified device as /devices/platform/soc/3f215080.spi/spi_master/spi32766/spi32766.128/rc/rc0 "Unspecified device" refers to input_name, which makes no sense for IR TX only devices. So, rename to device_name. Also make driver_name const char* so that no casts are needed anywhere. Now ir-spi reports: rc rc0: IR SPI as /devices/platform/soc/3f215080.spi/spi_master/spi32766/spi32766.128/rc/rc0 Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-01-30[media] rc-main: assign driver type during allocationAndi Shyti
The driver type can be assigned immediately when an RC device requests to the framework to allocate the device. This is an 'enum rc_driver_type' data type and specifies whether the device is a raw receiver or scancode receiver. The type will be given as parameter to the rc_allocate_device device. Change accordingly all the drivers calling rc_allocate_device() so that the device type is specified during the rc device allocation. Whenever the device type is not specified, it will be set as RC_DRIVER_SCANCODE which was the default '0' value. Suggested-by: Sean Young <sean@mess.org> Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-01-30[media] rc: raw IR drivers cannot handle cec, unknown or otherSean Young
unknown and other are for IR protocols for which we have no decoder, so the raw IR drivers have no chance of generating them. cec is not an IR protocol. Signed-off-by: Sean Young <sean@mess.org> Cc: Jiri Kosina <jikos@kernel.org> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com> Cc: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-22[media] ir-hix5hd2: make hisilicon,power-syscon property deprecatedRuqiang Ju
The clock of IR can be provided by the clock provider and controlled by common clock framework APIs. Signed-off-by: Ruqiang Ju <juruqiang@huawei.com> Signed-off-by: Jiancheng Xue <xuejiancheng@hisilicon.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2015-10-22[media] ir-hix5hd2: drop the use of IRQF_NO_SUSPENDSudeep Holla
This driver doesn't claim the IR transmitter to be wakeup source. It even disables the clock and the IR during suspend-resume cycle. This patch removes yet another misuse of IRQF_NO_SUSPEND. Cc: Patrice Chotard <patrice.chotard@st.com> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Guoxiong Yan <yanguoxiong@huawei.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Acked-by: Zhangfei Gao <zhangfei.gao@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] ir-hix5hd2: Fix build warningFabio Estevam
Building for avr32 leads the following build warning: drivers/media/rc/ir-hix5hd2.c:221: warning: passing argument 1 of 'IS_ERR' discards qualifiers from pointer target type drivers/media/rc/ir-hix5hd2.c:222: warning: passing argument 1 of 'PTR_ERR' discards qualifiers from pointer target type devm_ioremap_resource() returns void __iomem *, so change 'base' definition accordingly. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-12[media] constify of_device_id arrayFabian Frederick
of_device_id is always used as const. (See driver.of_match_table and open firmware functions) [mchehab@osg.samsung.com: fix a merge conflict at adv7604.c] Signed-off-by: Fabian Frederick <fabf@skynet.be> Acked-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-11[media] ir-hix5hd2: remove writel/readl_relaxed defineZhangfei Gao
Commit 9439eb3ab9d1ec ("asm-generic: io: implement relaxed accessor macros as conditional wrappers") has added {read,write}{b,w,l,q}_relaxed to include/asm-generic/io.h Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03[media] ir-hix5hd2 fix build warningZhangfei Gao
Change CONFIG_PM to CONFIG_PM_SLEEP to solve warning: 'hix5hd2_ir_suspend' & 'hix5hd2_ir_resume' defined but not used Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-09[media] ir-hix5hd2: fix build on c6x archMauro Carvalho Chehab
While not all archs have readl_relaxed, we need to add a hack at the driver to allow it to COMPILE_TEST on all archs: drivers/media/rc/ir-hix5hd2.c: In function ‘hix5hd2_ir_config’: drivers/media/rc/ir-hix5hd2.c:100:2: error: implicit declaration of function ‘readl_relaxed’ [-Werror=implicit-function-declaration] Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26[media] ir-hix5hd2: fix address space castingMauro Carvalho Chehab
drivers/media/rc/ir-hix5hd2.c:99:41: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/ir-hix5hd2.c:99:41: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:99:41: got void * drivers/media/rc/ir-hix5hd2.c:100:16: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/ir-hix5hd2.c:100:16: expected void const volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:100:16: got void * drivers/media/rc/ir-hix5hd2.c:117:40: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/ir-hix5hd2.c:117:40: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:117:40: got void * drivers/media/rc/ir-hix5hd2.c:119:41: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/ir-hix5hd2.c:119:41: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:119:41: got void * drivers/media/rc/ir-hix5hd2.c:121:41: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/ir-hix5hd2.c:121:41: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:121:41: got void * drivers/media/rc/ir-hix5hd2.c:147:18: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/ir-hix5hd2.c:147:18: expected void const volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:147:18: got void * drivers/media/rc/ir-hix5hd2.c:155:28: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/ir-hix5hd2.c:155:28: expected void const volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:155:28: got void * drivers/media/rc/ir-hix5hd2.c:157:25: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/ir-hix5hd2.c:157:25: expected void const volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:157:25: got void * drivers/media/rc/ir-hix5hd2.c:159:61: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/ir-hix5hd2.c:159:61: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:159:61: got void * drivers/media/rc/ir-hix5hd2.c:167:28: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/ir-hix5hd2.c:167:28: expected void const volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:167:28: got void * drivers/media/rc/ir-hix5hd2.c:169:36: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/ir-hix5hd2.c:169:36: expected void const volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:169:36: got void * drivers/media/rc/ir-hix5hd2.c:188:64: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/ir-hix5hd2.c:188:64: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:188:64: got void * drivers/media/rc/ir-hix5hd2.c:190:68: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/ir-hix5hd2.c:190:68: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:190:68: got void * drivers/media/rc/ir-hix5hd2.c:220:20: warning: incorrect type in assignment (different address spaces) drivers/media/rc/ir-hix5hd2.c:220:20: expected void *base drivers/media/rc/ir-hix5hd2.c:220:20: got void [noderef] <asn:2>* drivers/media/rc/ir-hix5hd2.c:315:41: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/ir-hix5hd2.c:315:41: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:315:41: got void * drivers/media/rc/ir-hix5hd2.c:316:41: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/ir-hix5hd2.c:316:41: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:316:41: got void * drivers/media/rc/ir-hix5hd2.c:317:41: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/ir-hix5hd2.c:317:41: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:317:41: got void * drivers/media/rc/ir-hix5hd2.c:318:41: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/ir-hix5hd2.c:318:41: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:318:41: got void * Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] rc: Introduce hix5hd2 IR transmitter driverGuoxiong Yan
IR transmitter driver for Hisilicon hix5hd2 soc By default all protocols are disabled. For example nec decoder can be enabled by either 1. ir-keytable -p nec 2. echo nec > /sys/class/rc/rc0/protocols See see Documentation/ABI/testing/sysfs-class-rc [mchehab@osg.samsung.com: Add a fixup for the driver to compile on archs that don't provide writel_relaxed() macro] Signed-off-by: Guoxiong Yan <yanguoxiong@huawei.com> Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>