06 Nov, 2015

1 commit

  • Pull spi updates from Mark Brown:
    "Quite a lot of activity in SPI this cycle, almost all of it in drivers
    with a few minor improvements and tweaks in the core.

    - Updates to pxa2xx to support Intel Broxton and multiple chip selects.
    - Support for big endian in the bcm63xx driver.
    - Multiple slave support for the mt8173
    - New driver for the auxiliary SPI controller in bcm2835 SoCs.
    - Support for Layerscale SoCs in the Freescale DSPI driver"

    * tag 'spi-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (87 commits)
    spi: pxa2xx: Rework self-initiated platform data creation for non-ACPI
    spi: pxa2xx: Add support for Intel Broxton
    spi: pxa2xx: Detect number of enabled Intel LPSS SPI chip select signals
    spi: pxa2xx: Add output control for multiple Intel LPSS chip selects
    spi: pxa2xx: Use LPSS prefix for defines that are Intel LPSS specific
    spi: Add DSPI support for layerscape family
    spi: ti-qspi: improve ->remove() callback
    spi/spi-xilinx: Fix race condition on last word read
    spi: Drop owner assignment from spi_drivers
    spi: Add THIS_MODULE to spi_driver in SPI core
    spi: Setup the master controller driver before setting the chipselect
    spi: dw: replace magic constant by DW_SPI_DR
    spi: mediatek: mt8173 spi multiple devices support
    spi: mediatek: handle controller_data in mtk_spi_setup
    spi: mediatek: remove mtk_spi_config
    spi: mediatek: Update document devicetree bindings to support multiple devices
    spi: fix kernel-doc warnings about missing return desc in spi.c
    spi: fix kernel-doc warnings about missing return desc in spi.h
    spi: pxa2xx: Align a few defines
    spi: pxa2xx: Save other reg_cs_ctrl bits when configuring chip select
    ...

    Linus Torvalds
     

04 Nov, 2015

1 commit


03 Nov, 2015

