History log of /linux-master/drivers/media/rc/st_rc.c
Revision Date Author Comments
# 41d64f00 26-Mar-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

media: st_rc: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>


# 950170d6 15-Jan-2022 Sean Young <sean@mess.org>

media: rc-core: rename ir_raw_event_reset to ir_raw_event_overflow

The driver report a reset event when the hardware reports and overflow.
There is no reason to have a generic "reset" event.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>


# 044a3571 31-Aug-2021 Cai Huoqing <caihuoqing@baidu.com>

media: rc: st_rc: Make use of the helper function devm_platform_ioremap_resource()

Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


# 04297b00 01-Jun-2021 Evgeny Novikov <novikov@ispras.ru>

media: st_rc: Handle errors of clk_prepare_enable()

Hadle errors of clk_prepare_enable() in st_rc_hardware_init() and its
callers.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Evgeny Novikov <novikov@ispras.ru>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


# 528222d8 23-Aug-2020 Sean Young <sean@mess.org>

media: rc: harmonize infrared durations to microseconds

rc-core kapi uses nanoseconds for infrared durations for receiving, and
microseconds for sending. The uapi already uses microseconds for both,
so this patch does not change the uapi.

Infrared durations do not need nanosecond resolution. IR protocols do not
have durations shorter than about 100 microseconds. Some IR hardware offers
250 microseconds resolution, which is sufficient for most protocols.
Better hardware has 50 microsecond resolution and is enough for every
protocol I am aware off.

Unify on microseconds everywhere. This simplifies the code since less
conversion between microseconds and nanoseconds needs to be done.

This affects:
- rx_resolution member of struct rc_dev
- timeout member of struct rc_dev
- duration member in struct ir_raw_event

Cc: "Bruno Prémont" <bonbons@linux-vserver.org>
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Patrick Lerda <patrick9876@free.fr>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Jerome Brunet <jbrunet@baylibre.com>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Sean Wang <sean.wang@mediatek.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: "David Härdeman" <david@hardeman.nu>
Cc: Benjamin Valentin <benpicco@googlemail.com>
Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


# 2874c5fd 27-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152

Based on 1 normalized pattern(s):

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

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 3029 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/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 183e19f5 21-Aug-2018 Sean Young <sean@mess.org>

media: rc: Remove init_ir_raw_event and DEFINE_IR_RAW_EVENT macros

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>


# ee2d243d 12-Apr-2018 Mauro Carvalho Chehab <mchehab@kernel.org>

media: st_rc: Don't stay on an IRQ handler forever

As warned by smatch:
drivers/media/rc/st_rc.c:110 st_rc_rx_interrupt() warn: this loop depends on readl() succeeding

If something goes wrong at readl(), the logic will stay there
inside an IRQ code forever. This is not the nicest thing to
do :-)

So, add a timeout there, preventing staying inside the IRQ
for more than 10ms.

Acked-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>


# cba862dc 29-Nov-2017 Mauro Carvalho Chehab <mchehab@kernel.org>

media: drivers: remove "/**" from non-kernel-doc comments

Several comments are wrongly tagged as kernel-doc, causing
those warnings:

drivers/media/rc/st_rc.c:98: warning: No description found for parameter 'irq'
drivers/media/rc/st_rc.c:98: warning: No description found for parameter 'data'
drivers/media/pci/solo6x10/solo6x10-enc.c:183: warning: No description found for parameter 'solo_dev'
drivers/media/pci/solo6x10/solo6x10-enc.c:183: warning: No description found for parameter 'ch'
drivers/media/pci/solo6x10/solo6x10-enc.c:183: warning: No description found for parameter 'qp'
drivers/media/usb/pwc/pwc-dec23.c:652: warning: Cannot understand *
on line 652 - I thought it was a doc line
drivers/media/usb/dvb-usb/cinergyT2-fe.c:40: warning: No description found for parameter 'op'
drivers/media/usb/dvb-usb/friio-fe.c:301: warning: Cannot understand * (reg, val) commad list to initialize this module.
on line 301 - I thought it was a doc line
drivers/media/rc/streamzap.c:201: warning: No description found for parameter 'urb'
drivers/media/rc/streamzap.c:333: warning: No description found for parameter 'intf'
drivers/media/rc/streamzap.c:333: warning: No description found for parameter 'id'
drivers/media/rc/streamzap.c:464: warning: No description found for parameter 'interface'
drivers/media/i2c/ov5647.c:432: warning: Cannot understand * @short Subdev core operations registration
on line 432 - I thought it was a doc line
drivers/media/usb/dvb-usb/friio.c:35: warning: No description found for parameter 'd'
drivers/media/usb/dvb-usb/friio.c:35: warning: No description found for parameter 'addr'
drivers/media/usb/dvb-usb/friio.c:35: warning: No description found for parameter 'wbuf'
drivers/media/usb/dvb-usb/friio.c:35: warning: No description found for parameter 'wlen'
drivers/media/usb/dvb-usb/friio.c:35: warning: No description found for parameter 'rbuf'
drivers/media/usb/dvb-usb/friio.c:35: warning: No description found for parameter 'rlen'
drivers/media/platform/vim2m.c:350: warning: No description found for parameter 'priv'
drivers/media/dvb-frontends/tua6100.c:34: warning: cannot understand function prototype: 'struct tua6100_priv '
drivers/media/platform/sti/hva/hva-h264.c:140: warning: cannot understand function prototype: 'struct hva_h264_stereo_video_sei '
drivers/media/platform/sti/hva/hva-h264.c:150: warning: Cannot understand * @frame_width: width in pixels of the buffer containing the input frame
on line 150 - I thought it was a doc line
drivers/media/platform/sti/hva/hva-h264.c:356: warning: Cannot understand * @ slice_size: slice size
on line 356 - I thought it was a doc line
drivers/media/platform/sti/hva/hva-h264.c:369: warning: Cannot understand * @ bitstream_size: bitstream size
on line 369 - I thought it was a doc line
drivers/media/platform/sti/hva/hva-h264.c:395: warning: Cannot understand * @seq_info: sequence information buffer
on line 395 - I thought it was a doc line
drivers/media/dvb-frontends/sp887x.c:137: warning: No description found for parameter 'fe'
drivers/media/dvb-frontends/sp887x.c:137: warning: No description found for parameter 'fw'
drivers/media/dvb-frontends/sp887x.c:287: warning: No description found for parameter 'n'
drivers/media/dvb-frontends/sp887x.c:287: warning: No description found for parameter 'd'
drivers/media/dvb-frontends/sp887x.c:287: warning: No description found for parameter 'quotient_i'
drivers/media/dvb-frontends/sp887x.c:287: warning: No description found for parameter 'quotient_f'
drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c:83: warning: cannot understand function prototype: 'struct ttusb '
drivers/media/platform/sh_veu.c:277: warning: No description found for parameter 'priv'
drivers/media/dvb-frontends/zl10036.c:33: warning: cannot understand function prototype: 'int zl10036_debug; '
drivers/media/dvb-frontends/zl10036.c:179: warning: No description found for parameter 'state'
drivers/media/dvb-frontends/zl10036.c:179: warning: No description found for parameter 'frequency'
drivers/media/platform/rcar_fdp1.c:1139: warning: No description found for parameter 'priv'
drivers/media/platform/ti-vpe/vpe.c:933: warning: No description found for parameter 'priv'
drivers/media/usb/gspca/ov519.c:36: warning: No description found for parameter 'fmt'
drivers/media/usb/dvb-usb/dib0700_devices.c:3367: warning: No description found for parameter 'adap'

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>


# 6d741bfe 07-Aug-2017 Sean Young <sean@mess.org>

media: rc: rename RC_TYPE_* to RC_PROTO_* and RC_BIT_* to RC_PROTO_BIT_*

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>


# a4b80242 19-Jul-2017 Philipp Zabel <p.zabel@pengutronix.de>

media: st-rc: explicitly request exclusive reset control

Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>


# 518f4b26 30-Jun-2017 Sean Young <sean@mess.org>

media: rc-core: rename input_name to device_name

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>


# ec6b0bd5 15-Mar-2017 Philipp Zabel <p.zabel@pengutronix.de>

[media] st_rc: simplify optional reset handling

As of commit bb475230b8e5 ("reset: make optional functions really
optional"), the reset framework API calls use NULL pointers to describe
optional, non-present reset controls.

This allows to return errors from reset_control_get_optional and to call
reset_control_(de)assert unconditionally.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>


# 7dc2df14 09-Feb-2017 Sean Young <sean@mess.org>

[media] rc: lirc keymap no longer makes any sense

The lirc keymap existed once upon a time to select the lirc protocol.
Since '275ddb4 [media] rc-core: remove the LIRC "protocol"', IR is
always passed to the lirc decoder so this keymap is no longer needed.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>


# 0f7499fd 16-Dec-2016 Andi Shyti <andi@etezian.org>

[media] rc-main: assign driver type during allocation

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>


# 8c34b5c4 03-Dec-2016 Sean Young <sean@mess.org>

[media] rc: raw IR drivers cannot handle cec, unknown or other

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>


# a2d1e1ed 20-Sep-2015 Sudeep Holla <sudeep.holla@arm.com>

[media] media: st-rc: remove misuse of IRQF_NO_SUSPEND flag

The device is set as wakeup capable using proper wakeup API but the
driver misuses IRQF_NO_SUSPEND to set the interrupt as wakeup source
which is incorrect.

This patch removes the use of IRQF_NO_SUSPEND flags replacing it with
enable_irq_wake instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@gmail.com>
Cc: Maxime Coquelin <maxime.coquelin@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: kernel@stlinux.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>


# 846793b3 22-Jun-2015 Mauro Carvalho Chehab <mchehab@kernel.org>

[media] use CONFIG_PM_SLEEP for suspend/resume

Using CONFIG_PM_SLEEP suppress the warnings when the driver is
compiled without PM sleep functions:

drivers/media/rc/st_rc.c:338:12: warning: ‘st_rc_suspend’ defined but not used [-Wunused-function]
drivers/media/rc/st_rc.c:359:12: warning: ‘st_rc_resume’ defined but not used [-Wunused-function]

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Maxime Coquelin <maxime.coquelin@st.com>


# 2235cf63 14-Apr-2015 Fabio Estevam <fabio.estevam@freescale.com>

[media] st_rc: fix build warning

Building for avr32 leads the following build warning:

drivers/media/rc/st_rc.c:270: warning: passing argument 1 of 'IS_ERR' discards qualifiers from pointer target type
drivers/media/rc/st_rc.c:271: warning: passing argument 1 of 'PTR_ERR' discards qualifiers from pointer target type

devm_ioremap_resource() returns void __iomem *, so change 'base' and
'rx_base' definitions 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>


# 7f099a75 16-Mar-2015 Fabian Frederick <fabf@skynet.be>

[media] constify of_device_id array

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>


# 8f8218e8 24-Sep-2014 Mauro Carvalho Chehab <mchehab@kernel.org>

[media] st_rc: fix address space casting

drivers/media/rc/st_rc.c:107:38: warning: incorrect type in argument 1 (different address spaces)
drivers/media/rc/st_rc.c:107:38: expected void const volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:107:38: got void *
drivers/media/rc/st_rc.c:110:53: warning: incorrect type in argument 1 (different address spaces)
drivers/media/rc/st_rc.c:110:53: expected void const volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:110:53: got void *
drivers/media/rc/st_rc.c:116:54: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:116:54: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:116:54: got void *
drivers/media/rc/st_rc.c:120:45: warning: incorrect type in argument 1 (different address spaces)
drivers/media/rc/st_rc.c:120:45: expected void const volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:120:45: got void *
drivers/media/rc/st_rc.c:121:43: warning: incorrect type in argument 1 (different address spaces)
drivers/media/rc/st_rc.c:121:43: expected void const volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:121:43: got void *
drivers/media/rc/st_rc.c:150:46: warning: incorrect type in argument 1 (different address spaces)
drivers/media/rc/st_rc.c:150:46: expected void const volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:150:46: got void *
drivers/media/rc/st_rc.c:153:42: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:153:42: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:153:42: got void *
drivers/media/rc/st_rc.c:174:32: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:174:32: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:174:32: got void *
drivers/media/rc/st_rc.c:177:48: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:177:48: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:177:48: got void *
drivers/media/rc/st_rc.c:187:48: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:187:48: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:187:48: got void *
drivers/media/rc/st_rc.c:204:42: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:204:42: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:204:42: got void *
drivers/media/rc/st_rc.c:205:35: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:205:35: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:205:35: got void *
drivers/media/rc/st_rc.c:215:35: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:215:35: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:215:35: got void *
drivers/media/rc/st_rc.c:216:35: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:216:35: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:216:35: got void *
drivers/media/rc/st_rc.c:269:22: warning: incorrect type in assignment (different address spaces)
drivers/media/rc/st_rc.c:269:22: expected void *base
drivers/media/rc/st_rc.c:269:22: got void [noderef] <asn:2>*
drivers/media/rc/st_rc.c:349:46: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:349:46: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:349:46: got void *
drivers/media/rc/st_rc.c:350:46: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:350:46: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:350:46: got void *
drivers/media/rc/st_rc.c:371:61: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:371:61: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:371:61: got void *
drivers/media/rc/st_rc.c:372:54: warning: incorrect type in argument 2 (different address spaces)
drivers/media/rc/st_rc.c:372:54: expected void volatile [noderef] <asn:2>*addr
drivers/media/rc/st_rc.c:372:54: got void *

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>


# da8e77f5 22-Sep-2014 Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

[media] media: st-rc: Remove .owner field for driver

There is no need to init .owner field.

Based on the patch from Peter Griffin <peter.griffin@linaro.org>
"mmc: remove .owner field for drivers using module_platform_driver"

This patch removes the superflous .owner field for drivers which
use the module_platform_driver API, as this is overriden in
platform_driver_register anyway."

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Maxime Coquelin <maxime.coquelin@st.com>
Acked-by: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>


# cdd9a631 22-Sep-2014 Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

[media] media: st-rc: move pm ops setup out of conditional compilation

This patch moves setting of pm_ops out of the CONFIG_PM_SLEEP condition.
Setting pm ops under CONFIG_PM_SLEEP does not make any sense.
This patch also remove unnecessary also remove CONFIG_PM condition for pm
member in st_rc_driver structure.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Maxime Coquelin <maxime.coquelin@st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>


# 89d7ce5a 22-Sep-2014 Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

[media] media: st-rc: move to using reset_control_get_optional

This patch fixes a compilation error while building with the
random kernel configuration.

drivers/media/rc/st_rc.c: In function 'st_rc_probe':
drivers/media/rc/st_rc.c:281:2: error: implicit declaration of
function 'reset_control_get' [-Werror=implicit-function-declaration]
rc_dev->rstc = reset_control_get(dev, NULL);

drivers/media/rc/st_rc.c:281:15: warning: assignment makes pointer
from integer without a cast [enabled by default]
rc_dev->rstc = reset_control_get(dev, NULL);

Reported-by: Jim Davis <jim.epost@gmail.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Maxime Coquelin <maxime.coquelin@st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>


# c5540fbb 03-Apr-2014 David Härdeman <david@hardeman.nu>

[media] rc-core: remove protocol arrays

The basic API of rc-core used to be:

dev = rc_allocate_device();
dev->x = a;
dev->y = b;
dev->z = c;
rc_register_device();

which is a pretty common pattern in the kernel, after the introduction of
protocol arrays the API looks something like:

dev = rc_allocate_device();
dev->x = a;
rc_set_allowed_protocols(dev, RC_BIT_X);
dev->z = c;
rc_register_device();

There's no real need for the protocols to be an array, so change it
back to be consistent (and in preparation for the following patches).

[m.chehab@samsung.com: added missing changes at some files]
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>


# 1a1934fa 28-Feb-2014 James Hogan <jhogan@kernel.org>

[media] rc: abstract access to allowed/enabled protocols

The allowed and enabled protocol masks need to be expanded to be per
filter type in order to support wakeup filter protocol selection. To
ease that process abstract access to the rc_dev::allowed_protos and
rc_dev::enabled_protocols members with inline functions.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Antti Seppälä <a.seppala@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>


# 1d504b64 14-Jan-2014 Srinivas Kandagatla <srinivas.kandagatla@st.com>

[media] media: st-rc: Add reset support

Some of the SOCs hold the IRB IP in softreset state by default.
For this IP to work driver needs to bring it out of softreset.
This patch adds support to reset the IP via reset framework.

Without this patch the driver can not work with SoCs which holds the IP
in softreset.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>


# 80f93c7b 18-Oct-2013 Srinivas Kandagatla <srinivas.kandagatla@st.com>

[media] media: st-rc: Add ST remote control driver

This patch adds support to ST RC driver, which is basically a IR/UHF
receiver and transmitter. This IP (IRB) is common across all the ST
parts for settop box platforms. IRB is embedded in ST COMMS IP block.
It supports both Rx & Tx functionality.
This driver adds only Rx functionality via LIRC codec.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Acked-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>