Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) // SPDX-License-Identifier: GPL-2.0+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  * Watchdog driver for the A21 VME CPU Boards
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  * Copyright (C) 2013 MEN Mikro Elektronik Nuernberg GmbH
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) #include <linux/module.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) #include <linux/moduleparam.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) #include <linux/types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) #include <linux/kernel.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #include <linux/slab.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) #include <linux/platform_device.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) #include <linux/watchdog.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) #include <linux/uaccess.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) #include <linux/gpio/consumer.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) #include <linux/delay.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) #include <linux/bitops.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) #include <linux/of.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) #define NUM_GPIOS 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) enum a21_wdt_gpios {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 	GPIO_WD_ENAB,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	GPIO_WD_FAST,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 	GPIO_WD_TRIG,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 	GPIO_WD_RST0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 	GPIO_WD_RST1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 	GPIO_WD_RST2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) struct a21_wdt_drv {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 	struct watchdog_device wdt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 	struct gpio_desc *gpios[NUM_GPIOS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) static bool nowayout = WATCHDOG_NOWAYOUT;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) module_param(nowayout, bool, 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 			    __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) static unsigned int a21_wdt_get_bootstatus(struct a21_wdt_drv *drv)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 	int reset = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 	reset |= gpiod_get_value(drv->gpios[GPIO_WD_RST0]) ? (1 << 0) : 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 	reset |= gpiod_get_value(drv->gpios[GPIO_WD_RST1]) ? (1 << 1) : 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 	reset |= gpiod_get_value(drv->gpios[GPIO_WD_RST2]) ? (1 << 2) : 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 	return reset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) static int a21_wdt_start(struct watchdog_device *wdt)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 	struct a21_wdt_drv *drv = watchdog_get_drvdata(wdt);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 	gpiod_set_value(drv->gpios[GPIO_WD_ENAB], 1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) static int a21_wdt_stop(struct watchdog_device *wdt)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	struct a21_wdt_drv *drv = watchdog_get_drvdata(wdt);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 	gpiod_set_value(drv->gpios[GPIO_WD_ENAB], 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) static int a21_wdt_ping(struct watchdog_device *wdt)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 	struct a21_wdt_drv *drv = watchdog_get_drvdata(wdt);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 	gpiod_set_value(drv->gpios[GPIO_WD_TRIG], 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 	ndelay(10);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	gpiod_set_value(drv->gpios[GPIO_WD_TRIG], 1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) static int a21_wdt_set_timeout(struct watchdog_device *wdt,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 			       unsigned int timeout)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 	struct a21_wdt_drv *drv = watchdog_get_drvdata(wdt);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 	if (timeout != 1 && timeout != 30) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 		dev_err(wdt->parent, "Only 1 and 30 allowed as timeout\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 		return -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 	if (timeout == 30 && wdt->timeout == 1) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 		dev_err(wdt->parent,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 			"Transition from fast to slow mode not allowed\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 		return -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	if (timeout == 1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 		gpiod_set_value(drv->gpios[GPIO_WD_FAST], 1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 		gpiod_set_value(drv->gpios[GPIO_WD_FAST], 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	wdt->timeout = timeout;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) static const struct watchdog_info a21_wdt_info = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 	.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 	.identity = "MEN A21 Watchdog",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) static const struct watchdog_ops a21_wdt_ops = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 	.owner = THIS_MODULE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 	.start = a21_wdt_start,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 	.stop = a21_wdt_stop,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 	.ping = a21_wdt_ping,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 	.set_timeout = a21_wdt_set_timeout,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) static struct watchdog_device a21_wdt = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	.info = &a21_wdt_info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 	.ops = &a21_wdt_ops,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 	.min_timeout = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 	.max_timeout = 30,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) static int a21_wdt_probe(struct platform_device *pdev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 	struct device *dev = &pdev->dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 	struct a21_wdt_drv *drv;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 	unsigned int reset = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 	int num_gpios;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 	int ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 	int i;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	drv = devm_kzalloc(dev, sizeof(struct a21_wdt_drv), GFP_KERNEL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 	if (!drv)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 		return -ENOMEM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	num_gpios = gpiod_count(dev, NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 	if (num_gpios != NUM_GPIOS) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 		dev_err(dev, "gpios DT property wrong, got %d want %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 			num_gpios, NUM_GPIOS);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 		return -ENODEV;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 	/* Request the used GPIOs */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 	for (i = 0; i < num_gpios; i++) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 		enum gpiod_flags gflags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 		if (i < GPIO_WD_RST0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 			gflags = GPIOD_ASIS;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 		else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 			gflags = GPIOD_IN;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 		drv->gpios[i] = devm_gpiod_get_index(dev, NULL, i, gflags);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 		if (IS_ERR(drv->gpios[i]))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 			return PTR_ERR(drv->gpios[i]);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 		gpiod_set_consumer_name(drv->gpios[i], "MEN A21 Watchdog");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 		/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 		 * Retrieve the initial value from the GPIOs that should be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 		 * output, then set up the line as output with that value.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 		if (i < GPIO_WD_RST0) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 			int val;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 			val = gpiod_get_value(drv->gpios[i]);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 			gpiod_direction_output(drv->gpios[i], val);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 	watchdog_init_timeout(&a21_wdt, 30, dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 	watchdog_set_nowayout(&a21_wdt, nowayout);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 	watchdog_set_drvdata(&a21_wdt, drv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 	a21_wdt.parent = dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 	reset = a21_wdt_get_bootstatus(drv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 	if (reset == 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 		a21_wdt.bootstatus |= WDIOF_EXTERN1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 	else if (reset == 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 		a21_wdt.bootstatus |= WDIOF_CARDRESET;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 	else if (reset == 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 		a21_wdt.bootstatus |= WDIOF_POWERUNDER;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 	else if (reset == 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 		a21_wdt.bootstatus |= WDIOF_EXTERN2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 	drv->wdt = a21_wdt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 	dev_set_drvdata(dev, drv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 	ret = devm_watchdog_register_device(dev, &a21_wdt);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 	if (ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 		return ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 	dev_info(dev, "MEN A21 watchdog timer driver enabled\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) static void a21_wdt_shutdown(struct platform_device *pdev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 	struct a21_wdt_drv *drv = dev_get_drvdata(&pdev->dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 	gpiod_set_value(drv->gpios[GPIO_WD_ENAB], 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) static const struct of_device_id a21_wdt_ids[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 	{ .compatible = "men,a021-wdt" },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 	{ },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) MODULE_DEVICE_TABLE(of, a21_wdt_ids);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) static struct platform_driver a21_wdt_driver = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 	.probe = a21_wdt_probe,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 	.shutdown = a21_wdt_shutdown,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 	.driver = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 		.name = "a21-watchdog",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 		.of_match_table = a21_wdt_ids,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) module_platform_driver(a21_wdt_driver);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) MODULE_AUTHOR("MEN Mikro Elektronik");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) MODULE_DESCRIPTION("MEN A21 Watchdog");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) MODULE_LICENSE("GPL");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) MODULE_ALIAS("platform:a21-watchdog");