20 Sep, 2016

2 commits


15 Sep, 2016

8 commits

  • Simplify the error handling and add a missing call to fwnode_handle_put
    when checking led.name.

    Signed-off-by: Heiner Kallweit
    Signed-off-by: Jacek Anaszewski

    Heiner Kallweit
     
  • Using the managed version of led_classdev_register allows to
    significantly simplify the code.

    Signed-off-by: Heiner Kallweit
    Signed-off-by: Jacek Anaszewski

    Heiner Kallweit
     
  • Checking for the presence of the property first isn't strictly needed
    as we can react on the return code of fwnode_property_read_string.
    Also, even if the presence of a property "label" was checked,
    reading a string value for it theoretically still can fail and
    this case isn't handled.

    Signed-off-by: Heiner Kallweit
    Signed-off-by: Jacek Anaszewski

    Heiner Kallweit
     
  • Definition of np can be moved into the loop as well to simplify
    the code a little.

    Signed-off-by: Heiner Kallweit
    Signed-off-by: Jacek Anaszewski

    Heiner Kallweit
     
  • Add a helper for the container_of as it's used more than once.

    Signed-off-by: Heiner Kallweit
    Signed-off-by: Jacek Anaszewski

    Heiner Kallweit
     
  • gpiod_get_value_cansleep returns 0, 1, or an error code.
    So far errors are not handled and treated the same as 1.
    Change this to bail out if an error code is returned and
    remove the double negation.

    Signed-off-by: Heiner Kallweit
    Signed-off-by: Jacek Anaszewski

    Heiner Kallweit
     
  • Introduce a typedef gpio_blink_set_t to improve readability of the code.

    Signed-off-by: Heiner Kallweit
    Signed-off-by: Jacek Anaszewski

    Heiner Kallweit
     
  • This makes it possible to create a set of LEDs for Mellanox systems:
    "msx6710", "msx6720", "msb7700", "msn2700", "msx1410", "msn2410",
    "msb7800", "msn2740", "msn2100".

    Driver obtains LED devices according to system configuration, provided
    through system DMI data, like mlxcpld:fan1:green, mlxcpld:fan1:red and
    creates devices in form: "devicename:colour:function".

    LED setting is controlled through on board CPLD Lattice device.
    For setting particular LED off, solid, blink:
    echo 0 > /sys/class/leds/mlxcpld\:status\:green/brightness
    echo 1 > /sys/class/leds/mlxcpld\:status\:green/brightness
    echo timer > /sys/class/leds/mlxcpld\:status\:green/trigger

    On module probing all LEDs are set green, on removing - off.

    Last setting overwrites previous, f.e. sequence for
    changing LED from green - red - green:
    echo 1 > /sys/class/leds/mlxcpld\:psu\:green/brightness
    echo 1 > /sys/class/leds/mlxcpld\:psu\:red/brightness
    echo 1 > /sys/class/leds/mlxcpld\:psu\:green/brightness
    Note: LEDs cannot be turned on/off simultaneously.

    The Kconfig currently controlling compilation of this code is:
    drivers/leds/Kconfig:config LEDS_MLXCPLD

    Signed-off-by: Vadim Pasternak
    Reviewed-by: Jiri Pirko
    Reviewed-by: Wei Yongjun
    Signed-off-by: Jacek Anaszewski

    Vadim Pasternak
     

17 Aug, 2016

3 commits

  • This adds a driver for the six PM8058 LEDs, three ordinary LEDs,
    two "flash" LEDs and one "keypad" LED.

    The "keypad" and "flash" LEDs are not really hard-wired to these
    usecases: for example on the APQ8060 Dragonboard, the "keypad"
    LED is instead used to drive an IR LED used for the proximity
    sensor. The "flash" LEDs are just ordinary high-current LED
    drivers.

    Cc: linux-arm-msm@vger.kernel.org
    Cc: Andy Gross
    Cc: Stephen Boyd
    Signed-off-by: Linus Walleij
    Reviewed-by: Bjorn Andersson
    Signed-off-by: Jacek Anaszewski

    Linus Walleij
     
  • Per the documentation, use scnprintf instead of sprintf to ensure there
    is never more than PAGE_SIZE bytes of trigger names put into the
    buffer.

    Signed-off-by: Nathan Sullivan
    Signed-off-by: Zach Brown
    Signed-off-by: Jacek Anaszewski

    Nathan Sullivan
     
  • The Kconfig currently controlling compilation of this code is:

    drivers/leds/trigger/Kconfig:menuconfig LEDS_TRIGGERS
    drivers/leds/trigger/Kconfig: bool "LED Trigger support"

    ...meaning that it currently is not being built as a module by anyone.

    Lets remove the couple traces of modular infrastructure use, so that
    when reading the driver there is no doubt it is builtin-only.

    We also delete the MODULE_LICENSE tag etc. since all that information
    is already contained at the top of the file in the comments.

    We don't replace module.h with init.h since the file doesn't need that.
    However it does use EXPORT_SYMBOL, so we add the export.h header.

    Cc: Richard Purdie
    Cc: linux-leds@vger.kernel.org
    Signed-off-by: Paul Gortmaker
    Signed-off-by: Jacek Anaszewski

    Paul Gortmaker
     

