hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/include/linux/w1.h
....@@ -1,15 +1,6 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * Copyright (c) 2004 Evgeniy Polyakov <zbr@ioremap.net>
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License as published by
6
- * the Free Software Foundation; either version 2 of the License, or
7
- * (at your option) any later version.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
134 */
145
156 #ifndef __LINUX_W1_H
....@@ -127,6 +118,9 @@
127118 * w1_master* is passed to the slave found callback.
128119 * u8 is search_type, W1_SEARCH or W1_ALARM_SEARCH
129120 *
121
+ * @dev_id: Optional device id string, which w1 slaves could use for
122
+ * creating names, which then give a connection to the w1 master
123
+ *
130124 * Note: read_bit and write_bit are very low level functions and should only
131125 * be used with hardware that doesn't really support 1-wire operations,
132126 * like a parallel/serial port.
....@@ -159,6 +153,8 @@
159153
160154 void (*search)(void *, struct w1_master *,
161155 u8, w1_slave_found_callback);
156
+
157
+ char *dev_id;
162158 };
163159
164160 /**
....@@ -266,13 +262,14 @@
266262 * @family_entry: family linked list
267263 * @fid: 8 bit family identifier
268264 * @fops: operations for this family
265
+ * @of_match_table: open firmware match table
269266 * @refcnt: reference counter
270267 */
271268 struct w1_family {
272269 struct list_head family_entry;
273270 u8 fid;
274271
275
- struct w1_family_ops *fops;
272
+ const struct w1_family_ops *fops;
276273
277274 const struct of_device_id *of_match_table;
278275