From: greg@kroah.com (Greg KH)
To: lm-sensors@vger.kernel.org
Subject: [RESEND4] Dallas 1-wire protocol implementation.
Date: Thu, 19 May 2005 06:25:05 +0000 [thread overview]
Message-ID: <20040709234222.GB8727@kroah.com> (raw)
In-Reply-To: <20040703003032.252325b3@zanzibar.2ka.mipt.ru>
On Sat, Jul 03, 2004 at 12:30:32AM +0400, Evgeniy Polyakov wrote:
> On Sun, 20 Jun 2004 16:51:31 +0400
> Evgeniy Polyakov <johnpol@2ka.mipt.ru> wrote:
>
> Ping.
> iButton support will coming soon.
Ok, sorry for the long delay.
I finally commited this patch, along with a bunch of minor cleanups:
- small formatting ones (took the extra " " out before the "("
in a function call)
- made some global symbols have a "w1" in them (like "flock")
And then I disabled this whole function:
> +ssize_t w1_master_attribute_show (struct device *dev, char *buf)
> +{
> + struct w1_master *md = container_of (dev, struct w1_master, dev);
> + int c = PAGE_SIZE;
> +
> + if (down_interruptible (&md->mutex))
> + return -EBUSY;
> +
> + c -= snprintf (buf + PAGE_SIZE - c, c, "%s\n", md->name);
> + c -= snprintf (buf + PAGE_SIZE - c, c,
> + "bus_master=0x%p, timeout=%d, max_slave_count=%d, attempts=%lu\n",
> + md->bus_master, w1_timeout, md->max_slave_count,
> + md->attempts);
> + c -= snprintf (buf + PAGE_SIZE - c, c, "%d slaves: ",
> + md->slave_count);
> + if (md->slave_count = 0)
> + c -= snprintf (buf + PAGE_SIZE - c, c, "no.\n");
> + else {
> + struct list_head *ent, *n;
> + struct w1_slave *sl;
> +
> + list_for_each_safe (ent, n, &md->slist) {
> + sl = list_entry (ent, struct w1_slave, w1_slave_entry);
> +
> + c -= snprintf (buf + PAGE_SIZE - c, c, "%s[%p] ",
> + sl->name, sl);
> + }
> + c -= snprintf (buf + PAGE_SIZE - c, c, "\n");
> + }
> +
> + up (&md->mutex);
> +
> + return PAGE_SIZE - c;
> +}
As sysfs files should be 1 value per file. If you want to output a
whole bunch of info, you need to make a whole bunch of files.
I've added the patch to my bk trees, and it should show up in the next
-mm release. If you need a copy of the patch I've applied, so that you
can send me updates and you don't want to mess with bitkeeper, please
let me know and I'll send it to you.
Oh heck, I've put it here for everyone to see, to make it easier:
www.kernel.org/pub/linux/people/gregkh/i2c/2.6/2.6.7/w1-2.6.7.patch
thanks, and again, sorry for the delay.
greg k-h
next prev parent reply other threads:[~2005-05-19 6:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-19 6:25 [RESEND4] Dallas 1-wire protocol implementation Evgeniy Polyakov
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Greg KH
2005-05-19 6:25 ` Greg KH [this message]
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Evgeniy Polyakov
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=20040709234222.GB8727@kroah.com \
--to=greg@kroah.com \
--cc=lm-sensors@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.