summaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/ite-cir.h
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2021-02-21 21:16:45 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-03-11 11:59:41 +0100
commit0b16cd575d6d8be4327918576ffa02bbdfc523e6 (patch)
treefd1dfa26743932250f8220b9619fc0173ecf4b9e /drivers/media/rc/ite-cir.h
parentcc83573c46f6d12eb83cd3965a76d0890b879f17 (diff)
downloadlinux-stable-0b16cd575d6d8be4327918576ffa02bbdfc523e6.tar.gz
linux-stable-0b16cd575d6d8be4327918576ffa02bbdfc523e6.tar.bz2
linux-stable-0b16cd575d6d8be4327918576ffa02bbdfc523e6.zip
media: ite-cir: move runtime information into driver data
The carrier, duty cycle etc are not device dependent, and they can be changed at runtime. By moving them into the allocated struct, we can make the device specific structures smaller, and we no longer need to copy the struct. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/rc/ite-cir.h')
-rw-r--r--drivers/media/rc/ite-cir.h32
1 files changed, 13 insertions, 19 deletions
diff --git a/drivers/media/rc/ite-cir.h b/drivers/media/rc/ite-cir.h
index 853001f67445..cb3dc4ca2b0a 100644
--- a/drivers/media/rc/ite-cir.h
+++ b/drivers/media/rc/ite-cir.h
@@ -31,24 +31,6 @@ struct ite_dev_params {
/* IR pnp I/O resource number */
int io_rsrc_no;
- /* true if the hardware supports transmission */
- bool hw_tx_capable;
-
- /* base sampling period, in ns */
- u32 sample_period;
-
- /* rx low carrier frequency, in Hz, 0 means no demodulation */
- unsigned int rx_low_carrier_freq;
-
- /* tx high carrier frequency, in Hz, 0 means no demodulation */
- unsigned int rx_high_carrier_freq;
-
- /* tx carrier frequency, in Hz */
- unsigned int tx_carrier_freq;
-
- /* duty cycle, 0-100 */
- int tx_duty_cycle;
-
/* hw-specific operation function pointers; most of these must be
* called while holding the spin lock, except for the TX FIFO length
* one */
@@ -104,12 +86,24 @@ struct ite_dev {
/* transmit support */
wait_queue_head_t tx_queue, tx_ended;
+ /* rx low carrier frequency, in Hz, 0 means no demodulation */
+ unsigned int rx_low_carrier_freq;
+
+ /* tx high carrier frequency, in Hz, 0 means no demodulation */
+ unsigned int rx_high_carrier_freq;
+
+ /* tx carrier frequency, in Hz */
+ unsigned int tx_carrier_freq;
+
+ /* duty cycle, 0-100 */
+ int tx_duty_cycle;
+
/* hardware I/O settings */
unsigned long cir_addr;
int cir_irq;
/* overridable copy of model parameters */
- struct ite_dev_params params;
+ const struct ite_dev_params *params;
};
/* common values for all kinds of hardware */