15 Aug, 2016

1 commit

  • This is a driver for the Integrated Silicon Solution Inc. LED driver
    chips series IS31FL319x. They can drive 1, 3, 6 or up to 9
    LEDs.

    Each LED is individually controllable in brightness (through pwm)
    in 256 steps so that RGB LEDs can show any of ca. 16 Mio colors.

    The maximum current of the LEDs can be programmed and limited to
    5 .. 40mA through a device tree property.

    The chip is connected through I2C and can have one of 4 addresses
    in the range 0x64 .. 0x67 depending on how the AD pin is connected. The
    address is defined by the reg property as usual.

    The chip also has a shutdown input which could be connected to a GPIO,
    but this driver uses software shutdown if all LEDs are inactivated.

    The chip also has breathing and audio features which are not fully
    supported by this driver.

    Tested-on: OMAP5 based Pyra handheld prototype.
    Signed-off-by: H. Nikolaus Schaller
    Signed-off-by: Andrey Utkin
    Signed-off-by: Jacek Anaszewski

    H. Nikolaus Schaller
     

31 Jul, 2016

1 commit

  • Pull powerpc updates from Michael Ellerman:
    "Highlights:
    - PowerNV PCI hotplug support.
    - Lots more Power9 support.
    - eBPF JIT support on ppc64le.
    - Lots of cxl updates.
    - Boot code consolidation.

    Bug fixes:
    - Fix spin_unlock_wait() from Boqun Feng
    - Fix stack pointer corruption in __tm_recheckpoint() from Michael
    Neuling
    - Fix multiple bugs in memory_hotplug_max() from Bharata B Rao
    - mm: Ensure "special" zones are empty from Oliver O'Halloran
    - ftrace: Separate the heuristics for checking call sites from
    Michael Ellerman
    - modules: Never restore r2 for a mprofile-kernel style mcount() call
    from Michael Ellerman
    - Fix endianness when reading TCEs from Alexey Kardashevskiy
    - start rtasd before PCI probing from Greg Kurz
    - PCI: rpaphp: Fix slot registration for multiple slots under a PHB
    from Tyrel Datwyler
    - powerpc/mm: Add memory barrier in __hugepte_alloc() from Sukadev
    Bhattiprolu

    Cleanups & fixes:
    - Drop support for MPIC in pseries from Rashmica Gupta
    - Define and use PPC64_ELF_ABI_v2/v1 from Michael Ellerman
    - Remove unused symbols in asm-offsets.c from Rashmica Gupta
    - Fix SRIOV not building without EEH enabled from Russell Currey
    - Remove kretprobe_trampoline_holder from Thiago Jung Bauermann
    - Reduce log level of PCI I/O space warning from Benjamin
    Herrenschmidt
    - Add array bounds checking to crash_shutdown_handlers from Suraj
    Jitindar Singh
    - Avoid -maltivec when using clang integrated assembler from Anton
    Blanchard
    - Fix array overrun in ppc_rtas() syscall from Andrew Donnellan
    - Fix error return value in cmm_mem_going_offline() from Rasmus
    Villemoes
    - export cpu_to_core_id() from Mauricio Faria de Oliveira
    - Remove old symbols from defconfigs from Andrew Donnellan
    - Update obsolete comments in setup_32.c about entry conditions from
    Benjamin Herrenschmidt
    - Add comment explaining the purpose of setup_kdump_trampoline() from
    Benjamin Herrenschmidt
    - Merge the RELOCATABLE config entries for ppc32 and ppc64 from Kevin
    Hao
    - Remove RELOCATABLE_PPC32 from Kevin Hao
    - Fix .long's in tlb-radix.c to more meaningful from Balbir Singh

    Minor cleanups & fixes:
    - Andrew Donnellan, Anna-Maria Gleixner, Anton Blanchard, Benjamin
    Herrenschmidt, Bharata B Rao, Christophe Leroy, Colin Ian King,
    Geliang Tang, Greg Kurz, Madhavan Srinivasan, Michael Ellerman,
    Michael Ellerman, Stephen Rothwell, Stewart Smith.

    Freescale updates from Scott:
    - "Highlights include more 8xx optimizations, device tree updates,
    and MVME7100 support."

    PowerNV PCI hotplug from Gavin Shan:
    - PCI: Add pcibios_setup_bridge()
    - Override pcibios_setup_bridge()
    - Remove PCI_RESET_DELAY_US
    - Move pnv_pci_ioda_setup_opal_tce_kill() around
    - Increase PE# capacity
    - Allocate PE# in reverse order
    - Create PEs in pcibios_setup_bridge()
    - Setup PE for root bus
    - Extend PCI bridge resources
    - Make pnv_ioda_deconfigure_pe() visible
    - Dynamically release PE
    - Update bridge windows on PCI plug
    - Delay populating pdn
    - Support PCI slot ID
    - Use PCI slot reset infrastructure
    - Introduce pnv_pci_get_slot_id()
    - Functions to get/set PCI slot state
    - PCI/hotplug: PowerPC PowerNV PCI hotplug driver
    - Print correct PHB type names

    Power9 idle support from Shreyas B. Prabhu:
    - set power_save func after the idle states are initialized
    - Use PNV_THREAD_WINKLE macro while requesting for winkle
    - make hypervisor state restore a function
    - Rename idle_power7.S to idle_book3s.S
    - Rename reusable idle functions to hardware agnostic names
    - Make pnv_powersave_common more generic
    - abstraction for saving SPRs before entering deep idle states
    - Add platform support for stop instruction
    - cpuidle/powernv: Use CPUIDLE_STATE_MAX instead of MAX_POWERNV_IDLE_STATES
    - cpuidle/powernv: cleanup cpuidle-powernv.c
    - cpuidle/powernv: Add support for POWER ISA v3 idle states
    - Use deepest stop state when cpu is offlined

    Power9 PMU from Madhavan Srinivasan:
    - factor out power8 pmu macros and defines
    - factor out power8 pmu functions
    - factor out power8 __init_pmu code
    - Add power9 event list macros for generic and cache events
    - Power9 PMU support
    - Export Power9 generic and cache events to sysfs

    Power9 preliminary interrupt & PCI support from Benjamin Herrenschmidt:
    - Add XICS emulation APIs
    - Move a few exception common handlers to make room
    - Add support for HV virtualization interrupts
    - Add mechanism to force a replay of interrupts
    - Add ICP OPAL backend
    - Discover IODA3 PHBs
    - pci: Remove obsolete SW invalidate
    - opal: Add real mode call wrappers
    - Rename TCE invalidation calls
    - Remove SWINV constants and obsolete TCE code
    - Rework accessing the TCE invalidate register
    - Fallback to OPAL for TCE invalidations
    - Use the device-tree to get available range of M64's
    - Check status of a PHB before using it
    - pci: Don't try to allocate resources that will be reassigned

    Other Power9:
    - Send SIGBUS on unaligned copy and paste from Chris Smart
    - Large Decrementer support from Oliver O'Halloran
    - Load Monitor Register Support from Jack Miller

    Performance improvements from Anton Blanchard:
    - Avoid load hit store in __giveup_fpu() and __giveup_altivec()
    - Avoid load hit store in setup_sigcontext()
    - Remove assembly versions of strcpy, strcat, strlen and strcmp
    - Align hot loops of some string functions

    eBPF JIT from Naveen N. Rao:
    - Fix/enhance 32-bit Load Immediate implementation
    - Optimize 64-bit Immediate loads
    - Introduce rotate immediate instructions
    - A few cleanups
    - Isolate classic BPF JIT specifics into a separate header
    - Implement JIT compiler for extended BPF

    Operator Panel driver from Suraj Jitindar Singh:
    - devicetree/bindings: Add binding for operator panel on FSP machines
    - Add inline function to get rc from an ASYNC_COMP opal_msg
    - Add driver for operator panel on FSP machines

    Sparse fixes from Daniel Axtens:
    - make some things static
    - Introduce asm-prototypes.h
    - Include headers containing prototypes
    - Use #ifdef __BIG_ENDIAN__ #else for REG_BYTE
    - kvm: Clarify __user annotations
    - Pass endianness to sparse
    - Make ppc_md.{halt, restart} __noreturn

    MM fixes & cleanups from Aneesh Kumar K.V:
    - radix: Update LPCR HR bit as per ISA
    - use _raw variant of page table accessors
    - Compile out radix related functions if RADIX_MMU is disabled
    - Clear top 16 bits of va only on older cpus
    - Print formation regarding the the MMU mode
    - hash: Update SDR1 size encoding as documented in ISA 3.0
    - radix: Update PID switch sequence
    - radix: Update machine call back to support new HCALL.
    - radix: Add LPID based tlb flush helpers
    - radix: Add a kernel command line to disable radix
    - Cleanup LPCR defines

    Boot code consolidation from Benjamin Herrenschmidt:
    - Move epapr_paravirt_early_init() to early_init_devtree()
    - cell: Don't use flat device-tree after boot
    - ge_imp3a: Don't use the flat device-tree after boot
    - mpc85xx_ds: Don't use the flat device-tree after boot
    - mpc85xx_rdb: Don't use the flat device-tree after boot
    - Don't test for machine type in rtas_initialize()
    - Don't test for machine type in smp_setup_cpu_maps()
    - dt: Add of_device_compatible_match()
    - Factor do_feature_fixup calls
    - Move 64-bit feature fixup earlier
    - Move 64-bit memory reserves to setup_arch()
    - Use a cachable DART
    - Move FW feature probing out of pseries probe()
    - Put exception configuration in a common place
    - Remove early allocation of the SMU command buffer
    - Move MMU backend selection out of platform code
    - pasemi: Remove IOBMAP allocation from platform probe()
    - mm/hash: Don't use machine_is() early during boot
    - Don't test for machine type to detect HEA special case
    - pmac: Remove spurrious machine type test
    - Move hash table ops to a separate structure
    - Ensure that ppc_md is empty before probing for machine type
    - Move 64-bit probe_machine() to later in the boot process
    - Move 32-bit probe() machine to later in the boot process
    - Get rid of ppc_md.init_early()
    - Move the boot time info banner to a separate function
    - Move setting of {i,d}cache_bsize to initialize_cache_info()
    - Move the content of setup_system() to setup_arch()
    - Move cache info inits to a separate function
    - Re-order the call to smp_setup_cpu_maps()
    - Re-order setup_panic()
    - Make a few boot functions __init
    - Merge 32-bit and 64-bit setup_arch()

    Other new features:
    - tty/hvc: Use IRQF_SHARED for OPAL hvc consoles from Sam Mendoza-Jonas
    - tty/hvc: Use opal irqchip interface if available from Sam Mendoza-Jonas
    - powerpc: Add module autoloading based on CPU features from Alastair D'Silva
    - crypto: vmx - Convert to CPU feature based module autoloading from Alastair D'Silva
    - Wake up kopald polling thread before waiting for events from Benjamin Herrenschmidt
    - xmon: Dump ISA 2.06 SPRs from Michael Ellerman
    - xmon: Dump ISA 2.07 SPRs from Michael Ellerman
    - Add a parameter to disable 1TB segs from Oliver O'Halloran
    - powerpc/boot: Add OPAL console to epapr wrappers from Oliver O'Halloran
    - Assign fixed PHB number based on device-tree properties from Guilherme G. Piccoli
    - pseries: Add pseries hotplug workqueue from John Allen
    - pseries: Add support for hotplug interrupt source from John Allen
    - pseries: Use kernel hotplug queue for PowerVM hotplug events from John Allen
    - pseries: Move property cloning into its own routine from Nathan Fontenot
    - pseries: Dynamic add entires to associativity lookup array from Nathan Fontenot
    - pseries: Auto-online hotplugged memory from Nathan Fontenot
    - pseries: Remove call to memblock_add() from Nathan Fontenot

    cxl:
    - Add set and get private data to context struct from Michael Neuling
    - make base more explicitly non-modular from Paul Gortmaker
    - Use for_each_compatible_node() macro from Wei Yongjun
    - Frederic Barrat
    - Abstract the differences between the PSL and XSL
    - Make vPHB device node match adapter's
    - Philippe Bergheaud
    - Add mechanism for delivering AFU driver specific events
    - Ignore CAPI adapters misplaced in switched slots
    - Refine slice error debug messages
    - Andrew Donnellan
    - static-ify variables to fix sparse warnings
    - PCI/hotplug: pnv_php: export symbols and move struct types needed by cxl
    - PCI/hotplug: pnv_php: handle OPAL_PCI_SLOT_OFFLINE power state
    - Add cxl_check_and_switch_mode() API to switch bi-modal cards
    - remove dead Kconfig options
    - fix potential NULL dereference in free_adapter()
    - Ian Munsie
    - Update process element after allocating interrupts
    - Add support for CAPP DMA mode
    - Fix allowing bogus AFU descriptors with 0 maximum processes
    - Fix allocating a minimum of 2 pages for the SPA
    - Fix bug where AFU disable operation had no effect
    - Workaround XSL bug that does not clear the RA bit after a reset
    - Fix NULL pointer dereference on kernel contexts with no AFU interrupts
    - powerpc/powernv: Split cxl code out into a separate file
    - Add cxl_slot_is_supported API
    - Enable bus mastering for devices using CAPP DMA mode
    - Move cxl_afu_get / cxl_afu_put to base
    - Allow a default context to be associated with an external pci_dev
    - Do not create vPHB if there are no AFU configuration records
    - powerpc/powernv: Add support for the cxl kernel api on the real phb
    - Add support for using the kernel API with a real PHB
    - Add kernel APIs to get & set the max irqs per context
    - Add preliminary workaround for CX4 interrupt limitation
    - Add support for interrupts on the Mellanox CX4
    - Workaround PE=0 hardware limitation in Mellanox CX4
    - powerpc/powernv: Fix pci-cxl.c build when CONFIG_MODULES=n

    selftests:
    - Test unaligned copy and paste from Chris Smart
    - Load Monitor Register Tests from Jack Miller
    - Cyril Bur
    - exec() with suspended transaction
    - Use signed long to read perf_event_paranoid
    - Fix usage message in context_switch
    - Fix generation of vector instructions/types in context_switch
    - Michael Ellerman
    - Use "Delta" rather than "Error" in normal output
    - Import Anton's mmap & futex micro benchmarks
    - Add a test for PROT_SAO"

    * tag 'powerpc-4.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (263 commits)
    powerpc/mm: Parenthesise IS_ENABLED() in if condition
    tty/hvc: Use opal irqchip interface if available
    tty/hvc: Use IRQF_SHARED for OPAL hvc consoles
    selftests/powerpc: exec() with suspended transaction
    powerpc: Improve comment explaining why we modify VRSAVE
    powerpc/mm: Drop unused externs for hpte_init_beat[_v3]()
    powerpc/mm: Rename hpte_init_lpar() and move the fallback to a header
    powerpc/mm: Fix build break when PPC_NATIVE=n
    crypto: vmx - Convert to CPU feature based module autoloading
    powerpc: Add module autoloading based on CPU features
    powerpc/powernv/ioda: Fix endianness when reading TCEs
    powerpc/mm: Add memory barrier in __hugepte_alloc()
    powerpc/modules: Never restore r2 for a mprofile-kernel style mcount() call
    powerpc/ftrace: Separate the heuristics for checking call sites
    powerpc: Merge 32-bit and 64-bit setup_arch()
    powerpc/64: Make a few boot functions __init
    powerpc: Re-order setup_panic()
    powerpc: Re-order the call to smp_setup_cpu_maps()
    powerpc/32: Move cache info inits to a separate function
    powerpc/64: Move the content of setup_system() to setup_arch()
    ...

    Linus Torvalds
     

