#include <linux/module.h>
#include <linux/acpi.h>
#include <linux/delay.h>
#include <linux/dmi.h>
#include <linux/gpio/consumer.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/platform_device.h>
#include <media/cec-notifier.h>
#include "seco-cec.h"
struct secocec_data { … };
#define smb_wr16(cmd, data) …
#define smb_rd16(cmd, res) …
static int smb_word_op(u16 slave_addr, u8 cmd, u16 data,
u8 operation, u16 *result)
{ … }
static int secocec_adap_enable(struct cec_adapter *adap, bool enable)
{ … }
static int secocec_adap_log_addr(struct cec_adapter *adap, u8 logical_addr)
{ … }
static int secocec_adap_transmit(struct cec_adapter *adap, u8 attempts,
u32 signal_free_time, struct cec_msg *msg)
{ … }
static void secocec_tx_done(struct cec_adapter *adap, u16 status_val)
{ … }
static void secocec_rx_done(struct cec_adapter *adap, u16 status_val)
{ … }
static const struct cec_adap_ops secocec_cec_adap_ops = …;
#ifdef CONFIG_CEC_SECO_RC
static int secocec_ir_probe(void *priv)
{ … }
static int secocec_ir_rx(struct secocec_data *priv)
{ … }
#else
static void secocec_ir_rx(struct secocec_data *priv)
{
}
static int secocec_ir_probe(void *priv)
{
return 0;
}
#endif
static irqreturn_t secocec_irq_handler(int irq, void *priv)
{ … }
struct cec_dmi_match { … };
static const struct cec_dmi_match secocec_dmi_match_table[] = …;
static struct device *secocec_cec_find_hdmi_dev(struct device *dev,
const char **conn)
{ … }
static int secocec_acpi_probe(struct secocec_data *sdev)
{ … }
static int secocec_probe(struct platform_device *pdev)
{ … }
static void secocec_remove(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM_SLEEP
static int secocec_suspend(struct device *dev)
{ … }
static int secocec_resume(struct device *dev)
{ … }
static SIMPLE_DEV_PM_OPS(secocec_pm_ops, secocec_suspend, secocec_resume);
#define SECOCEC_PM_OPS …
#else
#define SECOCEC_PM_OPS …
#endif
#ifdef CONFIG_ACPI
static const struct acpi_device_id secocec_acpi_match[] = …;
MODULE_DEVICE_TABLE(acpi, secocec_acpi_match);
#endif
static struct platform_driver secocec_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;