19 Nov, 2011

1 commit

  • This converts the remaining USB drivers in the kernel to use the
    module_usb_driver() macro which makes the code smaller and a bit
    simpler.

    Added bonus is that it removes some unneeded kernel log messages about
    drivers loading and/or unloading.

    Cc: Guenter Roeck
    Cc: Jean Delvare
    Cc: Ben Dooks
    Cc: Till Harbaum
    Cc: Karsten Keil
    Cc: Chris Ball
    Cc: David Woodhouse
    Cc: Lauro Ramos Venancio
    Cc: Aloisio Almeida Jr
    Cc: Samuel Ortiz
    Cc: Steve Glendinning
    Cc: Florian Tobias Schandinat
    Cc: Evgeniy Polyakov
    Cc: Wim Van Sebroeck
    Cc: "David S. Miller"
    Cc: Jesper Juhl
    Cc: Artem Bityutskiy
    Cc: Jamie Iles
    Cc: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

26 Aug, 2011

1 commit


27 Jul, 2011

1 commit

  • This allows us to move duplicated code in
    (atomic_inc_not_zero() for now) to

    Signed-off-by: Arun Sharma
    Reviewed-by: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Cc: Eric Dumazet
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     

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
     

16 Jun, 2011

1 commit

  • On m68k (which doesn't support generic hardirqs yet):

    drivers/w1/masters/ds1wm.c: In function `ds1wm_probe':
    drivers/w1/masters/ds1wm.c: error: implicit declaration of function `irq_set_irq_type'

    Signed-off-by: Geert Uytterhoeven
    Cc: Evgeniy Polyakov
    Cc: Jean-Franois Dagenais
    Cc: Matt Reimer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     

27 May, 2011

2 commits


31 Mar, 2011

1 commit


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
     

17 Feb, 2011

1 commit


12 Feb, 2011

1 commit

  • This code makes two calls to clk_get, then test both return values and
    fails if either failed.

    The problem is that in the first inner if, where the first call to
    clk_get has failed, it don't know if the second call has failed as well.
    So it don't know whether clk_get should be called on the result of the
    second call. Of course, it would be possible to test that value again.
    A simpler solution is just to test the result of calling clk_get
    directly after each call.

    The semantic match that finds this problem is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r@
    position p1,p2;
    expression e;
    statement S;
    @@

    e = clk_get@p1(...)
    ...
    if@p2 (IS_ERR(e)) S

    @@
    expression e;
    statement S;
    identifier l;
    position r.p1, p2 != r.p2;
    @@

    *e = clk_get@p1(...)
    ... when != clk_put(e)
    *if@p2 (...)
    {
    ... when != clk_put(e)
    * return ...;
    }//

    Signed-off-by: Julia Lawall
    Cc: Evgeniy Polyakov
    Acked-by: Tony Lindgren
    Acked-by: Amit Kucheria
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Julia Lawall
     

28 Jan, 2011

1 commit

  • We want to have just CONFIG_ARCH_OMAP2, 3 and 4. The rest
    are nowadays just subcategories of these.

    Search and replace the following:

    ARCH_OMAP2420 SOC_OMAP2420
    ARCH_OMAP2430 SOC_OMAP2430
    ARCH_OMAP3430 SOC_OMAP3430

    No functional changes.

    Signed-off-by: Tony Lindgren
    Signed-off-by: Thomas Weber
    Acked-by: Sourav Poddar

    Tony Lindgren
     

25 Apr, 2010

1 commit

  • Fixes the following error:

    drivers/w1/masters/omap_hdq.c: In function 'hdq_wait_for_flag':
    drivers/w1/masters/omap_hdq.c:137: error: implicit declaration of function 'schedule_timeout_uninterruptible'
    drivers/w1/masters/omap_hdq.c: In function 'hdq_write_byte':
    drivers/w1/masters/omap_hdq.c:177: error: 'TASK_UNINTERRUPTIBLE' undeclared (first use in this function)
    drivers/w1/masters/omap_hdq.c:177: error: (Each undeclared identifier is reported only once
    drivers/w1/masters/omap_hdq.c:177: error: for each function it appears in.)
    drivers/w1/masters/omap_hdq.c:177: error: implicit declaration of function 'schedule_timeout'
    drivers/w1/masters/omap_hdq.c: In function 'hdq_isr':
    drivers/w1/masters/omap_hdq.c:221: error: 'TASK_NORMAL' undeclared (first use in this function)
    drivers/w1/masters/omap_hdq.c: In function 'omap_hdq_break':
    drivers/w1/masters/omap_hdq.c:316: error: 'TASK_UNINTERRUPTIBLE' undeclared (first use in this function)

    Signed-off-by: Amit Kucheria
    Acked-by: Tony Lindgren
    Cc: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Amit Kucheria
     

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
     

13 Mar, 2010

2 commits


08 Mar, 2010

1 commit

  • A pointer to omap_hdq_probe is passed to the core via
    platform_driver_register and so the function must not disappear when the
    .init sections are discarded. Otherwise (if also having HOTPLUG=y)
    unbinding and binding a device to the driver via sysfs will result in an
    oops as does a device being registered late.

    An alternative to this patch is using platform_driver_probe instead of
    platform_driver_register plus removing the pointer to the probe function
    from the struct platform_driver.

    Signed-off-by: Uwe Kleine-König
    Cc: Stanley.Miao
    Acked-by: Evgeniy Polyakov
    Cc: Andrew Morton
    Cc: Madhusudhan Chikkature
    Cc: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Uwe Kleine-König
     

16 Feb, 2010

1 commit


05 Oct, 2009

1 commit

  • There is no point in implementing a detect callback for the DS2482, as
    this device can't be detected. It was there solely to handle "force"
    module parameters to instantiate devices, but now we have a better sysfs
    interface that can do the same.

    So we can get rid of the ugly module parameters and the detect callback.
    This shrinks the binary module size by 21%.

    Signed-off-by: Jean Delvare
    Acked-by: Ben Gardner

    Jean Delvare
     

08 Aug, 2009

1 commit


19 Jun, 2009

1 commit

  • On embedded devices, sleep mode conditions can be tricky to handle,
    Especially when processors tend to pull-down the w1 bus during sleep. Bus
    slaves (such as the ds2760) may interpret this as a reason for power-down
    conditions and entirely switch off the device.

    This patch adds a callback function pointer to let users switch on and off
    the external pull-up resistor. This lets the outside world know whether
    the processor is currently actively driving the bus or not.

    When this callback is not provided, the code behaviour won't change.

    Signed-off-by: Daniel Mack
    Acked-by: Ville Syrjala
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Mack
     

13 Jun, 2009

1 commit


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
     

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
     

09 Feb, 2009

1 commit


09 Jan, 2009

1 commit


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

1 commit

  • 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
     

17 Oct, 2008

4 commits

  • 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