linux/drivers/rtc/rtc-max8997.c

// SPDX-License-Identifier: GPL-2.0+
//
// RTC driver for Maxim MAX8997
//
// Copyright (C) 2013 Samsung Electronics Co.Ltd
//
//  based on rtc-max8998.c

#define pr_fmt(fmt)

#include <linux/slab.h>
#include <linux/rtc.h>
#include <linux/delay.h>
#include <linux/mutex.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/mfd/max8997-private.h>
#include <linux/irqdomain.h>

/* Module parameter for WTSR function control */
static int wtsr_en =;
module_param(wtsr_en, int, 0444);
MODULE_PARM_DESC();
/* Module parameter for SMPL function control */
static int smpl_en =;
module_param(smpl_en, int, 0444);
MODULE_PARM_DESC();

/* RTC Control Register */
#define BCD_EN_SHIFT
#define BCD_EN_MASK
#define MODEL24_SHIFT
#define MODEL24_MASK
/* RTC Update Register1 */
#define RTC_UDR_SHIFT
#define RTC_UDR_MASK
/* WTSR and SMPL Register */
#define WTSRT_SHIFT
#define SMPLT_SHIFT
#define WTSR_EN_SHIFT
#define SMPL_EN_SHIFT
#define WTSRT_MASK
#define SMPLT_MASK
#define WTSR_EN_MASK
#define SMPL_EN_MASK
/* RTC Hour register */
#define HOUR_PM_SHIFT
#define HOUR_PM_MASK
/* RTC Alarm Enable */
#define ALARM_ENABLE_SHIFT
#define ALARM_ENABLE_MASK

enum {};

struct max8997_rtc_info {};

static void max8997_rtc_data_to_tm(u8 *data, struct rtc_time *tm,
				   int rtc_24hr_mode)
{}

static int max8997_rtc_tm_to_data(struct rtc_time *tm, u8 *data)
{}

static inline int max8997_rtc_set_update_reg(struct max8997_rtc_info *info)
{}

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

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

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

static int max8997_rtc_stop_alarm(struct max8997_rtc_info *info)
{}

static int max8997_rtc_start_alarm(struct max8997_rtc_info *info)
{}
static int max8997_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{}

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

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

static const struct rtc_class_ops max8997_rtc_ops =;

static void max8997_rtc_enable_wtsr(struct max8997_rtc_info *info, bool enable)
{}

static void max8997_rtc_enable_smpl(struct max8997_rtc_info *info, bool enable)
{}

static int max8997_rtc_init_reg(struct max8997_rtc_info *info)
{}

static int max8997_rtc_probe(struct platform_device *pdev)
{}

static void max8997_rtc_shutdown(struct platform_device *pdev)
{}

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

static struct platform_driver max8997_rtc_driver =;

module_platform_driver();

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