linux/drivers/rtc/rtc-tps65910.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * rtc-tps65910.c -- TPS65910 Real Time Clock interface
 *
 * Copyright (c) 2012, NVIDIA CORPORATION.  All rights reserved.
 * Author: Venu Byravarasu <[email protected]>
 *
 * Based on original TI driver rtc-twl.c
 *   Copyright (C) 2007 MontaVista Software, Inc
 *   Author: Alexandre Rusev <[email protected]>
 */

#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/rtc.h>
#include <linux/bcd.h>
#include <linux/math64.h>
#include <linux/property.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/mfd/tps65910.h>

struct tps65910_rtc {};

/* Total number of RTC registers needed to set time*/
#define NUM_TIME_REGS

/* Total number of RTC registers needed to set compensation registers */
#define NUM_COMP_REGS

/* Min and max values supported with 'offset' interface (swapped sign) */
#define MIN_OFFSET
#define MAX_OFFSET

/* Number of ticks per hour */
#define TICKS_PER_HOUR

/* Multiplier for ppb conversions */
#define PPB_MULT

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

/*
 * Gets current tps65910 RTC time and date parameters.
 *
 * The RTC's time/alarm representation is not what gmtime(3) requires
 * Linux to use:
 *
 *  - Months are 1..12 vs Linux 0-11
 *  - Years are 0..99 vs Linux 1900..N (we assume 21st century)
 */
static int tps65910_rtc_read_time(struct device *dev, struct rtc_time *tm)
{}

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

/*
 * Gets current tps65910 RTC alarm time.
 */
static int tps65910_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm)
{}

static int tps65910_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm)
{}

static int tps65910_rtc_set_calibration(struct device *dev, int calibration)
{}

static int tps65910_rtc_get_calibration(struct device *dev, int *calibration)
{}

static int tps65910_read_offset(struct device *dev, long *offset)
{}

static int tps65910_set_offset(struct device *dev, long offset)
{}

static irqreturn_t tps65910_rtc_interrupt(int irq, void *rtc)
{}

static const struct rtc_class_ops tps65910_rtc_ops =;

static int tps65910_rtc_probe(struct platform_device *pdev)
{}

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

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

static SIMPLE_DEV_PM_OPS(tps65910_rtc_pm_ops, tps65910_rtc_suspend,
			tps65910_rtc_resume);

static struct platform_driver tps65910_rtc_driver =;

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