23 commits

  • for_each_child_of_node performs an of_node_get on each iteration, so
    a break out of the loop requires an of_node_put.

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

    //
    @@
    local idexpression n;
    expression e,r;
    @@

    for_each_child_of_node(r,n) {
    ...
    (
    of_node_put(n);
    |
    e = n
    |
    + of_node_put(n);
    ? break;
    )
    ...
    }
    ... when != n
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Jacek Anaszewski

    Julia Lawall
     
  • for_each_available_child_of_node performs an of_node_get on each
    iteration, so a break out of the loop requires an of_node_put.

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

    //
    @@
    expression root,e;
    local idexpression child;
    @@

    for_each_available_child_of_node(root, child) {
    ... when != of_node_put(child)
    when != e = child
    (
    return child;
    |
    + of_node_put(child);
    ? return ...;
    )
    ...
    }
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Jacek Anaszewski

    Julia Lawall
     
  • for_each_available_child_of_node performs an of_node_get on each
    iteration, so a break out of the loop requires an of_node_put.

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

    //
    @@
    expression root,e;
    local idexpression child;
    @@

    for_each_available_child_of_node(root, child) {
    ... when != of_node_put(child)
    when != e = child
    (
    return child;
    |
    + of_node_put(child);
    ? return ...;
    )
    ...
    }
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Jacek Anaszewski

    Julia Lawall
     
  • for_each_child_of_node performs an of_node_get on each iteration, so
    a break out of the loop requires an of_node_put.

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

    //
    @@
    expression root,e;
    local idexpression child;
    @@

    for_each_child_of_node(root, child) {
    ... when != of_node_put(child)
    when != e = child
    (
    return child;
    |
    + of_node_put(child);
    ? return ...;
    )
    ...
    }
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Jacek Anaszewski

    Julia Lawall
     
  • Use of resource managed function devm_led_classdev_register to
    make initialization path simpler. Also removed redundant remove
    function.

    Signed-off-by: Fida Mohammad
    Signed-off-by: Jacek Anaszewski

    Fida Mohammad
     
  • Use devm_led_classdev_register instead of led_classdev_register,
    removing the redundant net48xx_led_remove function.

    Signed-off-by: Muhammad Falak R Wani
    Signed-off-by: Jacek Anaszewski

    Muhammad Falak R Wani
     
  • Use resource-managed function devm_led_classdev_register instead
    of led_classdev_register, consequently remove redundant
    menf21bmc_led_remove function.
    Also drop the unneeded label err_free_leds.

    Signed-off-by: Muhammad Falak R Wani
    Signed-off-by: Jacek Anaszewski

    Muhammad Falak R Wani
     
  • Use resource managed function devm_led_classdev_register to make
    initialisation path simpler.
    Also removed redundant led_classdev_unregister function.

    Signed-off-by: Fida Mohammad
    Signed-off-by: Jacek Anaszewski

    Fida Mohammad
     
  • add a shutdown function for setting the gpio-leds
    into off state when shuting down.

    Signed-off-by: Heiko Schocher
    Signed-off-by: Jacek Anaszewski

    Heiko Schocher
     
  • This patch adds more init register configuration options:
    - Serial LEDs multiplexing.
    - Serial LEDs clock signal low/high polarity.
    - Serial LEDs data signal low/high polarity.
    - Serial LEDs shift direction inverted/normal.

    Signed-off-by: Álvaro Fernández Rojas
    Signed-off-by: Jacek Anaszewski

    Álvaro Fernández Rojas
     
  • This patch simplifies and improves the code related to
    default-state handling.
    It also changes the code to power off the LEDs by default.

    Signed-off-by: Álvaro Fernández Rojas
    Signed-off-by: Jacek Anaszewski

    Álvaro Fernández Rojas
     
  • Print invalid LED instead of warning only about maximum LED value.

    Signed-off-by: Álvaro Fernández Rojas
    Signed-off-by: Jacek Anaszewski

    Álvaro Fernández Rojas
     
  • This patch sets the led_classdev max_brightness to the maximum level
    value supported by hardware. This allows to get rid of the brightness
    conversion operation (from software [0:LED_FULL] to hardware ranges) in
    brightness_set().

    Signed-off-by: Simon Guinot
    Signed-off-by: Jacek Anaszewski

    Simon Guinot
     
  • This patch converts the leds-netxbig driver to use the devres functions
    devm_gpio_request_one() and devm_led_classdev_register(). This allows to
    simplify the code a bit.

    Signed-off-by: Simon Guinot
    Signed-off-by: Jacek Anaszewski

    Simon Guinot
     
  • This patch adds device tree support for the netxbig LEDs.

    This also introduces a additionnal DT binding for the GPIO extension bus
    (netxbig-gpio-ext) used to configure the LEDs. Since this bus could also
    be used to control other devices, then it seems more suitable to have it
    in a separate DT binding.

    Signed-off-by: Simon Guinot
    Acked-by: Linus Walleij
    Signed-off-by: Jacek Anaszewski

    Simon Guinot
     
  • This patch adds possibility to invert heartbeat blinking.
    The inverted LED is more time ON then OFF. It's because it looks
    better when the heartbeat LED is next to other LED which is most
    time ON. The invert value is exported same way via sysfs in file
    invert like oneshot. I get inspiration from this trigger.

    Signed-off-by: Jiri Prchal
    Signed-off-by: Jacek Anaszewski

    Jiri Prchal
     
  • Since the API for controlling LED brightness and blinking is defined in
    the LED core, move the related timer and work callbacks to the led-core.c,
    and initialize them through a new led_core_init API.

    Signed-off-by: Jacek Anaszewski
    Acked-by: Andrew Lunn
    Acked-by: Pavel Machek

    Jacek Anaszewski
     
  • Fixes the following randconfig problem

    leds-sead3.c:(.text+0x7dc): undefined reference to `led_classdev_unregister'
    leds-sead3.c:(.text+0x7e8): undefined reference to `led_classdev_unregister'

    Signed-off-by: Ralf Baechle
    Cc: Bryan Wu
    Cc: Richard Purdie
    Cc: Markos Chandras
    Cc: linux-leds@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Signed-off-by: Jacek Anaszewski

    Ralf Baechle
     
  • Spaces at the starting of a line are removed, indentation using
    tab, instead of space. Also, line width of more than 80 characters
    is also taken care of.
    Two warnings are left alone to aid better readability.

    Signed-off-by: Muhammad Falak R Wani
    Signed-off-by: Jacek Anaszewski

    Muhammad Falak R Wani
     
  • Use of resource-managed function devm_led_classdev_register
    instead of led_classdev_register is preferred, consequently
    remove redundant function micro_leds_remove.

    Signed-off-by: Muhammad Falak R Wani
    Signed-off-by: Jacek Anaszewski

    Muhammad Falak R Wani
     
  • Use resource-managed function devm_led_classdev_register
    instead of led_classdev_register to make the error path simpler.
    The goto is replaced with direct return, unneeded label err is
    dropped. Also, remove redundant ot200_led_remove.

    Signed-off-by: Muhammad Falak R Wani
    Signed-off-by: Jacek Anaszewski

    Muhammad Falak R Wani
     
  • Use resource-managed function devm_led_classdev_register
    instead of led_classdev_register to simplify error path.
    An unnecessary check of ret is replaced with a direct return
    Also, remove redundant hp6xxled_remove.

    Signed-off-by: Muhammad Falak R Wani
    Signed-off-by: Jacek Anaszewski

    Muhammad Falak R Wani
     
  • Use resource-managed function devm_led_classdev_register instead
    of led_classdev_register to make the error-path simpler.

    To be compatible with the change, goto is replaced with direct
    return, unneeded label err_null is dropped and unnecessary variable
    retval is removed. Also, remove redundant cobalt_qube_led_remove.

    Signed-off-by: Vaishali Thakkar
    Signed-off-by: Jacek Anaszewski

    Vaishali Thakkar
     

