linux/drivers/watchdog/kempld_wdt.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Kontron PLD watchdog driver
 *
 * Copyright (c) 2010-2013 Kontron Europe GmbH
 * Author: Michael Brunner <[email protected]>
 *
 * Note: From the PLD watchdog point of view timeout and pretimeout are
 *       defined differently than in the kernel.
 *       First the pretimeout stage runs out before the timeout stage gets
 *       active.
 *
 * Kernel/API:                     P-----| pretimeout
 *               |-----------------------T timeout
 * Watchdog:     |-----------------P       pretimeout_stage
 *                                 |-----T timeout_stage
 */

#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/uaccess.h>
#include <linux/watchdog.h>
#include <linux/platform_device.h>
#include <linux/mfd/kempld.h>

#define KEMPLD_WDT_STAGE_TIMEOUT(x)
#define KEMPLD_WDT_STAGE_CFG(x)
#define STAGE_CFG_GET_PRESCALER(x)
#define STAGE_CFG_SET_PRESCALER(x)
#define STAGE_CFG_PRESCALER_MASK
#define STAGE_CFG_ACTION_MASK
#define STAGE_CFG_ASSERT

#define KEMPLD_WDT_MAX_STAGES
#define KEMPLD_WDT_KICK
#define KEMPLD_WDT_CFG
#define KEMPLD_WDT_CFG_ENABLE
#define KEMPLD_WDT_CFG_ENABLE_LOCK
#define KEMPLD_WDT_CFG_GLOBAL_LOCK

enum {};

enum {};

enum {};

static const u32 kempld_prescaler[] =;

struct kempld_wdt_stage {};

struct kempld_wdt_data {};

#define DEFAULT_TIMEOUT
#define DEFAULT_PRETIMEOUT

static unsigned int timeout =;
module_param(timeout, uint, 0);
MODULE_PARM_DESC();

static unsigned int pretimeout =;
module_param(pretimeout, uint, 0);
MODULE_PARM_DESC();

static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC();

static int kempld_wdt_set_stage_action(struct kempld_wdt_data *wdt_data,
					struct kempld_wdt_stage *stage,
					u8 action)
{}

static int kempld_wdt_set_stage_timeout(struct kempld_wdt_data *wdt_data,
					struct kempld_wdt_stage *stage,
					unsigned int timeout)
{}

/*
 * kempld_get_mutex must be called prior to calling this function.
 */
static unsigned int kempld_wdt_get_timeout(struct kempld_wdt_data *wdt_data,
						struct kempld_wdt_stage *stage)
{}

static int kempld_wdt_set_timeout(struct watchdog_device *wdd,
					unsigned int timeout)
{}

static int kempld_wdt_set_pretimeout(struct watchdog_device *wdd,
					unsigned int pretimeout)
{}

static void kempld_wdt_update_timeouts(struct kempld_wdt_data *wdt_data)
{}

static int kempld_wdt_start(struct watchdog_device *wdd)
{}

static int kempld_wdt_stop(struct watchdog_device *wdd)
{}

static int kempld_wdt_keepalive(struct watchdog_device *wdd)
{}

static long kempld_wdt_ioctl(struct watchdog_device *wdd, unsigned int cmd,
				unsigned long arg)
{}

static int kempld_wdt_probe_stages(struct watchdog_device *wdd)
{}

static const struct watchdog_info kempld_wdt_info =;

static const struct watchdog_ops kempld_wdt_ops =;

static int kempld_wdt_probe(struct platform_device *pdev)
{}

/* Disable watchdog if it is active during suspend */
static int kempld_wdt_suspend(struct platform_device *pdev,
				pm_message_t message)
{}

/* Enable watchdog and configure it if necessary */
static int kempld_wdt_resume(struct platform_device *pdev)
{}

static struct platform_driver kempld_wdt_driver =;

module_platform_driver();

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