linux/drivers/rtc/rtc-cpcap.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Motorola CPCAP PMIC RTC driver
 *
 * Based on cpcap-regulator.c from Motorola Linux kernel tree
 * Copyright (C) 2009 Motorola, Inc.
 *
 * Rewritten for mainline kernel
 *  - use DT
 *  - use regmap
 *  - use standard interrupt framework
 *  - use managed device resources
 *  - remove custom "secure clock daemon" helpers
 *
 * Copyright (C) 2017 Sebastian Reichel <[email protected]>
 */
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/init.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/rtc.h>
#include <linux/err.h>
#include <linux/regmap.h>
#include <linux/mfd/motorola-cpcap.h>
#include <linux/slab.h>
#include <linux/sched.h>

#define SECS_PER_DAY
#define DAY_MASK
#define TOD1_MASK
#define TOD2_MASK

struct cpcap_time {};

struct cpcap_rtc {};

static void cpcap2rtc_time(struct rtc_time *rtc, struct cpcap_time *cpcap)
{}

static void rtc2cpcap_time(struct cpcap_time *cpcap, struct rtc_time *rtc)
{}

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

static int cpcap_rtc_read_time(struct device *dev, struct rtc_time *tm)
{}

static int cpcap_rtc_set_time(struct device *dev, struct rtc_time *tm)
{}

static int cpcap_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{}

static int cpcap_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{}

static const struct rtc_class_ops cpcap_rtc_ops =;

static irqreturn_t cpcap_rtc_alarm_irq(int irq, void *data)
{}

static irqreturn_t cpcap_rtc_update_irq(int irq, void *data)
{}

static int cpcap_rtc_probe(struct platform_device *pdev)
{}

static const struct of_device_id cpcap_rtc_of_match[] =;
MODULE_DEVICE_TABLE(of, cpcap_rtc_of_match);

static struct platform_driver cpcap_rtc_driver =;

module_platform_driver();

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