From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, sensors@Stimpy.netroedge.com
Cc: johnpol@2ka.mipt.ru
Subject: [PATCH] w1_smem: support for new simple rom family [0x81 id].
Date: Tue, 21 Jun 2005 22:12:06 -0700 [thread overview]
Message-ID: <11194171262246@kroah.com> (raw)
In-Reply-To: <11194171264139@kroah.com>
[PATCH] w1_smem: support for new simple rom family [0x81 id].
Support for new simple rom family [0x81 id].
It is the same as existing 0x01 family,
which is used in ds9490* w1 adapters.
Patch is on top of new-thermal-sensor-families patch.
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
commit 85e941cc9f10316080a16b121d24d329e5c2a65d
tree 85e034582cfb6f9efb40e49efdef3490f5e56eb6
parent 718a538f945a84244a460df434c3f6f04701957b
author Evgeniy Polyakov <johnpol@2ka.mipt.ru> Mon, 02 May 2005 14:26:42 +0400
committer Greg Kroah-Hartman <gregkh@suse.de> Tue, 21 Jun 2005 21:43:09 -0700
drivers/w1/w1_family.h | 3 ++-
drivers/w1/w1_smem.c | 26 ++++++++++++++++++++++----
2 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/drivers/w1/w1_family.h b/drivers/w1/w1_family.h
--- a/drivers/w1/w1_family.h
+++ b/drivers/w1/w1_family.h
@@ -27,7 +27,8 @@
#include <asm/atomic.h>
#define W1_FAMILY_DEFAULT 0
-#define W1_FAMILY_SMEM 0x01
+#define W1_FAMILY_SMEM_01 0x01
+#define W1_FAMILY_SMEM_81 0x81
#define W1_THERM_DS18S20 0x10
#define W1_THERM_DS1822 0x22
#define W1_THERM_DS18B20 0x28
diff --git a/drivers/w1/w1_smem.c b/drivers/w1/w1_smem.c
--- a/drivers/w1/w1_smem.c
+++ b/drivers/w1/w1_smem.c
@@ -99,19 +99,37 @@ out_dec:
return count;
}
-static struct w1_family w1_smem_family = {
- .fid = W1_FAMILY_SMEM,
+static struct w1_family w1_smem_family_01 = {
+ .fid = W1_FAMILY_SMEM_01,
+ .fops = &w1_smem_fops,
+};
+
+static struct w1_family w1_smem_family_81 = {
+ .fid = W1_FAMILY_SMEM_81,
.fops = &w1_smem_fops,
};
static int __init w1_smem_init(void)
{
- return w1_register_family(&w1_smem_family);
+ int err;
+
+ err = w1_register_family(&w1_smem_family_01);
+ if (err)
+ return err;
+
+ err = w1_register_family(&w1_smem_family_81);
+ if (err) {
+ w1_unregister_family(&w1_smem_family_01);
+ return err;
+ }
+
+ return 0;
}
static void __exit w1_smem_fini(void)
{
- w1_unregister_family(&w1_smem_family);
+ w1_unregister_family(&w1_smem_family_01);
+ w1_unregister_family(&w1_smem_family_81);
}
module_init(w1_smem_init);
next prev parent reply other threads:[~2005-06-22 5:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-22 5:11 [GIT PATCH] W1 patches for 2.6.12 Greg KH
2005-06-22 5:12 ` [PATCH] w1_therm: support for ds18b20, ds1822 thermal sensors Greg KH
2005-06-22 5:12 ` [PATCH] w1: cleanups Greg KH
2005-06-22 5:12 ` Greg KH [this message]
2005-06-22 5:12 ` [PATCH] w1: new family structure Greg KH
2005-06-22 5:12 ` [PATCH] w1_therm: removed duplicated family id Greg KH
2005-06-22 5:12 ` [PATCH] w1: Cleans up usage of touch_bit/w1_read_bit/w1_write_bit Greg KH
2005-06-22 5:12 ` [PATCH] w1: fix build issues Greg KH
2005-06-22 5:12 ` [PATCH] w1: Adds a sysfs entry (w1_master_search) that allows you to disable/enable periodic searches Greg KH
2005-06-22 5:12 ` [PATCH] w1: Added the triplet w1 master method and changes w1_search() to use it Greg KH
2005-06-22 5:12 ` [PATCH] w1: Adds a default family so that new slave families will show up in sysfs Greg KH
2005-06-22 5:12 ` [PATCH] w1: Updates the w1 documentation (w1.generic) Greg KH
2005-06-22 5:12 ` [PATCH] w1: reconnect feature Greg KH
2005-06-22 5:12 ` [PATCH] w1: fix compiler warnings Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11194171262246@kroah.com \
--to=gregkh@suse.de \
--cc=greg@kroah.com \
--cc=johnpol@2ka.mipt.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=sensors@Stimpy.netroedge.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox