03 Nov, 2011

1 commit

  • Interrupting w1_delay() in w1_read_bit() results in missing the low level
    on the w1 line and receiving "1" instead of "0".

    Add local_irq_save()/local_irq_restore() around the critical section

    Signed-off-by: Jan Weitzel
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Weitzel
     

26 Aug, 2011

1 commit


27 May, 2011

1 commit

  • The first patch adds generic functionnality to w1_io for Resume Command
    [A5h] lots of slaves support. I found it useful for multi-commands/reset
    workflows with the same slave on a multi-slave bus.

    This DS2408 w1 slave driver is not complete for all the features of the
    chip, but its sufficient if you use it as a simple IO expander. Enjoy!

    The ds1wm had Kconfig dependencies towards ARM && HAVE_CLK. I took them
    out since I was using the ds1wm on an x86_64 platform (ds1wm in a FPGA
    through pcie) and found them irrelevant.

    The clock freq/divisors at the top of ds1wm.c did not have the MSB set to
    1. This bit is CLK_EN which turns the whole prescaler and dividers on.
    The driver never mentionned this bit either, so I just included this bit
    right in the table entries. I also took the liberty to add a couple of
    entries to the table. The spec doesn't explicitely mentions these
    possibilities but the description and examination of the core shows the
    prescalers & dividers can be used for more than the table explicitely
    shows. The table I enlarged still doesn't cover all possibilities, but
    it's a good start.

    I also made a few tweaks to a couple of the read and write algorithms
    which made sense while I had my head very deep in the ds1wm documentation.
    We stressed it a lot with 10+ slaves on the bus, many ds2408, ds2431 and
    ds2433 at the same time doing extensive interaction. It proved quite
    stable in our production environment.

    This patch:

    Add generic functionnality to w1_io for Resume Command [A5h] lots of
    slaves support.

    Signed-off-by: Jean-François Dagenais
    Cc: Evgeniy Polyakov
    Cc: Szabolcs Gyurko
    Cc: Matt Reimer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean-François Dagenais
     

03 Apr, 2009

1 commit


09 Jan, 2009

1 commit


24 Dec, 2008

1 commit

  • During test of the w1-gpio driver i found that in "w1.c:679
    w1_slave_found()" the device id is converted to little-endian with
    "cpu_to_le64()", but its not converted back to cpu format in "w1_io.c:293
    w1_reset_select_slave()".

    Based on a patch created by Andreas Hummel.

    [akpm@linux-foundation.org: remove unneeded cast]
    Reported-by: Andreas Hummel
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Polyakov
     

13 Nov, 2008

1 commit

  • Export the w1_read_8 function for use of drivers. The OMAP HDQ
    driver(drivers/w1/masters/omap_hdq.c) uses this function.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Madhusudhan Chikkature
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Madhusudhan Chikkature
     

17 Oct, 2008

3 commits

  • w1_reset_bus, added some comments about the timing and switched to msleep
    for the later delay. I don't have the hardware to test the sleep after
    reset change. The one wire doesn't have a timing requirement between
    commands so it is fine. I do have the USB hardware and it would be in big
    trouble with 10ms interrupt transfers to find that the reset completed.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • Add a strong pullup option to the w1 system. This supplies extra power
    for parasite powered devices. There is a w1_master_pullup sysfs entry and
    enable_pullup module parameter to enable or disable the strong pullup.

    The one wire bus requires at a minimum one wire and ground. The common
    wire is used for sending and receiving data as well as supplying power to
    devices that are parasite powered of which temperature sensors can be one
    example. The bus must be idle and left high while a temperature
    conversion is in progress, in addition the normal pullup resister on
    larger networks or even higher temperatures might not supply enough power.
    The pullup resister can't provide too much pullup current, because
    devices need to pull the bus down to write a value. This enables the
    strong pullup for supported hardware, which can supply more current when
    requested. Unsupported hardware will just delay with the bus high.

    The hardware USB 2490 one wire bus master has a bit on some commands which
    will enable the strong pullup as soon as the command finishes executing.
    To use strong pullup, call the new w1_next_pullup function to register the
    duration. The next write command will call set_pullup before sending the
    data, and reset the duration to zero once it returns.

    Switched from simple_strtol to strict_strtol.

    Signed-off-by: David Fries
    Cc: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • w1_control_thread was removed which would wake up every second and process
    newly registered family codes and complete some final cleanup for a
    removed master. Those routines were moved to the threads that were
    previously requesting those operations. A new function
    w1_reconnect_slaves takes care of reconnecting existing slave devices when
    a new family code is registered or removed. The removal case was missing
    and would cause a deadlock waiting for the family code reference count to
    decrease, which will now happen. A problem with registering a family code
    was fixed. A slave device would be unattached if it wasn't yet claimed,
    then attached at the end of the list, two unclaimed slaves would cause an
    infinite loop.

    The struct w1_bus_master.search now takes a pointer to the struct
    w1_master device to avoid searching for it, which would have caused a
    lock ordering deadlock with the removal of w1_control_thread.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     

23 Jun, 2006

3 commits

  • This patch contains the following possible cleanups:
    - the following file did't #include the header with the prototypes for
    it's global functions:
    - w1_int.c
    - #if 0 the following unused global function:
    - w1_family.c: w1_family_get()
    - make the following needlessly global functions static:
    - w1_family.c: __w1_family_put()
    - w1_io.c: w1_delay()
    - w1_io.c: w1_touch_bit()
    - w1_io.c: w1_read_8()
    - remove the following unused EXPORT_SYMBOL's:
    - w1_family.c: w1_family_put
    - w1_family.c: w1_family_registered

    Signed-off-by: Adrian Bunk
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Evgeniy Polyakov
     
  • From: Andrew Morton

    WARNING: "w1_read_block" [drivers/w1/slaves/w1_therm.ko] undefined!
    WARNING: "w1_write_8" [drivers/w1/slaves/w1_therm.ko] undefined!
    WARNING: "w1_reset_select_slave" [drivers/w1/slaves/w1_therm.ko] undefined!
    WARNING: "w1_reset_bus" [drivers/w1/slaves/w1_ds2433.ko] undefined!
    WARNING: "w1_write_8" [drivers/w1/slaves/w1_ds2433.ko] undefined!
    WARNING: "w1_read_block" [drivers/w1/slaves/w1_ds2433.ko] undefined!
    WARNING: "w1_write_block" [drivers/w1/slaves/w1_ds2433.ko] undefined!
    WARNING: "w1_reset_select_slave" [drivers/w1/slaves/w1_ds2433.ko] undefined!

    Cc: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Andrew Morton
     
  • There are three types of messages between w1 core and userspace:
    1. Events. They are generated each time new master or slave device found
    either due to automatic or requested search.
    2. Userspace commands. Includes read/write and search/alarm search comamnds.
    3. Replies to userspace commands.

    From: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Evgeniy Polyakov
     

24 Mar, 2006

1 commit

  • This patch contains the following cleanups:
    - make needlessly global code static
    - declarations for global code belong into header files
    - w1.c: #if 0 the unused struct w1_slave_device

    Signed-off-by: Adrian Bunk
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Adrian Bunk
     

09 Sep, 2005

1 commit


22 Jun, 2005

3 commits


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds