08 Jan, 2014

2 commits

  • Convert to the safer gpiod_* family of API functions.

    Signed-off-by: Heikki Krogerus
    Signed-off-by: Mika Westerberg
    Tested-by: Stephen Warren
    Acked-by: Johannes Berg
    Signed-off-by: Linus Walleij

    Heikki Krogerus
     
  • Commit c67d0f29262b ("ARM: s3c24xx: get rid of custom ")
    removed the usage of mach/gpio.h file, but we need to include>
    plat/gpio-cfg.h to avoid following build error.

    Fixes following build error.
    drivers/leds/leds-s3c24xx.c: In function ‘s3c24xx_led_probe’:
    drivers/leds/leds-s3c24xx.c:100:2: error: implicit declaration of
    function ‘s3c_gpio_setpull’ [-Werror=implicit-function-declaration]

    Signed-off-by: Tushar Behera
    Acked-by: Bryan Wu
    Signed-off-by: Linus Walleij

    Tushar Behera
     

02 Jan, 2014

5 commits


24 Dec, 2013

1 commit


21 Dec, 2013

2 commits

  • This isolates the custom S3C64xx GPIO definition table to
    as this is
    used in a few different places in the kernel, removing the
    need to depend on the implicit inclusion of
    from and thus getting rid of a few nasty
    cross-dependencies.

    Also delete the CONFIG_SAMSUNG_GPIO_EXTRA stuff. Instead
    roof the number of GPIOs for this platform:
    First sum up all the GPIO banks from A to Q: 187 GPIOs.
    Add the 16 "board GPIOs" and the roof for SAMSUNG_GPIO_EXTRA,
    128, so in total maximum 187+16+128 = 331 GPIOs, so let's
    take the same roof as for S3C24XX: 512. This way we can do
    away with the GPIO calculation macros for GPIO_BOARD_START,
    BOARD_NR_GPIOS and the definition of ARCH_NR_GPIOS.

    Cc: Mark Brown
    [on Mini6410 board]
    Tested-by: Tomasz Figa
    [for changes in mach-s3c64xx]
    Acked-by: Tomasz Figa
    Tested-by: Mark Brown
    Acked-by: Kukjin Kim
    Signed-off-by: Linus Walleij

    Linus Walleij
     
  • This isolates the custom S3C24xx GPIO definition table to
    as this is
    used in a few different places in the kernel, removing the
    need to depend on the implicit inclusion of
    from and thus getting rid of a few nasty
    cross-dependencies.

    We also delete the nifty CONFIG_S3C24XX_GPIO_EXTRA stuff.
    The biggest this can ever be for the S3C24XX is
    CONFIG_S3C24XX_GPIO_EXTRA = 128, and then for CPU_S3C2443 or
    CPU_S3C2416 32*12 GPIOs are added, so 32*12+128 = 512
    is the absolute roof value on this platform. So we set
    the size of ARCH_NR_GPIO to this and the GPIOs array will
    fit any S3C24XX platform, as per pattern from other archs.

    ChangeLog v2->v3:
    - Move the movement of the S3C64XX gpio.h file out of
    this patch and into the follow-up patch where it belongs.
    ChangeLog v1->v2:
    - Added an #ifdef ARCH_S3C24XX around the header inclusion
    in drivers/gpio/gpio-samsung.c as we would otherwise
    have colliding definitions when compiling S3C64XX.
    - Rename inclusion guard in the header file.

    Cc: Tomasz Figa
    Cc: Sylwester Nawrocki
    Cc: Ben Dooks
    Cc: linux-samsung-soc@vger.kernel.org
    Acked-by: Kukjin Kim
    Acked-by: Heiko Stuebner
    Tested-by: Heiko Stuebner
    Signed-off-by: Linus Walleij

    Linus Walleij
     

20 Dec, 2013

4 commits


13 Dec, 2013