28 Oct, 2015

1 commit


17 Sep, 2015

9 commits


05 Sep, 2015

1 commit

  • Pull backlight updates from Lee Jones:
    - Stop using LP855X Platform Data to control regulators
    - Move PWM8941 WLED driver into Backlight
    - Remove invalid use of IS_ERR_VALUE() macro
    - Remove duplicate check for NULL data before unregistering
    - Export I2C Device ID structure

    * tag 'backlight-for-linus-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
    backlight: tosa: Export I2C module alias information
    backlight: lp8788_bl: Delete a check before backlight_device_unregister()
    backlight: sky81452: Remove unneeded use of IS_ERR_VALUE() macro
    backlight: pm8941-wled: Move PM8941 WLED driver to backlight
    backlight: lp855x: Use private data for regulator control

    Linus Torvalds
     

04 Sep, 2015

1 commit

  • Pull powerpc updates from Michael Ellerman:

    - support "hybrid" iommu/direct DMA ops for coherent_mask < dma_mask
    from Benjamin Herrenschmidt

    - EEH fixes for SRIOV from Gavin

    - introduce rtas_get_sensor_fast() for IRQ handlers from Thomas Huth

    - use hardware RNG for arch_get_random_seed_* not arch_get_random_*
    from Paul Mackerras

    - seccomp filter support from Michael Ellerman

    - opal_cec_reboot2() handling for HMIs & machine checks from Mahesh
    Salgaonkar

    - add powerpc timebase as a trace clock source from Naveen N. Rao

    - misc cleanups in the xmon, signal & SLB code from Anshuman Khandual

    - add an inline function to update POWER8 HID0 from Gautham R. Shenoy

    - fix pte_pagesize_index() crash on 4K w/64K hash from Michael Ellerman

    - drop support for 64K local store on 4K kernels from Michael Ellerman

    - move dma_get_required_mask() from pnv_phb to pci_controller_ops from
    Andrew Donnellan

    - initialize distance lookup table from drconf path from Nikunj A
    Dadhania

    - enable RTC class support from Vaibhav Jain

    - disable automatically blocked PCI config from Gavin Shan

    - add LEDs driver for PowerNV platform from Vasant Hegde

    - fix endianness issues in the HVSI driver from Laurent Dufour

    - kexec endian fixes from Samuel Mendoza-Jonas

    - fix corrupted pdn list from Gavin Shan

    - fix fenced PHB caused by eeh_slot_error_detail() from Gavin Shan

    - Freescale updates from Scott: Highlights include 32-bit memcpy/memset
    optimizations, checksum optimizations, 85xx config fragments and
    updates, device tree updates, e6500 fixes for non-SMP, and misc
    cleanup and minor fixes.

    - a ton of cxl updates & fixes:
    - add explicit precision specifiers from Rasmus Villemoes
    - use more common format specifier from Rasmus Villemoes
    - destroy cxl_adapter_idr on module_exit from Johannes Thumshirn
    - destroy afu->contexts_idr on release of an afu from Johannes
    Thumshirn
    - compile with -Werror from Daniel Axtens
    - EEH support from Daniel Axtens
    - plug irq_bitmap getting leaked in cxl_context from Vaibhav Jain
    - add alternate MMIO error handling from Ian Munsie
    - allow release of contexts which have been OPENED but not STARTED
    from Andrew Donnellan
    - remove use of macro DEFINE_PCI_DEVICE_TABLE from Vaishali Thakkar
    - release irqs if memory allocation fails from Vaibhav Jain
    - remove racy attempt to force EEH invocation in reset from Daniel
    Axtens
    - fix + cleanup error paths in cxl_dev_context_init from Ian Munsie
    - fix force unmapping mmaps of contexts allocated through the kernel
    api from Ian Munsie
    - set up and enable PSL Timebase from Philippe Bergheaud

    * tag 'powerpc-4.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (140 commits)
    cxl: Set up and enable PSL Timebase
    cxl: Fix force unmapping mmaps of contexts allocated through the kernel api
    cxl: Fix + cleanup error paths in cxl_dev_context_init
    powerpc/eeh: Fix fenced PHB caused by eeh_slot_error_detail()
    powerpc/pseries: Cleanup on pci_dn_reconfig_notifier()
    powerpc/pseries: Fix corrupted pdn list
    powerpc/powernv: Enable LEDS support
    powerpc/iommu: Set default DMA offset in dma_dev_setup
    cxl: Remove racy attempt to force EEH invocation in reset
    cxl: Release irqs if memory allocation fails
    cxl: Remove use of macro DEFINE_PCI_DEVICE_TABLE
    powerpc/powernv: Fix mis-merge of OPAL support for LEDS driver
    powerpc/powernv: Reset HILE before kexec_sequence()
    powerpc/kexec: Reset secondary cpu endianness before kexec
    powerpc/hvsi: Fix endianness issues in the HVSI driver
    leds/powernv: Add driver for PowerNV platform
    powerpc/powernv: Create LED platform device
    powerpc/powernv: Add OPAL interfaces for accessing and modifying system LED states
    powerpc/powernv: Fix the log message when disabling VF
    cxl: Allow release of contexts which have been OPENED but not STARTED
    ...

    Linus Torvalds
     

