WIP FPC-III support
[linux/fpc-iii.git] / drivers / w1 / slaves / w1_smem.c
blob09afcf2a4204ddfd534e6116cc7f9b6e282b32a9
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * w1_smem.c
5 * Copyright (c) 2004 Evgeniy Polyakov <zbr@ioremap.net>
6 */
8 #include <asm/types.h>
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>
16 #include <linux/w1.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)
31 int err;
33 err = w1_register_family(&w1_smem_family_01);
34 if (err)
35 return err;
37 err = w1_register_family(&w1_smem_family_81);
38 if (err) {
39 w1_unregister_family(&w1_smem_family_01);
40 return err;
43 return 0;
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));