09 Jul, 2011

1 commit

  • This fixes a regression in 3.0 reported by Paul Parsons regarding the
    removal of the msleep(1) in the ds1wm_reset() function:

    : The linux-3.0-rc4 DS1WM 1-wire driver is logging "bus error, retrying"
    : error messages on an HP iPAQ hx4700 PDA (XScale-PXA270):
    :
    :
    : Driver for 1-wire Dallas network protocol.
    : DS1WM w1 busmaster driver - (c) 2004 Szabolcs Gyurko
    : 1-Wire driver for the DS2760 battery monitor chip - (c) 2004-2005, Szabolcs Gyurko
    : ds1wm ds1wm: pass: 1 bus error, retrying
    : ds1wm ds1wm: pass: 2 bus error, retrying
    : ds1wm ds1wm: pass: 3 bus error, retrying
    : ds1wm ds1wm: pass: 4 bus error, retrying
    : ds1wm ds1wm: pass: 5 bus error, retrying
    : ...
    :
    : The visible result is that the battery charging LED is erratic; sometimes
    : it works, mostly it doesn't.
    :
    : The linux-2.6.39 DS1WM 1-wire driver worked OK. I haven't tried 3.0-rc1,
    : 3.0-rc2, or 3.0-rc3.

    This sleep should not be required on normal circuitry provided the
    pull-ups on the bus are correctly adapted to the slaves. Unfortunately,
    this is not always the case. The sleep is restored but as a parameter to
    the probe function in the pdata.

    [akpm@linux-foundation.org: coding-style fixes]
    Reported-by: Paul Parsons
    Tested-by: Paul Parsons
    Signed-off-by: Jean-François Dagenais
    Cc: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean-François Dagenais
     

27 May, 2011

2 commits


29 Mar, 2011

1 commit


23 Mar, 2011

3 commits

  • mfd_get_cell returns a const, so change the ds1wm client to store
    a const mfd cell. This silences type mismatch warnings.

    Since we're guaranteed to have the mfd_cell, we can also simplify
    the code a bit to get rid of a temporary variable and NULL check.

    Signed-off-by: Andres Salomon
    Signed-off-by: Samuel Ortiz

    Andres Salomon
     
  • Use mfd_data for passing information from mfd drivers to mfd
    clients. The mfd_cell's driver_data field is being phased out.

    Clients that were using driver_data now access .mfd_data
    via mfd_get_data(). This changes ds1wm only; mfd drivers with
    other cells are not modified, with the exception of led_cell.

    The led_cell.driver_data line is dropped from htc-pasic3.c in this
    patch as well. It's not used in mainline (there's no leds-pasic3
    platform driver), so it should be safe to take care of that here.

    Signed-off-by: Andres Salomon
    Signed-off-by: Samuel Ortiz

    Andres Salomon
     
  • No need to explicitly set the cell's platform_data/data_size.

    Modify clients to use mfd_get_cell helper function instead of
    accessing platform_data directly.

    Signed-off-by: Andres Salomon
    Signed-off-by: Samuel Ortiz

    Andres Salomon
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

05 Apr, 2009

2 commits

  • This driver requests a clock that usually is supplied by the MFD in which
    the DS1WM is contained. Currently, it is impossible for a MFD to register
    their clocks with the generic clock API due to different implementations
    across architectures.
    For now, this patch removes the clock handling from DS1WM altogether,
    trusting that the MFD enable/disable functions will switch the clock if
    needed. The clock rate is obtained from a new parameter in driver_data.

    Signed-off-by: Philipp Zabel
    Signed-off-by: Samuel Ortiz

    Philipp Zabel
     
  • This patch converts the DS1WM driver into an MFD cell. It also
    calculates the bus_shift parameter from the memory resource size.

    Signed-off-by: Philipp Zabel
    Signed-off-by: Samuel Ortiz

    Philipp Zabel
     

17 Oct, 2008

2 commits

  • 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_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
     

05 Mar, 2008

2 commits

  • The patch replaces dev_dbg() by dev_err(), so the user could actually see the
    error, instead of wondering why w1 doesn't work. The root cause of the bus
    reset error isn't yet debugged though, but this sometimes happens on iPaq
    H5555.

    And while I'm at it, some cosmetic cleanups also made (few lines were using
    spaces instead of tabs).

    Signed-off-by: Anton Vorontsov
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     
  • On the error condition clk_get() returns ERR_PTR(..), so checking for NULL
    doesn't work. ds1wm module causes a kernel oops when ds1wm clock isn't
    registered.

    This patch converts NULL check to IS_ERR(), plus uses PTR_ERR()
    for the return code.

    Signed-off-by: Anton Vorontsov
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     

08 Feb, 2008

1 commit

  • The DS1WM driver incorrectly infers the IAS bit (1-wire interrupt active
    high) from IRQ settings. There are devices that have IAS=0 but still need
    the IRQ to trigger on a rising edge. With this patch, machines with DS1WM
    that need IAS=1 have to set .active_high=1 in the ds1wm_platform_data.

    Signed-off-by: Philipp Zabel
    Acked-by: Evgeniy Polyakov
    Acked-by: Matt Reimer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Philipp Zabel
     

19 Oct, 2007

1 commit

  • Found these while looking at printk uses.

    Add missing newlines to dev_ uses
    Add missing KERN_ prefixes to multiline dev_s
    Fixed a wierd->weird spelling typo
    Added a newline to a printk

    Signed-off-by: Joe Perches
    Cc: "Luck, Tony"
    Cc: Jens Axboe
    Cc: Mark M. Hoffman
    Cc: Roland Dreier
    Cc: Tilman Schmidt
    Cc: David Woodhouse
    Cc: Jeff Garzik
    Cc: Stephen Hemminger
    Cc: Greg KH
    Cc: Jeremy Fitzhardinge
    Cc: Geert Uytterhoeven
    Cc: Alessandro Zummo
    Cc: David Brownell
    Cc: James Smart
    Cc: Andrew Vasquez
    Cc: "Antonino A. Daplas"
    Cc: Evgeniy Polyakov
    Cc: Russell King
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

27 Jul, 2007

1 commit


09 May, 2007

1 commit