30 Jul, 2016

1 commit

  • Pull smp hotplug updates from Thomas Gleixner:
    "This is the next part of the hotplug rework.

    - Convert all notifiers with a priority assigned

    - Convert all CPU_STARTING/DYING notifiers

    The final removal of the STARTING/DYING infrastructure will happen
    when the merge window closes.

    Another 700 hundred line of unpenetrable maze gone :)"

    * 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (70 commits)
    timers/core: Correct callback order during CPU hot plug
    leds/trigger/cpu: Move from CPU_STARTING to ONLINE level
    powerpc/numa: Convert to hotplug state machine
    arm/perf: Fix hotplug state machine conversion
    irqchip/armada: Avoid unused function warnings
    ARC/time: Convert to hotplug state machine
    clocksource/atlas7: Convert to hotplug state machine
    clocksource/armada-370-xp: Convert to hotplug state machine
    clocksource/exynos_mct: Convert to hotplug state machine
    clocksource/arm_global_timer: Convert to hotplug state machine
    rcu: Convert rcutree to hotplug state machine
    KVM/arm/arm64/vgic-new: Convert to hotplug state machine
    smp/cfd: Convert core to hotplug state machine
    x86/x2apic: Convert to CPU hotplug state machine
    profile: Convert to hotplug state machine
    timers/core: Convert to hotplug state machine
    hrtimer: Convert to hotplug state machine
    x86/tboot: Convert to hotplug state machine
    arm64/armv8 deprecated: Convert to hotplug state machine
    hwtracing/coresight-etm4x: Convert to hotplug state machine
    ...

    Linus Torvalds
     