3 commits

  • Doing this allows drivers to distinguish between a real error case (if
    there was an error when we tried to resolve the GPIO) and when the optional
    GPIO line was not available.

    Signed-off-by: Mika Westerberg
    Acked-by: Alexandre Courbot
    Acked-by: Rafael J. Wysocki
    Signed-off-by: Linus Walleij

    Mika Westerberg
     
  • This allows the module to be loaded automatically.

    Signed-off-by: Stephen Boyd
    Signed-off-by: Linus Walleij

    Stephen Boyd
     
  • Some devices drivers make use of optional GPIO parameters. For such
    drivers, it is important to discriminate between the case where no
    GPIO mapping has been defined for the function they are requesting, and
    the case where a mapping exists but an error occured while resolving it
    or when acquiring the GPIO.

    This patch changes the family of gpiod_get() functions such that they
    will return -ENOENT if and only if no GPIO mapping is defined for the
    requested function. Other error codes are used when an actual error
    occured during the GPIO resolution.

    Signed-off-by: Alexandre Courbot
    Reviewed-by: Andy Shevchenko
    Reviewed-by: Mika Westerberg
    Signed-off-by: Linus Walleij

    Alexandre Courbot
     

12 Dec, 2013

3 commits

  • GPIO32 is a standard optional extension to the Xtensa architecture
    core that provides preconfigured output and input ports for intra
    SoC signaling. The GPIO32 option is implemented as 32bit Tensilica
    Instruction Extension (TIE) output state called EXPSTATE, and 32bit
    input wire called IMPWIRE. This driver treats input and output
    states as two distinct devices.

    v3:
    * Use BUG() in xtensa_impwire_set_value() to indicate that
    it should never be called (Linus Walleij)
    v2:
    * Address the comments of Linus Walleij:
    - Add a few comments
    - Expand commit log message
    - Use the BIT() macro for bit offsets
    - Rewrite CPENABLE handling as static inlines
    - Use device_initcall()
    * Depend on !SMP for reason explained in the comments (Marc Gauthier)
    * Use XCHAL_CP_ID_XTIOP to enable/disable GPIO32 only

    Signed-off-by: Baruch Siach
    Signed-off-by: Linus Walleij

    Baruch Siach
     
  • - Removed excess "spi" field from private data.
    - Removed excess check for spi_get_drvdata() in remove().
    - Removed unneeded message in remove().
    - Simplify error path in probe().
    - Fixed warnings by scripts/checkfile.pl.

    Signed-off-by: Alexander Shiyan
    Signed-off-by: Linus Walleij

    Alexander Shiyan
     
  • Commit 20bc4d5d565159eb2b942bf4b7fae86fba94e32c
    (gpio: 74x164: Add support for the daisy-chaining) introduce check
    for DT for the driver, so driver cannot be used without DT.
    There are no in-tree users of this driver, so remove non-DT support
    completely.

    Signed-off-by: Alexander Shiyan
    Acked-by: Mark Brown
    Signed-off-by: Linus Walleij

    Alexander Shiyan
     

11 Dec, 2013

2 commits


09 Dec, 2013

