linux/drivers/watchdog/mlx_wdt.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Mellanox watchdog driver
 *
 * Copyright (C) 2019 Mellanox Technologies
 * Copyright (C) 2019 Michael Shych <[email protected]>
 */

#include <linux/bitops.h>
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/log2.h>
#include <linux/module.h>
#include <linux/platform_data/mlxreg.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/spinlock.h>
#include <linux/types.h>
#include <linux/watchdog.h>

#define MLXREG_WDT_CLOCK_SCALE
#define MLXREG_WDT_MAX_TIMEOUT_TYPE1
#define MLXREG_WDT_MAX_TIMEOUT_TYPE2
#define MLXREG_WDT_MAX_TIMEOUT_TYPE3
#define MLXREG_WDT_MIN_TIMEOUT
#define MLXREG_WDT_OPTIONS_BASE

/**
 * struct mlxreg_wdt - wd private data:
 *
 * @wdd:	watchdog device;
 * @pdata:	data received from platform driver;
 * @regmap:	register map of parent device;
 * @action_idx:	index for direct access to action register;
 * @timeout_idx:index for direct access to TO register;
 * @tleft_idx:	index for direct access to time left register;
 * @ping_idx:	index for direct access to ping register;
 * @reset_idx:	index for direct access to reset cause register;
 * @regmap_val_sz: size of value in register map;
 * @wdt_type:	watchdog HW type;
 */
struct mlxreg_wdt {};

static void mlxreg_wdt_check_card_reset(struct mlxreg_wdt *wdt)
{}

static int mlxreg_wdt_start(struct watchdog_device *wdd)
{}

static int mlxreg_wdt_stop(struct watchdog_device *wdd)
{}

static int mlxreg_wdt_ping(struct watchdog_device *wdd)
{}

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

static unsigned int mlxreg_wdt_get_timeleft(struct watchdog_device *wdd)
{}

static const struct watchdog_ops mlxreg_wdt_ops_type1 =;

static const struct watchdog_ops mlxreg_wdt_ops_type2 =;

static const struct watchdog_info mlxreg_wdt_main_info =;

static const struct watchdog_info mlxreg_wdt_aux_info =;

static void mlxreg_wdt_config(struct mlxreg_wdt *wdt,
			      struct mlxreg_core_platform_data *pdata)
{}

static int mlxreg_wdt_init_timeout(struct mlxreg_wdt *wdt,
				   struct mlxreg_core_platform_data *pdata)
{}

static int mlxreg_wdt_probe(struct platform_device *pdev)
{}

static struct platform_driver mlxreg_wdt_driver =;

module_platform_driver();

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