23 Jul, 2016

1 commit

  • There is no need the ledtriger to be called *that* early in the hotplug
    process (+ with disabled interrupts). As explained by Jacek Anaszewski [0]
    there is no need for it.
    Therefore this patch moves it to the ONLINE/PREPARE_DOWN level using the
    dynamic registration for the id.

    [0] https://lkml.kernel.org/r/578C92BC.2070603@samsung.com

    Signed-off-by: Sebastian Andrzej Siewior
    Acked-by: Jacek Anaszewski
    Acked-by: Linus Walleij
    Cc: Peter Zijlstra
    Cc: Paul Gortmaker
    Cc: Richard Purdie
    Cc: rt@linutronix.de
    Cc: Linus Torvalds
    Cc: linux-leds@vger.kernel.org
    Link: http://lkml.kernel.org/r/1469028295-14702-1-git-send-email-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     

19 Jul, 2016

2 commits


18 Jul, 2016

1 commit

  • The chip can drive 2 sets of RGB leds. Controller can
    be controlled via PWM, I2C and audio synchronisation.
    This driver uses I2C to communicate with the chip.

    Datasheet: http://www.ti.com/lit/gpn/lp3952

    Signed-off-by: Tony Makkiel
    Reviewed-by: Mika Westerberg
    Reviewed-by: Axel Lin
    Signed-off-by: Jacek Anaszewski

    Tony Makkiel
     

