30 Aug, 2017

1 commit

  • In some systems, such as Baseboard Management Controllers (BMCs), we
    want to retain the state of LEDs across a reboot of the BMC (whilst the
    host remains up). Implement support for the retain-state-shutdown
    devicetree property in leds-gpio.

    Signed-off-by: Andrew Jeffery
    Acked-by: Pavel Machek
    Tested-by: Brandon Wyman
    Signed-off-by: Jacek Anaszewski

    Andrew Jeffery
     

09 Mar, 2017

1 commit


05 Feb, 2017

1 commit

  • Rename devm_get_gpiod_from_child() into
    devm_fwnode_get_gpiod_from_child() to reflect the fact that this
    function is operating on a fwnode object.

    Signed-off-by: Boris Brezillon
    Acked-by: Jacek Anaszewski
    Acked-by: Dmitry Torokhov
    Signed-off-by: Linus Walleij

    Boris Brezillon
     

26 Jan, 2017

2 commits

  • Currently all users of fwnode_get_named_gpiod() have no way to
    specify a label for the GPIO. So GPIOs listed in debugfs are shown
    with label "?". With this change a proper label is used.

    Also adjust all users so they can pass a label, properly retrieved
    from device tree properties.

    Signed-off-by: Alexander Stein
    Cc: Andy Shevchenko
    Acked-by: Jacek Anaszewski
    Acked-by: Bartlomiej Zolnierkiewicz
    Acked-by: Dmitry Torokhov
    Signed-off-by: Linus Walleij

    Alexander Stein
     
  • Make fwnode_get_named_gpiod() consistent with the rest of
    gpiod_get() like API, i.e. configure GPIO pin immediately after
    request.

    Besides obvious clean up it will help to configure pins based
    on firmware provided resources.

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

    Andy Shevchenko
     

15 Sep, 2016

7 commits


11 Jul, 2016

1 commit

  • When working with Device Tree we iterate over children of "gpio-leds"
    compatible node and create LED device for each of them. We take care of
    all common DT properties (label, default trigger, state, etc.), however
    some triggers may want to support more of them.

    It could be useful for timer trigger to support setting delay on/off
    values with Device Tree property. Or for transient trigger to support
    e.g. duration property.

    We obviously should handle such properties in triggers, not in generic
    code. To let trigger drivers read properties from DT node we need to set
    of_node to point the relevant node. This change allows using all kind of
    of helpers in e.g. "activate" callbacks.

    Signed-off-by: Rafał Miłecki
    Signed-off-by: Jacek Anaszewski

    Rafał Miłecki
     

06 May, 2016

1 commit

  • Calling a GPIO LEDs is quite likely to work even if the kernel
    has paniced, so they are ideal to blink in this situation.
    This commit adds support for the new "panic-indicator"
    firmware property, allowing to mark a given LED to blink on
    a kernel panic.

    Signed-off-by: Ezequiel Garcia
    Reviewed-by: Matthias Brugger
    Acked-by: Pavel Machek
    Signed-off-by: Jacek Anaszewski

    Ezequiel Garcia
     

14 Mar, 2016

2 commits


04 Jan, 2016

1 commit


03 Nov, 2015

1 commit


02 Jul, 2015

1 commit

  • Pull LED subsystem updates from Bryan Wu:
    "In this cycle, we finished to merge patches for LED Flash class
    driver.

    Other than that we have some bug fixes and new drivers for LED
    controllers"

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: (33 commits)
    leds:lp55xx: fix firmware loading error
    leds: fix max77693-led build errors
    leds: fix aat1290 build errors
    leds: aat1290: pass flags parameter to devm_gpiod_get
    leds: ktd2692: pass flags parameter to devm_gpiod_get
    drivers/leds: don't use module_init in non-modular leds-cobalt-raq.c
    leds: aat1290: add support for V4L2 Flash sub-device
    DT: aat1290: Document handling external strobe sources
    leds: max77693: add support for V4L2 Flash sub-device
    media: Add registration helpers for V4L2 flash sub-devices
    v4l: async: Add a pointer to of_node to struct v4l2_subdev, match it
    Documentation: leds: Add description of v4l2-flash sub-device
    leds: add BCM6358 LED driver
    leds: add DT binding for BCM6358 LED controller
    leds: fix brightness changing when software blinking is active
    Documentation: leds-lp5523: describe master fader attributes
    leds: lp5523: add master_fader support
    leds: leds-gpio: Allow compile test if !GPIOLIB
    leds: leds-gpio: Add missing #include
    gpiolib: Add missing dummies for the unified device properties interface
    ...

    Linus Torvalds
     

25 Jun, 2015

1 commit

  • Commit 8a0662d9 introduced of_node and acpi_node symbols in global namespace
    but there were already ~63 of_node local variables or function parameters
    (no single acpi_node though, but anyway).

    After debugging undefined but used of_node local varible (which turned out
    to reference static function of_node() instead) it became clear that the names
    for the functions are too short and too generic for global scope.

    Signed-off-by: Alexander Sverdlin
    Signed-off-by: Rafael J. Wysocki

    Alexander Sverdlin
     

