Lines Matching +full:p +full:- +full:256
1 // SPDX-License-Identifier: GPL-2.0+
19 #include <linux/mfd/syscon/atmel-st.h>
32 #define WDT_MAX_TIME 256 /* seconds */
109 return -EBUSY; in at91_wdt_open()
136 * All counting occurs at SLOW_CLOCK / 128 = 256 Hz in at91_wdt_settimeout()
138 * Since WDV is a 16-bit counter, the maximum period is in at91_wdt_settimeout()
139 * 65536 / 256 = 256 seconds. in at91_wdt_settimeout()
142 return -EINVAL; in at91_wdt_settimeout()
156 * Handle commands from user-space.
162 int __user *p = argp; in at91_wdt_ioctl() local
168 sizeof(at91_wdt_info)) ? -EFAULT : 0; in at91_wdt_ioctl()
171 return put_user(0, p); in at91_wdt_ioctl()
173 if (get_user(new_value, p)) in at91_wdt_ioctl()
174 return -EFAULT; in at91_wdt_ioctl()
184 if (get_user(new_value, p)) in at91_wdt_ioctl()
185 return -EFAULT; in at91_wdt_ioctl()
187 return -EINVAL; in at91_wdt_ioctl()
191 return put_user(wdt_time, p); in at91_wdt_ioctl()
193 return put_user(wdt_time, p); in at91_wdt_ioctl()
195 return -ENOTTY; in at91_wdt_ioctl()
229 struct device *dev = &pdev->dev; in at91wdt_probe()
234 return -EBUSY; in at91wdt_probe()
235 at91wdt_miscdev.parent = &pdev->dev; in at91wdt_probe()
237 parent = dev->parent; in at91wdt_probe()
240 return -ENODEV; in at91wdt_probe()
243 regmap_st = syscon_node_to_regmap(parent->of_node); in at91wdt_probe()
245 return -ENODEV; in at91wdt_probe()
262 struct device *dev = &pdev->dev; in at91wdt_remove()
292 { .compatible = "atmel,at91rm9200-wdt" },
315 pr_info("wdt_time value must be 1 <= wdt_time <= 256, using %d\n", in at91_wdt_init()