linux/drivers/rtc/rtc-cros-ec.c

// SPDX-License-Identifier: GPL-2.0
// RTC driver for ChromeOS Embedded Controller.
//
// Copyright (C) 2017 Google, Inc.
// Author: Stephen Barber <[email protected]>

#include <linux/kernel.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_data/cros_ec_commands.h>
#include <linux/platform_data/cros_ec_proto.h>
#include <linux/platform_device.h>
#include <linux/rtc.h>
#include <linux/slab.h>

#define DRV_NAME

#define SECS_PER_DAY

/**
 * struct cros_ec_rtc - Driver data for EC RTC
 *
 * @cros_ec: Pointer to EC device
 * @rtc: Pointer to RTC device
 * @notifier: Notifier info for responding to EC events
 * @saved_alarm: Alarm to restore when interrupts are reenabled
 */
struct cros_ec_rtc {};

static int cros_ec_rtc_get(struct cros_ec_device *cros_ec, u32 command,
			   u32 *response)
{}

static int cros_ec_rtc_set(struct cros_ec_device *cros_ec, u32 command,
			   u32 param)
{}

/* Read the current time from the EC. */
static int cros_ec_rtc_read_time(struct device *dev, struct rtc_time *tm)
{}

/* Set the current EC time. */
static int cros_ec_rtc_set_time(struct device *dev, struct rtc_time *tm)
{}

/* Read alarm time from RTC. */
static int cros_ec_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{}

/* Set the EC's RTC alarm. */
static int cros_ec_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{}

static int cros_ec_rtc_alarm_irq_enable(struct device *dev,
					unsigned int enabled)
{}

static int cros_ec_rtc_event(struct notifier_block *nb,
			     unsigned long queued_during_suspend,
			     void *_notify)
{}

static const struct rtc_class_ops cros_ec_rtc_ops =;

#ifdef CONFIG_PM_SLEEP
static int cros_ec_rtc_suspend(struct device *dev)
{}

static int cros_ec_rtc_resume(struct device *dev)
{}
#endif

static SIMPLE_DEV_PM_OPS(cros_ec_rtc_pm_ops, cros_ec_rtc_suspend,
			 cros_ec_rtc_resume);

static int cros_ec_rtc_probe(struct platform_device *pdev)
{}

static void cros_ec_rtc_remove(struct platform_device *pdev)
{}

static const struct platform_device_id cros_ec_rtc_id[] =;
MODULE_DEVICE_TABLE(platform, cros_ec_rtc_id);

static struct platform_driver cros_ec_rtc_driver =;

module_platform_driver();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();