15 Jul, 2016

1 commit

  • This is a straightforward conversion. We place this callback last
    in the list so that the LED illuminates only after a successful
    bring up sequence.

    ( NOTE: The patch adds a FIXME question about the callback used,
    this question should probably be revisited later on.)

    Signed-off-by: Richard Cochran
    Signed-off-by: Anna-Maria Gleixner
    Reviewed-by: Sebastian Andrzej Siewior
    Acked-by: Jacek Anaszewski
    Cc: Linus Torvalds
    Cc: Linus Walleij
    Cc: Paul Gortmaker
    Cc: Peter Zijlstra
    Cc: Richard Purdie
    Cc: Thomas Gleixner
    Cc: linux-leds@vger.kernel.org
    Cc: rt@linutronix.de
    Link: http://lkml.kernel.org/r/20160713153336.465496902@linutronix.de
    Signed-off-by: Ingo Molnar

    Richard Cochran
     

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
     

04 Jul, 2016

1 commit


29 Jun, 2016

1 commit

  • An opal_msg of type OPAL_MSG_ASYNC_COMP contains the return code in the
    params[1] struct member. However this isn't intuitive or obvious when
    reading the code and requires that a user look at the skiboot
    documentation or opal-api.h to verify this.

    Add an inline function to get the return code from an opal_msg and update
    call sites accordingly.

    Signed-off-by: Suraj Jitindar Singh
    Signed-off-by: Michael Ellerman

    Suraj Jitindar Singh
     

