#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/module.h>
#include <linux/hid-sensor-hub.h>
#include <linux/iio/iio.h>
#include <linux/rtc.h>
enum hid_time_channel { … };
struct hid_time_state { … };
static const u32 hid_time_addresses[TIME_RTC_CHANNEL_MAX] = …;
static const char * const hid_time_channel_names[TIME_RTC_CHANNEL_MAX] = …;
static int hid_time_proc_event(struct hid_sensor_hub_device *hsdev,
unsigned usage_id, void *priv)
{ … }
static u32 hid_time_value(size_t raw_len, char *raw_data)
{ … }
static int hid_time_capture_sample(struct hid_sensor_hub_device *hsdev,
unsigned usage_id, size_t raw_len,
char *raw_data, void *priv)
{ … }
static const char *hid_time_attrib_name(u32 attrib_id)
{ … }
static int hid_time_parse_report(struct platform_device *pdev,
struct hid_sensor_hub_device *hsdev,
unsigned usage_id,
struct hid_time_state *time_state)
{ … }
static int hid_rtc_read_time(struct device *dev, struct rtc_time *tm)
{ … }
static const struct rtc_class_ops hid_time_rtc_ops = …;
static int hid_time_probe(struct platform_device *pdev)
{ … }
static void hid_time_remove(struct platform_device *pdev)
{ … }
static const struct platform_device_id hid_time_ids[] = …;
MODULE_DEVICE_TABLE(platform, hid_time_ids);
static struct platform_driver hid_time_platform_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_IMPORT_NS(…);