6 commits

  • The patch just accents that @dev could be NULL.

    There is no functional change.

    Signed-off-by: Andy Shevchenko
    Reviewed-by: Mika Westerberg
    Signed-off-by: Linus Walleij

    Andy Shevchenko
     
  • The patch moves description of the fields to the top of struct definition and
    converts them to the kernel-doc format.

    There is no functional change.

    Signed-off-by: Andy Shevchenko
    Acked-by: Alexandre Courbot
    Reviewed-by: Mika Westerberg
    Signed-off-by: Linus Walleij

    Andy Shevchenko
     
  • In several places we are printing messages with prefix based on chip->label.
    Introduced macros help us to do this easier and in uniform way.

    Signed-off-by: Andy Shevchenko
    Reviewed-by: Alexandre Courbot
    Signed-off-by: Linus Walleij

    Andy Shevchenko
     
  • This patch includes the following amendments:
    1) use "?" as a label when the last one is not defined in gpiod_*;
    2) whenever it's possible gpiod_* are used;
    3) print a function name, if it's already used in other messages.

    Additionally it fixes an indentation in few places.

    Signed-off-by: Andy Shevchenko
    Acked-by: Alexandre Courbot
    Reviewed-by: Alexandre Courbot
    Reviewed-by: Mika Westerberg
    Signed-off-by: Linus Walleij

    Andy Shevchenko
     
  • Change the format of the platform GPIO lookup tables to make them less
    confusing and improve lookup efficiency.

    The previous format was a single linked-list that required to compare
    the device name and function ID of every single GPIO defined for each
    lookup. Switch that to a list of per-device tables, so that the lookup
    can be done in two steps, omitting the GPIOs that are not relevant for a
    particular device.

    The matching rules are now defined as follows:
    - The device name must match *exactly*, and can be NULL for GPIOs not
    assigned to a particular device,
    - If the function ID in the lookup table is NULL, the con_id argument of
    gpiod_get() will not be used for lookup. However, if it is defined, it
    must match exactly.
    - The index must always match.

    Signed-off-by: Alexandre Courbot
    Acked-by: Mika Westerberg
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Linus Walleij

    Alexandre Courbot
     
  • Linux 3.13-rc3

    Linus Walleij
     

07 Dec, 2013

6 commits

  • Linus Torvalds
     
  • …t/rostedt/linux-trace

    Pull tracing fix from Steven Rostedt:
    "A regression showed up that there's a large delay when enabling all
    events. This was prevalent when FTRACE_SELFTEST was enabled which
    enables all events several times, and caused the system bootup to
    pause for over a minute.

    This was tracked down to an addition of a synchronize_sched()
    performed when system call tracepoints are unregistered.

    The synchronize_sched() is needed between the unregistering of the
    system call tracepoint and a deletion of a tracing instance buffer.
    But placing the synchronize_sched() in the unreg of *every* system
    call tracepoint is a bit overboard. A single synchronize_sched()
    before the deletion of the instance is sufficient"

    * tag 'trace-fixes-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
    tracing: Only run synchronize_sched() at instance deletion time

    Linus Torvalds
     
  • Pull aio fix from Benjamin LaHaise:
    "AIO fix from Gu Zheng that fixes a GPF that Dave Jones uncovered with
    trinity"

    * git://git.kvack.org/~bcrl/aio-next:
    aio: clean up aio ring in the fail path

    Linus Torvalds
     
  • Pull SCSI fixes from James Bottomley:
    "This is a set of nine fixes (and one author update).

    The libsas one should fix discovery in eSATA devices, the WRITE_SAME
    one is the largest, but it should fix a lot of problems we've been
    getting with the emulated RAID devices (they've been effectively lying
    about support and then firmware has been choking on the commands).

    The rest are various crash, hang or warn driver fixes"

    * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
    [SCSI] bfa: Fix crash when symb name set for offline vport
    [SCSI] enclosure: fix WARN_ON in dual path device removing
    [SCSI] pm80xx: Tasklets synchronization fix.
    [SCSI] pm80xx: Resetting the phy state.
    [SCSI] pm80xx: Fix for direct attached device.
    [SCSI] pm80xx: Module author addition
    [SCSI] hpsa: return 0 from driver probe function on success, not 1
    [SCSI] hpsa: do not discard scsi status on aborted commands
    [SCSI] Disable WRITE SAME for RAID and virtual host adapter drivers
    [SCSI] libsas: fix usage of ata_tf_to_fis

    Linus Torvalds
     
  • Pull IMA fixes from James Morris:
    "Here are two more fixes for IMA"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
    ima: properly free ima_template_entry structures
    ima: Do not free 'entry' before it is initialized

    Linus Torvalds
     
  • Pull devicetree fixes from Rob Herring:
    - Various DT binding documentation updates
    - Add Kumar Gala and remove Stephen Warren as DT binding maintainers

    * tag 'dt-fixes-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
    dt: binding: reword PowerPC 8xxx GPIO documentation
    ARM: tegra: delete nvidia,tegra20-spi.txt binding
    hwmon: ntc_thermistor: Fix typo (pullup-uV -> pullup-uv)
    of: add vendor prefix for GMT
    clk: exynos: Fix typos in DT bindings documentation
    of: Add vendor prefix for LG Corporation
    Documentation: net: fsl-fec.txt: Add phy-supply entry
    ARM: dts: doc: Document missing binding for omap5-mpu
    dt-bindings: add ARMv8 PMU binding
    MAINTAINERS: remove swarren from DT bindings
    MAINTAINERS: Add Kumar to Device Tree Binding maintainers group

    Linus Torvalds
     

