26 Mar, 2009

1 commit


19 Mar, 2009

1 commit


13 Mar, 2009

2 commits

  • The context makes it clear already that these are clocks, so there's
    no need for such a suffix. This patch only changes the clocks actually
    used in the tree. The remaining clocks are renamed in the subsequent
    architecture specific patches.

    Signed-off-by: Sascha Hauer

    Sascha Hauer
     
  • W1 master implementations are expected to return 0 or 1 from their
    read_bit() function. However, not all platforms do return these values
    from gpio_get_value() - namely PXAs won't. Hence the w1 gpio-master needs
    to break the result down to 0 or 1 itself.

    Signed-off-by: Daniel Mack
    Cc: Ville Syrjala
    Cc: Evgeniy Polyakov
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Mack
     

28 Feb, 2009

2 commits


12 Feb, 2009

1 commit

  • Addresses http://bugzilla.kernel.org/show_bug.cgi?id=12646

    When the temperature exceeds 32767 milli-degrees the temperature overflows
    to -32768 millidegrees. These are bothe well within the -55 - +125 degree
    range for the sensor.

    Fix overflow in left-shift of a u8.

    Signed-off-by: Ian Dall
    Signed-off-by: Evgeniy Polyakov
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Dall
     

09 Feb, 2009

1 commit


09 Jan, 2009

8 commits

  • Send completion status of the commands to the userspace. Message and
    protocol are described in the documentation.

    Signed-off-by: Evgeniy Polyakov
    Cc: Paul Alfille
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Polyakov
     
  • Command which allows to reset the bus.

    Signed-off-by: Evgeniy Polyakov
    Cc: Paul Alfille
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Polyakov
     
  • Signed-off-by: Evgeniy Polyakov
    Cc: Paul Alfille
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Polyakov
     
  • This small patchset extendes existing commands with reset, master IO and
    status messages. Reset is used to reset the bus for given master device,
    master IO command allows to initiate IO against bus itself not selecting
    slave device first, which can be used to probe the device for example.
    And status messages carry command completion status back to the userspace
    (namely very useful to get -ENODEV from when requested device was not
    found).

    Great thanks to Paul Alfille of OWFS for testing and commands suggestions.

    This patch:

    Allow starting of IO not against already found slave devices, but against
    the bus itself, which can be used for example to probe devices.

    [akpm@linux-foundation.org: reindent switch statements]
    Signed-off-by: Evgeniy Polyakov
    Cc: Paul Alfille
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Polyakov
     
  • Initiates search (or alarm search) and returns all found devices to
    userspace. Found devices are not added into the system (i.e. they are
    not attached to family devices or bus masters), it will be done via (if
    was not done yet) usual timed searching.

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

    Evgeniy Polyakov
     
  • Writes and returns sampled data back to userspace.

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

    Evgeniy Polyakov
     
  • This patch series introduces and extends several userspace commands
    used with netlink protocol.

    Touch block command allows to write data and return sampled data to
    the userspace.

    Extended search and alarm seach commands to return list of slave
    devices found during given search.

    List masters command allows to send all registered master IDs to the
    userspace.

    Great thanks to Paul Alfille (owfs) who
    tested this implementation and wrote w1-to-network daemon
    http://sourceforge.net/projects/w1repeater/ and

    Frederik Deweerdt and Randy Dunlap for review.

    This patch:

    Returns list of registered bus master devices.

    Signed-off-by: Evgeniy Polyakov
    Cc: Paul Alfille
    Cc: Frederik Deweerdt
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Polyakov
     
  • This patch adds support for the 1-wire master interface for i.MX27 and
    i.MX31.

    Signed-off-by: Luotao Fu
    Signed-off-by: Sascha Hauer
    Signed-off-by: Evgeniy Polyakov
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sascha Hauer
     

07 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
     

01 Dec, 2008

1 commit


20 Nov, 2008

1 commit

  • OMAP LDP boot crash. This is because w1 subsystem changed the search
    interface, so update omap_hdq's search interface to follow the change.

    Signed-off-by: Stanley.Miao
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stanley.Miao
     

13 Nov, 2008

3 commits

  • Provide the BQ27000 slave interface driver.

    Signed-off-by: Madhusudhan Chikkature
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Madhusudhan Chikkature
     
  • The HDQ/1-Wire module of TI OMAP2430/3430 platforms implement the hardware
    protocol of the master functions of the Benchmark HDQ and the Dallas
    Semiconductor 1-Wire protocols. These protocols use a single wire for
    communication between the master (HDQ/1-Wire controller) and the slave
    (HDQ/1-Wire external compliant device).

    This patch provides the HDQ driver to suppport TI OMAP2430/3430 platforms.

    Signed-off-by: Madhusudhan Chikkature
    Acked-by: Felipe Balbi
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Madhusudhan Chikkature
     
  • 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
     

20 Oct, 2008

