23 Sep, 2009

40 commits

  • CONFIG_RTC_HCTOSYS allows the kernel to read the system time from the RTC
    at boot and resume, avoiding the need for userspace to do so.
    Unfortunately userspace currently has no way to know whether this
    configuration option is enabled and thus cannot sensibly choose whether to
    run hwclock itself or not. Add a hctosys sysfs attribute which indicates
    whether a given RTC set the system clock.

    Signed-off-by: Matthew Garrett
    Acked-by: Alessandro Zummo
    Cc: Mark Brown
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matthew Garrett
     
  • The sysfs interface to the RTC class drivers is currently undocumented.
    Add some basic documentation defining the semantics of the fields.

    Signed-off-by: Matthew Garrett
    Cc: Mark Brown
    Acked-by: Alessandro Zummo
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matthew Garrett
     
  • Fix two new-ish runtime warnings in the at91rm9200 (etc) RTC:

    Platform driver 'at91_rtc' needs updating - please use dev_pm_ops
    ... by just switching

    IRQ 1/at91_rtc: IRQF_DISABLED is not guaranteed on shared IRQs
    ... no longer needed now that rtc_update_irq() changed

    Signed-off-by: David Brownell
    Acked-by: Alessandro Zummo
    Cc: Andrew Victor
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Error handling code following a kzalloc should free the allocated data.

    The semantic match that finds the problem is as follows:
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @r exists@
    local idexpression x;
    statement S;
    expression E;
    identifier f,f1,l;
    position p1,p2;
    expression *ptr != NULL;
    @@

    x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
    ...
    if (x == NULL) S
    }
    (
    x->f1 = E
    |
    (x->f1 == NULL || ...)
    |
    f(...,x->f1,...)
    )
    ...>
    (
    return \(0\|\|ptr\);
    |
    return@p2 ...;
    )

    @script:python@
    p1 << r.p1;
    p2 << r.p2;
    @@

    print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
    //

    Signed-off-by: Julia Lawall
    Cc: David Brownell
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Julia Lawall
     
  • This code is not executed before ds1307->rtc has been successfully
    initialized to the result of calling rtc_device_register. Thus the test
    that ds1307->rtc is not NULL is always true.

    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @match exists@
    expression x, E;
    statement S1, S2;
    @@

    x = rtc_device_register(...)
    ... when != x = E
    (
    * if (x == NULL || ...) S1 else S2
    |
    * if (x == NULL && ...) S1 else S2
    )
    //

    Signed-off-by: Julia Lawall
    Acked-by: Wolfram Sang
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Julia Lawall
     
  • [ospite@studenti.unina.it: get pcap data from the parent device]
    Signed-off-by: guiming zhuo
    Signed-off-by: Daniel Ribeiro
    Acked-by: Alessandro Zummo
    Signed-off-by: Antonio Ospite
    Cc: Mark Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Ribeiro
     
  • Signed-off-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alessandro Zummo
     
  • Add support for RTC on the Freescale STMP37xx/378x platform.

    Signed-off-by: dmitry pervushin
    Signed-off-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    dmitry pervushin
     
  • The Blackfin RTC IRQ is an internal interrupt, so it makes no sense to
    have it be shared.

    Signed-off-by: Michael Hennerich
    Signed-off-by: Mike Frysinger
    Signed-off-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Hennerich
     
  • Signed-off-by: Mike Frysinger
    Cc: David Brownell
    Signed-off-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     
  • This adds a driver for the RTC COH 901 331 found in the ST-Ericsson U300
    series mobile platforms to the RTC subsystem. It integrates to the ARM
    kernel support recently added to RMKs ARM tree and will be enabled in the
    U300 defconfig in due time.

    Signed-off-by: Linus Walleij
    Signed-off-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Linus Walleij
     
  • This adds a driver for Freescale's MXC internal real time clock modules.

    The code is taken from Freescale's BSPs, but modified to fit the current
    kernel coding mechanisms. Also, the PMIC external clock function was
    removed for now to not add dead bits and keep the code as simple as
    possible.

    [akpm@linux-foundation.org: make PIE_BIT_DEF[] static]
    Signed-off-by: Daniel Mack
    Cc: Sascha Hauer
    Signed-off-by: Alessandro Zummo

    Cc: Alessandro Zummo
    Cc: Daniel Mack
    Cc: Sascha Hauer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Mack
     
  • Signed-off: Chris Verges
    Cc: Christian Pellegrin
    Cc: Alessandro Zummo
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Verges
     
  • Add support for the Philips/NXP PCF2123 RTC.

    Signed-off: Chris Verges
    Tested-by: Chris Verges
    Signed-off: Christian Pellegrin
    Tested-by: Christian Pellegrin
    Cc: Alessandro Zummo
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Verges
     
  • Support two new half-duplex SPI implementation restrictions, for links
    that talk to TX-only or RX-only devices. (Existing half-duplex flavors
    support both transfer directions, just not at the same time.)

    Move spi_async() into the spi.c core, and stop inlining it. Then make
    that function perform error checks and reject messages that demand more
    than the underlying controller can support.

    Based on a patch from Marek Szyprowski which did this only for the
    bitbanged GPIO driver.

    Cc: Marek Szyprowski
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • tAdd adds McSPI support for OMAP4430 SDP platform. All the base addresses
    are changed between OMAP1/2/3 and OMAP4. The fields of the resource
    structures are filled at runtime to have McSPI support on OMAP4.

    Signed-off-by: Syed Rafiuddin
    Acked-by: Kevin Hilman
    Acked-by: Tony Lindgren
    Acked-by: Santosh Shilimkar
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Syed Rafiuddin
     
  • Previous restore was lazy and only restored CHxCONF when it was needed by
    a specific chip select. This could cause occasional errors on an SPI bus
    where multiple chip selects are in use.

    Signed-off-by: Tero Kristo
    Signed-off-by: Kevin Hilman
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tero Kristo
     
  • Add context save/restore feature to McSPI driver.

    Signed-off-by: Hemanth V
    Reviewed-by: Aaro Koskinen
    Signed-off-by: Kevin Hilman
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hemanth V
     
  • Add SPI driver for Freescale STMP 3xxx-based boards

    [dbrownell@users.sourceforge.net: cleanup sequence, spi_unregister_master]
    Signed-off-by: dmitry pervushin
    Signed-off-by: David Brownell
    Cc: Kumar Gala
    Cc: Timur Tabi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    dmitry pervushin
     
  • With the update to the spi_bitbang driver, the transfer setup code is
    being called more often, and thus is often re-doing calculations that have
    been done before. The SPI layer allows our driver to add its own data to
    each device so add a result cache to each device.

    This should also remove the problem where we where directly setting up
    registers in the setup call which meant we might overwrite the state of an
    extant transfer.,

    Signed-off-by: Ben Dooks
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • Change the spi_s3c24xx driver to use dev_pm_ops to avoid the following
    warning during probe:

    Platform driver 's3c2410-spi' needs updating - please use dev_pm_ops

    Signed-off-by: Ben Dooks
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • Change the use of (res->end - res->start) to use resource_size() to
    get the size of the resource.

    Signed-off-by; Ben Dooks
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • The driver includes where it should be including
    and also includes and without using anything
    from these.

    Signed-off-by: Ben Dooks
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • Fix spelling of `automatically' in Documentation/spi/spi-summary.

    Signed-off-by: Ben Dooks
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • Register pxa2xx_spi earlier so it can be used with cpufreq

    Signed-off-by: Daniel Ribeiro
    Acked-by: Mark Brown
    Cc: David Brownell
    Cc: Eric Miao
    Cc: Mark Brown
    Cc: Daniel Ribeiro
    Cc: Samuel Ortiz
    Cc: Liam Girdwood
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Antonio Ospite
     
  • This makes it consistent with other buses (platform, i2c, vio, ...). I'm
    not sure why we use the prefixes, but there must be a reason.

    This was easy enough to do it, and I did it.

    Signed-off-by: Anton Vorontsov
    Cc: David Brownell
    Cc: David Woodhouse
    Cc: Grant Likely
    Cc: Jean Delvare
    Cc: Ben Dooks
    Cc: Benjamin Herrenschmidt
    Cc: Dmitry Torokhov
    Cc: Samuel Ortiz
    Cc: "John W. Linville"
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     
  • Make the code a little bit nicer, and shorter.

    Signed-off-by: Anton Vorontsov
    Cc: Kaiwan N Billimoria
    Cc: David Brownell
    Cc: David Woodhouse
    Cc: Grant Likely
    Cc: Jean Delvare
    Cc: Ben Dooks
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     
  • Make the code a little bit nicer, and shorter.

    Signed-off-by: Anton Vorontsov
    Cc: Marc Pignat
    Cc: David Brownell
    Cc: David Woodhouse
    Cc: Grant Likely
    Cc: Jean Delvare
    Cc: Ben Dooks
    Cc: Benjamin Herrenschmidt
    Acked-by: Marc Pignat
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     
  • The alias isn't needed any longer since the m25p80 driver converted to the
    module device table matching.

    Signed-off-by: Anton Vorontsov
    Cc: David Brownell
    Cc: David Woodhouse
    Cc: Grant Likely
    Cc: Jean Delvare
    Cc: Ben Dooks
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     
  • With this patch spi drivers can use standard spi_driver.id_table and
    MODULE_DEVICE_TABLE() mechanisms to bind against the devices. Just like
    we do with I2C drivers.

    This is useful when a single driver supports several variants of devices
    but it is not possible to detect them in run-time (like non-JEDEC chips
    probing in drivers/mtd/devices/m25p80.c), and when platform_data usage is
    overkill.

    This patch also makes life a lot easier on OpenFirmware platforms, since
    with OF we extensively use proper device IDs in modaliases.

    Signed-off-by: Anton Vorontsov
    Cc: David Brownell
    Cc: David Woodhouse
    Cc: Grant Likely
    Cc: Jean Delvare
    Cc: Ben Dooks
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     
  • This driver has been tested on i.MX1/i.MX27/i.MX35 with an AT25 type
    EEPROM and on i.MX27/i.MX31 with a Freescale MC13783 PMIC.

    Signed-off-by: Sascha Hauer
    Tested-by: Guennadi Liakhovetski
    Acked-by: David Brownell
    Cc: Andrea Paterniani
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sascha Hauer
     
  • This makes the PL022 driver a default choice for any RealView and
    Versatile boards plus the integrator IMPD1 which all contain the PL022
    PrimeCell. This will make it a default choice if and only if a user
    selects SPI support for their board.

    Signed-off-by: Linus Walleij
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    linus.walleij@stericsson.com
     
  • Add missing kernel-doc notation in spi.h for struct spi_master:

    Warning(include/linux/spi/spi.h:289): No description found for parameter 'mode_bits'
    Warning(include/linux/spi/spi.h:289): No description found for parameter 'flags'

    Signed-off-by: Randy Dunlap
    Acked-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • This adds a SPI driver for the SPI controller found in the IBM/AMCC
    4xx PowerPC's.

    Signed-off-by: Stefan Roese
    Signed-off-by: Wolfgang Ocker
    Acked-by: Josh Boyer
    Signed-off-by: Steven A. Falco
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Steven A. Falco
     
  • Convert bit shifted values into BIT format

    Signed-off-by: Jouni Hogander
    Signed-off-by: Tony Lindgren
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jouni Hogander
     
  • This driver is in a non working state at the moment and will be replaced
    by a bitbang driver which can also handle the newer i.MX variants

    Signed-off-by: Sascha Hauer
    Cc: Guennadi Liakhovetski
    Acked-by: David Brownell
    Acked-by: Andrea Paterniani
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sascha Hauer
     
  • We want to check for s_inode's existence, not inode's one (inode is always
    valid in this function).

    This takes care of the following entry from Dan's list:

    fs/ncpfs/ioctl.c +445 __ncp_ioctl(180) warning: variable derefenced before check 'inode'

    Reported-by: Dan Carpenter
    Cc: Julia Lawall
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Cc: Petr Vandrovec
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bartlomiej Zolnierkiewicz
     
  • Noticed-by: Joe Perches
    Cc: Petr Vandrovec
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bartlomiej Zolnierkiewicz
     
  • This function uses signed integers for the unix_date and local variables -
    if a negative number is supplied and the leap-year condition is not met,
    month will be 0, leading to a later read of day_n[-1]

    Signed-off-by: Roel Kluin
    Cc: Petr Vandrovec
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roel Kluin
     
  • initramfs userspace likes to use this magic number.

    Cc: Hugh Dickins
    Signed-off-by: maximilian attems
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    maximilian attems