26 May, 2015

1 commit


05 May, 2015

2 commits


04 Mar, 2015

1 commit

  • The gpio binding document says that new code should always use named
    gpios. Patch 40b73183 added support to parse a list of gpios from child
    nodes, but does not make it possible to use named gpios. This patch adds
    the con_id property and implements it is done in gpiolib.c, where the
    old-style of using unnamed gpios still works.

    Signed-off-by: Olliver Schinagl
    Acked-by: Bryan Wu
    Acked-by: Dmitry Torokhov
    Reviewed-by: Alexandre Courbot
    Signed-off-by: Linus Walleij

    Olliver Schinagl
     

03 Feb, 2015

1 commit

  • Instead of overriding error codes, pass them on unmodified. This
    way a EPROBE_DEFER is correctly passed to the driver core. This results
    in the LED driver correctly requesting probe deferral in cases the GPIO
    controller is not yet available.

    Signed-off-by: Soren Brinkmann
    Reported-and-tested-by: Andreas Färber
    Signed-off-by: Bryan Wu

    Soren Brinkmann
     

19 Dec, 2014

1 commit

  • Pull more ACPI and power management updates from Rafael Wysocki:
    "These are regression fixes (leds-gpio, ACPI backlight driver,
    operating performance points library, ACPI device enumeration
    messages, cpupower tool), other bug fixes (ACPI EC driver, ACPI device
    PM), some cleanups in the operating performance points (OPP)
    framework, continuation of CONFIG_PM_RUNTIME elimination, a couple of
    minor intel_pstate driver changes, a new MAINTAINERS entry for it and
    an ACPI fan driver change needed for better support of thermal
    management in user space.

    Specifics:

    - Fix a regression in leds-gpio introduced by a recent commit that
    inadvertently changed the name of one of the properties used by the
    driver (Fabio Estevam).

    - Fix a regression in the ACPI backlight driver introduced by a
    recent fix that missed one special case that had to be taken into
    account (Aaron Lu).

    - Drop the level of some new kernel messages from the ACPI core
    introduced by a recent commit to KERN_DEBUG which they should have
    used from the start and drop some other unuseful KERN_ERR messages
    printed by ACPI (Rafael J Wysocki).

    - Revert an incorrect commit modifying the cpupower tool (Prarit
    Bhargava).

    - Fix two regressions introduced by recent commits in the OPP library
    and clean up some existing minor issues in that code (Viresh
    Kumar).

    - Continue to replace CONFIG_PM_RUNTIME with CONFIG_PM throughout the
    tree (or drop it where that can be done) in order to make it
    possible to eliminate CONFIG_PM_RUNTIME (Rafael J Wysocki, Ulf
    Hansson, Ludovic Desroches).

    There will be one more "CONFIG_PM_RUNTIME removal" batch after this
    one, because some new uses of it have been introduced during the
    current merge window, but that should be sufficient to finally get
    rid of it.

    - Make the ACPI EC driver more robust against race conditions related
    to GPE handler installation failures (Lv Zheng).

    - Prevent the ACPI device PM core code from attempting to disable
    GPEs that it has not enabled which confuses ACPICA and makes it
    report errors unnecessarily (Rafael J Wysocki).

    - Add a "force" command line switch to the intel_pstate driver to
    make it possible to override the blacklisting of some systems in
    that driver if needed (Ethan Zhao).

    - Improve intel_pstate code documentation and add a MAINTAINERS entry
    for it (Kristen Carlson Accardi).

    - Make the ACPI fan driver create cooling device interfaces witn
    names that reflect the IDs of the ACPI device objects they are
    associated with, except for "generic" ACPI fans (PNP ID "PNP0C0B").

    That's necessary for user space thermal management tools to be able
    to connect the fans with the parts of the system they are supposed
    to be cooling properly. From Srinivas Pandruvada"

    * tag 'pm+acpi-3.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (32 commits)
    MAINTAINERS: add entry for intel_pstate
    ACPI / video: update the skip case for acpi_video_device_in_dod()
    power / PM: Eliminate CONFIG_PM_RUNTIME
    NFC / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    SCSI / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    ACPI / EC: Fix unexpected ec_remove_handlers() invocations
    Revert "tools: cpupower: fix return checks for sysfs_get_idlestate_count()"
    tracing / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    x86 / PM: Replace CONFIG_PM_RUNTIME in io_apic.c
    PM: Remove the SET_PM_RUNTIME_PM_OPS() macro
    mmc: atmel-mci: use SET_RUNTIME_PM_OPS() macro
    PM / Kconfig: Replace PM_RUNTIME with PM in dependencies
    ARM / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    sound / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    phy / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    video / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    tty / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    spi: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    ACPI / PM: Do not disable wakeup GPEs that have not been enabled
    ACPI / utils: Drop error messages from acpi_evaluate_reference()
    ...

    Linus Torvalds
     

15 Dec, 2014