20 Jun, 2016

2 commits

  • This patch converts the IDE specific LED trigger to a generic disk
    activity LED trigger. The libata core is now a trigger source just
    like before the IDE disk driver. It's merely a replacement of the
    string ide by disk.

    The patch is taken from http://dev.gentoo.org/~josejx/ata.patch and is
    widely used by any ibook/powerbook owners with great satisfaction.
    Likewise, it is very often used successfully on different ARM platforms.

    Unlike the original patch, the existing 'ide-disk' trigger is still
    available for backward compatibility. That reduce the amount of patches
    in affected device trees out of the mainline kernel. For further
    development, the new name 'disk-activity' should be used.

    Cc: Joseph Jezak
    Cc: Jörg Sommer
    Cc: Richard Purdie
    Signed-off-by: Stephan Linz
    Signed-off-by: Jacek Anaszewski

    Stephan Linz
     
  • This patch adds basic device tree support for the pca9532 LEDs.

    Signed-off-by: Phil Reid
    Signed-off-by: Jacek Anaszewski

    Phil Reid
     

08 Jun, 2016

2 commits

  • The following phenomena was observed: when suspending the
    system, sometimes the heartbeat LED was left on, glowing and
    wasting power while the rest of the system is asleep, also
    disturbing power dissapation measures on the odd suspend
    cycle when it's left on.

    Clearly this is not how we want the heartbeat trigger to
    work: it should turn off and leave the LED off during
    system suspend.

    This removes the heartbeat trigger when preparing suspend and
    restores it during resume. The trigger code will make sure all
    LEDs are left in OFF state after removing the trigger, and
    will re-enable the trigger on all LEDs after resuming.

    Cc: linux-pm@vger.kernel.org
    Signed-off-by: Linus Walleij
    Reviewed-by: Ulf Hansson
    Signed-off-by: Jacek Anaszewski

    Linus Walleij
     
  • Commit 76931edd54f8 ("leds: fix brightness changing when software blinking
    is active") changed the semantics of led_set_brightness() which according
    to the documentation should disable blinking upon any brightness setting.
    Moreover it made it different for soft blink case, where it was possible
    to change blink brightness, and for hardware blink case, where setting
    any brightness greater than 0 was ignored.

    While the change itself is against the documentation claims, it was driven
    also by the fact that timer trigger remained active after turning blinking
    off. Fixing that would have required major refactoring in the led-core,
    led-class, and led-triggers because of cyclic dependencies.

    Finally, it has been decided that allowing for brightness change during
    blinking is beneficial as it can be accomplished without disturbing
    blink rhythm.

    The change in brightness setting semantics will not affect existing
    LED class drivers that implement blink_set op thanks to the LED_BLINK_SW
    flag introduced by this patch. The flag state will be from now on checked
    in led_set_brightness() which will allow to distinguish between software
    and hardware blink mode. In the latter case the control will be passed
    directly to the drivers which apply their semantics on brightness set,
    which is disable the blinking in case of most such drivers. New drivers
    will apply new semantics and just change the brightness while hardware
    blinking is on, if possible.

    The issue was smuggled by subsequent LED core improvements, which modified
    the code that originally introduced the problem.

    Fixes: f1e80c07416a ("leds: core: Add two new LED_BLINK_ flags")
    Signed-off-by: Tony Makkiel
    Signed-off-by: Jacek Anaszewski

    Tony Makkiel
     

26 May, 2016

1 commit

  • …erry.reding/linux-pwm

    Pull pwm updates from Thierry Reding:
    "This set of changes introduces an atomic API to the PWM subsystem.
    This is influenced by the DRM atomic API that was introduced a while
    back, though it is obviously a lot simpler. The fundamental idea
    remains the same, though: drivers provide a single callback to
    implement the atomic configuration of a PWM channel.

    As a side-effect the PWM subsystem gains the ability for initial state
    retrieval, so that the logical state mirrors that of the hardware.
    Many use-cases don't care about this, but for others it is essential.

    These new features require changes in all users, which these patches
    take care of. The core is transitioned to use the atomic callback if
    available and provides a fallback mechanism for other drivers.

    Changes to transition users and drivers to the atomic API are
    postponed to v4.8"

    * tag 'pwm/for-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (30 commits)
    pwm: Add information about polarity, duty cycle and period to debugfs
    pwm: Switch to the atomic API
    pwm: Update documentation
    pwm: Add core infrastructure to allow atomic updates
    pwm: Add hardware readout infrastructure
    pwm: Move the enabled/disabled info into pwm_state
    pwm: Introduce the pwm_state concept
    pwm: Keep PWM state in sync with hardware state
    ARM: Explicitly apply PWM config extracted from pwm_args
    drm: i915: Explicitly apply PWM config extracted from pwm_args
    input: misc: pwm-beeper: Explicitly apply PWM config extracted from pwm_args
    input: misc: max8997: Explicitly apply PWM config extracted from pwm_args
    backlight: lm3630a: explicitly apply PWM config extracted from pwm_args
    backlight: lp855x: Explicitly apply PWM config extracted from pwm_args
    backlight: lp8788: Explicitly apply PWM config extracted from pwm_args
    backlight: pwm_bl: Use pwm_get_args() where appropriate
    fbdev: ssd1307fb: Use pwm_get_args() where appropriate
    regulator: pwm: Use pwm_get_args() where appropriate
    leds: pwm: Use pwm_get_args() where appropriate
    input: misc: max77693: Use pwm_get_args() where appropriate
    ...

    Linus Torvalds
     

17 May, 2016

1 commit

  • The PWM framework has clarified the concept of reference PWM config (the
    platform dependent config retrieved from the DT or the PWM lookup table)
    and real PWM state.

    Use pwm_get_args() when the PWM user wants to retrieve this reference
    config and not the current state.

    This is part of the rework allowing the PWM framework to support
    hardware readout and expose real PWM state even when the PWM has just
    been requested (before the user calls pwm_config/enable/disable()).

    Signed-off-by: Boris Brezillon
    Acked-by: Jacek Anaszewski
    Signed-off-by: Thierry Reding

    Boris Brezillon
     

06 May, 2016

2 commits

  • 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
     
  • This commit adds a new led_cdev flag LED_PANIC_INDICATOR, which
    allows to mark a specific LED to be switched to the "panic"
    trigger, on a kernel panic.

    This is useful to allow the user to assign a regular trigger
    to a given LED, and still blink that LED on a kernel panic.

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

    Ezequiel Garcia
     

19 Apr, 2016

3 commits

  • The Intel NAS SS4200 was also sold by Fujitsu Siemens (FSC) under
    the name "SCALEO Home Server". The hardware is equivalent.

    This patch adds the DMI data of this rebranded device.

    Signed-off-by: Martin Dummer
    Signed-off-by: Jacek Anaszewski

    Martin Dummer
     
  • There is only one x86 hardware where the driver leds-ss4200 applies to.
    Add kconfig dependency to x86 architecture, fix help text whitespace.

    Signed-off-by: Martin Dummer
    Signed-off-by: Jacek Anaszewski

    Martin Dummer
     
  • Parameters delay_on and delay_off of led_trigger_blink_oneshot()
    are pointers, to enable blink interval adjustment by LED class drivers
    of the controllers that implement hardware blinking.

    Move ide_blink_delay variable to ledtrig_ide_activity() in order to
    prevent the situation when adjustment committed by one LED class
    driver influences blink interval of the software fallback blink feature,
    that is applied to the drivers that don't implement blink_set op.

    Reviewed-by: Boris Brezillon
    Signed-off-by: Jacek Anaszewski

    Jacek Anaszewski
     

14 Apr, 2016

1 commit


13 Apr, 2016

1 commit

  • This commit introduces a MTD trigger for flash (NAND/NOR) device
    activity. The implementation is copied from IDE disk.

    This trigger deprecates the "nand-disk" LED trigger, but for backwards
    compatibility, we still keep the "nand-disk" trigger around.

    The motivation for deprecating the "nand-disk" LED trigger is that
    it only works for NAND drivers, whereas the "mtd" LED trigger
    is more generic (in fact, "nand-disk" currently only works for
    certain NAND drivers).

    Signed-off-by: Ezequiel Garcia
    Acked-by: Boris Brezillon
    Signed-off-by: Jacek Anaszewski

    Ezequiel Garcia
     

30 Mar, 2016

1 commit

  • This commit introduces a new LED trigger which allows to configure
    a LED to blink on a kernel panic (through panic_blink).

    Notice that currently the Openmoko FreeRunner (GTA02) mach code
    sets panic_blink to blink a hard-coded LED. The new trigger is
    meant to introduce a generic mechanism to achieve this.

    Signed-off-by: Ezequiel Garcia
    Signed-off-by: Jacek Anaszewski

    Ezequiel Garcia
     

24 Mar, 2016

2 commits

  • …linux-platform-drivers-x86

    Pull x86 platform driver updates from Darren Hart:
    "Significant refactoring of Dell laptop drivers, modularizing the
    smbios code. Multiple new platforms added for ideapad, asus, dell,
    and alienware using existing quirks. A few fixes and cleanups.

    hp-wmi:
    - Remove GPS rfkill support via pre-2009 interface
    - fix unregister order in hp_wmi_rfkill_setup() once again

    ideapad-laptop:
    - Add ideapad Y700 (15) to the no_hw_rfkill DMI list

    fujitsu-laptop:
    - Support radio toggle button

    intel-hid:
    - allocate correct amount of memory for private struct

    platform/x86:
    - Make intel_scu_ipc explicitly non-modular

    intel_pmc_ipc:
    - Avoid pending IPC1 command during legacy suspend
    - Fix GCR register base address and length

    asus-nb-wmi:
    - add wapf=4 quirk for ASUS X75VD

    intel_telemetry_pltdrv:
    - Change verbosity control bits

    dell-rbtn:
    - Add a comment about the XPS 13 9350

    dell-wmi, dell-laptop:
    - depends DMI

    dell-wmi:
    - support Dell Inspiron M5110
    - properly process Dell Instant Launch hotkey
    - enable receiving WMI events on Dell Vostro V131
    - Support new hotkeys on the XPS 13 9350 (Skylake)
    - Clean up hotkey table size check
    - Stop storing pointers to DMI tables

    dell-laptop:
    - move dell_smi_error() to dell-smbios
    - use dell_smbios_find_token() instead of find_token_location()
    - use dell_smbios_find_token() instead of find_token_id()
    - extract SMBIOS-related code to a separate module

    dell-smbios:
    - rename dell_smi_error() to dell_smbios_error()
    - make da_tokens static
    - remove find_token_{id,location}()
    - implement new function for finding DMI table 0xDA tokens
    - make the SMBIOS buffer static
    - return the SMBIOS buffer from dell_smbios_get_buffer()
    - don't return an SMBIOS buffer from dell_smbios_send_request()
    - don't pass an SMBIOS buffer to dell_smbios_send_request()
    - rename dell_send_request() to dell_smbios_send_request()
    - rename release_buffer() to dell_smbios_release_buffer()
    - rename clear_buffer() to dell_smbios_clear_buffer()
    - rename get_buffer() to dell_smbios_get_buffer()

    dell-led:
    - use dell_smbios_send_request() for performing SMBIOS calls
    - use dell_smbios_find_token() for finding mic DMI tokens

    toshiba_acpi:
    - Add a module parameter to disable hotkeys registration
    - Add sysfs entries for the Cooling Method feature
    - Add support for cooling method feature

    Documentation/ABI:
    - Update sysfs-driver-toshiba_acpi file

    thinkpad_acpi:
    - Remove ambiguous logging for "Unsupported brightness interface"

    alienware-wmi:
    - whitespace improvements
    - Add support for two new systems: ASM200 and ASM201.
    - Add support for deep sleep control.
    - Add initial support for alienware graphics amplifier.
    - Add support for new platform: X51-R3
    - Clean up whitespace for ASM100 platform"

    * tag 'platform-drivers-x86-v4.6-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: (47 commits)
    hp-wmi: Remove GPS rfkill support via pre-2009 interface
    hp-wmi: fix unregister order in hp_wmi_rfkill_setup() once again
    dell-wmi: support Dell Inspiron M5110
    dell-wmi: properly process Dell Instant Launch hotkey
    dell-wmi: enable receiving WMI events on Dell Vostro V131
    dell-smbios: rename dell_smi_error() to dell_smbios_error()
    dell-laptop: move dell_smi_error() to dell-smbios
    ideapad-laptop: Add ideapad Y700 (15) to the no_hw_rfkill DMI list
    fujitsu-laptop: Support radio toggle button
    intel-hid: allocate correct amount of memory for private struct
    platform/x86: Make intel_scu_ipc explicitly non-modular
    intel_pmc_ipc: Avoid pending IPC1 command during legacy suspend
    intel_pmc_ipc: Fix GCR register base address and length
    asus-nb-wmi: add wapf=4 quirk for ASUS X75VD
    intel_telemetry_pltdrv: Change verbosity control bits
    dell-rbtn: Add a comment about the XPS 13 9350
    dell-wmi: Support new hotkeys on the XPS 13 9350 (Skylake)
    dell-wmi: Clean up hotkey table size check
    dell-wmi, dell-laptop: depends DMI
    dell-wmi: Stop storing pointers to DMI tables
    ...

    Linus Torvalds
     
  • Instead of using the WMI wrapper, dell-led can take advantage of
    dell_smbios_send_request() for performing the SMBIOS calls required to
    change the state of the microphone LED.

    Signed-off-by: Michał Kępień
    Reviewed-by: Pali Rohár
    Acked-by: Jacek Anaszewski
    Signed-off-by: Darren Hart

    Michał Kępień