06 Dec, 2013

6 commits

  • Clean up the aio ring file in the fail path of aio_setup_ring
    and ioctx_alloc. And maybe it can fix the GPF issue reported by
    Dave Jones:
    https://lkml.org/lkml/2013/11/25/898

    Signed-off-by: Gu Zheng
    Signed-off-by: Benjamin LaHaise

    Gu Zheng
     
  • …r/linux-integrity into for-linus

    James Morris
     
  • Pull power management fixes from Rafael Wysocki:

    - cpufreq regression fix from Bjørn Mork restoring the pre-3.12
    behavior of the framework during system suspend/hibernation to avoid
    garbage sysfs files from being left behind in case of a suspend error

    - PNP regression fix to restore the correct states of devices after
    resume from hibernation broken in 3.12. From Dmitry Torokhov.

    - cpuidle fix to prevent cpuidle device unregistration from crashing
    due to a NULL pointer dereference if cpuidle has been disabled from
    the kernel command line. From Konrad Rzeszutek Wilk.

    - intel_idle fix for the C6 state definition on Intel Avoton/Rangeley
    processors from Arne Bockholdt.

    - Power capping framework fix to make the energy_uj sysfs attribute
    work in accordance with the documentation. From Srinivas Pandruvada.

    - epoll fix to make it ignore the EPOLLWAKEUP flag if the kernel has
    been compiled with CONFIG_PM_SLEEP unset (in which case that flag
    should not have any effect). From Amit Pundir.

    - cpufreq fix to prevent governor sysfs files from being lost over
    system suspend/resume in some (arguably unusual) situations. From
    Viresh Kumar.

    * tag 'pm-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    PowerCap: Fix mode for energy counter
    PNP: fix restoring devices after hibernation
    cpuidle: Check for dev before deregistering it.
    epoll: drop EPOLLWAKEUP if PM_SLEEP is disabled
    cpufreq: fix garbage kobjects on errors during suspend/resume
    cpufreq: suspend governors on system suspend/hibernate
    intel_idle: Fixed C6 state on Avoton/Rangeley processors

    Linus Torvalds
     
  • * pm-epoll:
    epoll: drop EPOLLWAKEUP if PM_SLEEP is disabled

    * pnp:
    PNP: fix restoring devices after hibernation

    * powercap:
    PowerCap: Fix mode for energy counter

    Rafael J. Wysocki
     
  • * pm-cpuidle:
    cpuidle: Check for dev before deregistering it.
    intel_idle: Fixed C6 state on Avoton/Rangeley processors

    * pm-cpufreq:
    cpufreq: fix garbage kobjects on errors during suspend/resume
    cpufreq: suspend governors on system suspend/hibernate

    Rafael J. Wysocki
     
  • Pull arch/tile ftrace bug fix from Chris Metcalf:
    "This fixes a build failure with allyesconfig reported by Fengguang Wu
    and fixed by Tony Lu"

    * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
    ftrace: default to tilegx if ARCH=tile is specified

    Linus Torvalds