1 commit

  • Pull driver core update from Greg KH:
    "Here's the set of driver core patches for 3.19-rc1.

    They are dominated by the removal of the .owner field in platform
    drivers. They touch a lot of files, but they are "simple" changes,
    just removing a line in a structure.

    Other than that, a few minor driver core and debugfs changes. There
    are some ath9k patches coming in through this tree that have been
    acked by the wireless maintainers as they relied on the debugfs
    changes.

    Everything has been in linux-next for a while"

    * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
    Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
    fs: debugfs: add forward declaration for struct device type
    firmware class: Deletion of an unnecessary check before the function call "vunmap"
    firmware loader: fix hung task warning dump
    devcoredump: provide a one-way disable function
    device: Add dev__once variants
    ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
    ath: use seq_file api for ath9k debugfs files
    debugfs: add helper function to create device related seq_file
    drivers/base: cacheinfo: remove noisy error boot message
    Revert "core: platform: add warning if driver has no owner"
    drivers: base: support cpu cache information interface to userspace via sysfs
    drivers: base: add cpu_device_create to support per-cpu devices
    topology: replace custom attribute macros with standard DEVICE_ATTR*
    cpumask: factor out show_cpumap into separate helper function
    driver core: Fix unbalanced device reference in drivers_probe
    driver core: fix race with userland in device_add()
    sysfs/kernfs: make read requests on pre-alloc files use the buffer.
    sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
    fs: sysfs: return EGBIG on write if offset is larger than file size
    ...

    Linus Torvalds
     

10 Dec, 2014

1 commit

  • Commit a43f2cbbb009f9 ("leds: leds-gpio: Make use of device property API")
    caused a regression by reading the incorrect string for the "default-state"
    property.

    Fix the property string check to restore the original behaviour.

    Fixes: a43f2cbbb009 (leds: leds-gpio: Make use of device property API)
    Reported-by: Jean-Michel Hautbois
    Signed-off-by: Fabio Estevam
    Acked-by: Bryan Wu
    Signed-off-by: Rafael J. Wysocki

    Fabio Estevam
     

04 Dec, 2014

1 commit

  • Since commit a43f2cbbb009f96 ("leds: leds-gpio: Make use of device property
    API") it is no longer possible to register multiple gpio leds without passing
    the 'label' property.

    According to Documentation/devicetree/bindings/leds/common.txt:

    "Optional properties for child nodes:
    - label : The label for this LED. If omitted, the label is
    taken from the node name (excluding the unit address)."

    So retrieve the node name when the 'label' property is absent to keep the old
    behaviour and fix this regression.

    Fixes: a43f2cbbb009 (leds: leds-gpio: Make use of device property API)
    Reported-by: Jean-Michel Hautbois
    Signed-off-by: Fabio Estevam
    Acked-by: Grant Likely
    Acked-by: Bryan Wu
    Signed-off-by: Rafael J. Wysocki

    Fabio Estevam
     

07 Nov, 2014

1 commit

  • In the legacy case, led_dat->gpiod is initialized correctly, but
    overwritten later by template->gpiod, which is NULL, causing leds-gpio
    to fail with:

    gpiod_direction_output: invalid GPIO
    leds-gpio: probe of leds-gpio failed with error -22

    Move the initialization of led_dat->gpiod from template->gpiod up, and
    always use led_dat->gpiod later, to fix this.

    Fixes: 5c51277a9ababfa4 (leds: leds-gpio: Add support for GPIO descriptors)
    Signed-off-by: Geert Uytterhoeven
    Reviewed-by: Mika Westerberg
    Signed-off-by: Rafael J. Wysocki

    Geert Uytterhoeven
     

05 Nov, 2014

3 commits

  • Commit 21f2aae91e902aad ("leds: leds-gpio: Add support for GPIO
    descriptors") already converted most of the driver to use GPIO descriptors.
    What is still missing is the platform specific hook gpio_blink_set() and
    board files which pass legacy GPIO numbers to this driver in platform data.

    In this patch we handle the former and convert gpio_blink_set() to take
    GPIO descriptor instead. In order to do this we convert the existing four
    users to accept GPIO descriptor and translate it to legacy GPIO number in
    the platform code. This effectively "pushes" legacy GPIO number usage from
    the driver to platforms.

    Also add comment to the remaining block describing that it is legacy code
    path and we are getting rid of it eventually.

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

    Mika Westerberg
     
  • Make use of device property API in this driver so that both OF and ACPI
    based system can use the same driver.

    This change contains material from Max Eliaser and Mika Westerberg.

    Signed-off-by: Mika Westerberg
    Acked-by: Bryan Wu
    Acked-by: Grant Likely
    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     
  • GPIO descriptors are the preferred way over legacy GPIO numbers
    nowadays. Convert the driver to use GPIO descriptors internally but
    still allow passing legacy GPIO numbers from platform data to support
    existing platforms.

    Signed-off-by: Mika Westerberg
    Acked-by: Alexandre Courbot
    Acked-by: Bryan Wu
    Acked-by: Arnd Bergmann
    Acked-by: Grant Likely
    Signed-off-by: Rafael J. Wysocki

    Mika Westerberg
     

04 Nov, 2014

1 commit


20 Oct, 2014

1 commit


30 Sep, 2014

2 commits


07 Mar, 2014

1 commit


28 Feb, 2014

2 commits