1 commit

  • Tejun's commit 7b595756ec1f49e0049a9e01a1298d53a7faaa15 made sysfs
    attribute->owner unnecessary. But the field was left in the structure to
    ease the merge. It's been over a year since that change and it is now
    time to start killing attribute->owner along with its users - one arch at
    a time!

    This patch is attempt #1 to get rid of attribute->owner only for
    CONFIG_X86_64 or CONFIG_X86_32 . We will deal with other arches later on
    as and when possible - avr32 will be the next since that is something I
    can test. Compile (make allyesconfig / make allmodconfig / custom config)
    and boot tested.

    akpm: the idea is that we put the declaration of sttribute.owner inside
    `#ifndef CONFIG_X86'. But that proved to be too ambitious for now because
    new usages kept on turning up in subsystem trees.

    [akpm: remove the ifdef for now]
    Signed-off-by: Parag Warudkar
    Cc: Greg KH
    Cc: Ingo Molnar
    Cc: Tejun Heo
    Cc: Len Brown
    Cc: Jens Axboe
    Cc: Jean Delvare
    Cc: Roland Dreier
    Cc: David Brownell
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Parag Warudkar
     

17 Oct, 2008

16 commits

  • [akpm@linux-foundation.org: minor fixlets and cleanups]
    Signed-off-by: Bernhard Weirich
    Signed-off-by: Evgeniy Polyakov
    Cc: Ben Gardner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bernhard Weirich
     
  • Optimize the ds_set_pullup function. For a strong pullup to be sent the
    ds2490 has to have both the strong pullup mode enabled, and the specific
    write operation has to have the SPU bit enabled. Previously the write
    always had the SPU bit enabled and both the duration and model was set
    when a strong pullup was requested. Now the strong pullup mode is enabled
    at initialization time, the delay is updated only when the value changes,
    and the write SPU bit is set only when a strong pullup is required. This
    removes two or three bus transactions per strong pullup request.

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

    David Fries
     
  • Drop the extra ds_wait_status() in ds_write_block().

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

    David Fries
     
  • This replaces some magic numbers with marcos and corrects one marco.

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

    David Fries
     
  • Reset the device in init as it can be in a bad state. This is necessary
    because a block write will wait for data to be placed in the output buffer
    and block any later commands which will keep accumulating and the device
    will not be idle. Another case is removing the ds2490 module while a bus
    search is in progress, somehow a few commands get through, but the input
    transfers fail leaving data in the input buffer. This will cause the next
    read to fail see the note in ds_recv_data.

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

    David Fries
     
  • ds_reset no longer calls ds_wait_status, the result wasn't used and it
    would only delay the following data operations.

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

    David Fries
     
  • - add result register #defines
    - rename ds_dump_status to ds_print_msg
    - rename ds_recv_status to ds_dump_status
    - ds_dump_status prints the requested status and no longer reads the
    status, this is because the second status read can return different
    data for example the result register
    - the result register will be printed, though limited to detecting a
    new device, detecting other values such as a short would require
    additional reporting methods
    - ST_EPOF was moved to ds_wait_status to clear the error condition
    sooner

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

    David Fries
     
  • Simplify and fix ds_touch_bit. If a device is attached in the middle of a
    bus search the status register will return more than the default 16 bytes.
    The additional bytes indicate that it has detected a new device. The way
    ds_wait_status is coded, if it doesn't read 16 status bytes it returns an
    error value. ds_touch_bit then will detect that error and return an
    error. In that case it doesn't read the input buffer and returns
    uninitialized data. It doesn't stop there. The next transaction will not
    expect the extra byte in the input buffer and the short read will cause an
    error and clear out both the old byte and new data in the input buffer.

    Just ignore the value of ds_wait_status. It is still required to wait
    until ds2490 is again idle and there is data to read when ds_recv_data is
    called. This also removes the while loop. None of the other commands
    wait and verify that the issued command is in the status register.

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

    David Fries
     
  • Don't export read and write bit operations, they didn't work, they weren't
    used, and they can't be made to work. The one wire low level bit
    operations expect to set high or low levels, the ds2490 hardware only
    supports complete read or write time slots, better to just comment them
    out.

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

    David Fries
     
  • ds_write_bit doesn't read the input buffer, so add COMM_ICP and a comment
    that it will no longer generate a read back data byte. If there is an
    extra data byte later on then it will cause an error and discard what data
    was there. Corrected operator ordering for ds_send_control.

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

    David Fries
     
  • Add strong pullup support for ds2490 driver, also drop mdelay(750), which
    busy waits, usage in favour of msleep for long delays. Now with msleep
    only being called when the strong pullup is active, one wire bus
    operations are only taking minimal system overhead.

    The new set_pullup will only enable the strong pullup when requested,
    which is expected to be the only write operation that will benefit from a
    strong pullup.

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

    David Fries
     
  • Corrected print message, it was writing not reading, this also prints the
    endpoint used for the write instead of hardcoding it. Failed to write
    1-wire data to ep0x%x: err=%d.

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

    David Fries
     
  • Like the previous w1_io.c reset coments and msleep patch, I don't have the
    hardware to verify the change, but I think it is safe. It also helps to
    see a comment like this in the code. "We'll wait a bit longer just to be
    sure." If they are going to calculate delaying 324.9us, but actually delay
    500us, why not just give up the CPU and sleep? This is designed for a
    battery powered ARM system, avoiding busywaiting has to be good for
    battery life.

    I sent a request for testers March 7, 2008 to the Linux kernel mailing
    list and two developers who have patches for ds1wm.c, but I didn't get
    any respons.

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

    David Fries
     
  • 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
     
  • s/printk/dev_dbg/

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

    David Fries
     
  • Follow the example of other devices (like the joystick device). Pick the
    first available id for each detected device. Currently for USB devices,
    suspending and resuming would cause the number to increment.

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

    David Fries