01 Sep, 2015

1 commit

  • Pull LED updates from Jacek Anaszewski:
    "In this merge window we'd like to announce a change on the list of LED
    subsystem maintainers - Bryan Wu decided to step back and handed over
    the maintainership to me (Jacek Anaszewski), which entailed an update
    of LED subsystem git tree URL.

    Besides the changes in MAINTAINERS we have:

    - optimizations and improvements to existing LED class drivers

    - improvements to the common LEDs DT documentation

    - modifications of kirkwood-* dts files, to be in sync with patches
    for leds-ns2 driver, that move LEDs mode mapping outside of the
    driver"

    * tag 'leds_for_4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
    leds: Export OF module alias information in missing drivers
    leds:lp55xx: use the private data instead of updating I2C device platform data
    leds: syscon: Correct check for syscon_node_to_regmap() errors
    leds: leds-fsg: Use devm_led_classdev_register
    MAINTAINERS: Change LED subsystem git tree URL
    leds/led-class: Add missing put_device()
    ARM: Kirkwood: add modes-map property to ns2-leds nodes
    leds: tlc591xx: Remove redundant I2C_FUNC_SMBUS_BYTE_DATA functionality check
    leds: leds-ns2: depends on MACH_ARMADA_370
    leds: leds-ns2: handle can_sleep GPIOs
    leds: leds-ns2: move LED modes mapping outside of the driver
    leds: lp8860: Constify reg_default tables
    leds: Drop owner assignment from i2c_driver
    leds: Allow compile test of LEDS_AAT1290 and LEDS_KTD2692 if !GPIOLIB
    leds: Allow compile test of GPIO consumers if !GPIOLIB
    DT: leds: Improve description of flash LEDs related properties

    Linus Torvalds
     

28 Aug, 2015

2 commits

  • The I2C core always reports the MODALIAS uevent as "i2c:"
    regardless of the mechanism that was used to register the device
    (i.e: OF or board code) and the table that is used later to match
    the driver with the device (i.e: I2C id table or OF match table).

    So drivers needs to export the I2C id table and this be built into
    the module or udev won't have the necessary information to autoload
    the needed driver module when the device is added.

    But this means that OF-only drivers needs to have both OF and I2C id
    tables that have to be kept in sync and also the dev node compatible
    manufacturer prefix is stripped when reporting the MODALIAS. Which can
    lead to issues if two vendors use the same I2C device name for example.

    To avoid the above, the I2C core behavior may be changed in the future
    to not require an SPI device table for OF-only drivers and report the
    OF module alias. So, it's better to also export the OF table even when
    is unused now to prevent breaking module loading when the core changes.

    Signed-off-by: Javier Martinez Canillas
    Signed-off-by: Jacek Anaszewski

    Javier Martinez Canillas
     
  • Currently, lp55xx_of_populate_pdata() allocates lp55xx_platform_data if
    it's null. And it parses the DT and copies values into the
    'client->dev.platform_data'. This may have architectural issue.
    Platform data is configurable through the DT or I2C board info inside the
    platform area. However, lp55xx common driver changes this configuration
    when it is loaded. So 'client->dev.platform_data' is not null anymore.
    Eventually, the driver initialization is not identical when it's unloaded
    and loaded again.
    The lp55xx common driver should use the private data, 'lp55xx_chip->pdata'
    instead of changing the original platform data.

    So, lp55xx_of_populate_pdata() is modified as follows.
    * Do not update 'dev->platform_data'. Return the pointer of new allocated
    lp55xx_platform_data. Then the driver points it to private data,
    'lp55xx_chip->pdata'.
    * Each lp55xx driver checks the pointer and handles an error case.

    Then, original platform data configuration will be kept regardless of
    loading or unloading the driver.
    The driver allocates the memory and copies them from the DT if it's NULL.
    After the driver is loaded again, 'client->dev.platform_data' is same as
    initial load, so the driver is initialized identically.

    Cc: Toshi Kikuchi
    Cc: linux-leds@vger.kernel.org
    Signed-off-by: Milo Kim
    Signed-off-by: Jacek Anaszewski

    Milo Kim