1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright (c) 2004 Evgeniy Polyakov <zbr@ioremap.net>
10 #include <linux/kernel.h>
11 #include <linux/module.h>
12 #include <linux/moduleparam.h>
13 #include <linux/device.h>
14 #include <linux/types.h>
18 #define W1_FAMILY_SMEM_01 0x01
19 #define W1_FAMILY_SMEM_81 0x81
21 static struct w1_family w1_smem_family_01 = {
22 .fid = W1_FAMILY_SMEM_01,
25 static struct w1_family w1_smem_family_81 = {
26 .fid = W1_FAMILY_SMEM_81,
29 static int __init w1_smem_init(void)
33 err = w1_register_family(&w1_smem_family_01);
37 err = w1_register_family(&w1_smem_family_81);
39 w1_unregister_family(&w1_smem_family_01);
46 static void __exit w1_smem_fini(void)
48 w1_unregister_family(&w1_smem_family_01);
49 w1_unregister_family(&w1_smem_family_81);
52 module_init(w1_smem_init);
53 module_exit(w1_smem_fini);
55 MODULE_AUTHOR("Evgeniy Polyakov <zbr@ioremap.net>");
56 MODULE_DESCRIPTION("Driver for 1-wire Dallas network protocol, 64bit memory family.");
57 MODULE_LICENSE("GPL");
58 MODULE_ALIAS("w1-family-" __stringify(W1_FAMILY_SMEM_01));
59 MODULE_ALIAS("w1-family-" __stringify(W1_FAMILY_SMEM_81));