Home
last modified time | relevance | path

Searched +full:led +full:- +full:s (Results 1 – 25 of 943) sorted by relevance

12345678910>>...38

/linux/Documentation/ABI/testing/
H A Dsysfs-class-led-trigger-netdev1 What: /sys/class/leds/<led>/device_name
4 Contact: linux-leds@vger.kernel.org
8 What: /sys/class/leds/<led>/interval
11 Contact: linux-leds@vger.kernel.org
13 Specifies the duration of the LED blink in milliseconds.
21 What: /sys/class/leds/<led>/link
24 Contact: linux-leds@vger.kernel.org
28 If set to 0 (default), the LED's normal state is off.
30 If set to 1, the LED's normal state reflects the link state
32 Setting this value also immediately changes the LED state.
[all …]
/linux/drivers/leds/flash/
H A Dleds-mt6360.c1 // SPDX-License-Identifier: GPL-2.0-only
8 #include <linux/led-class-flash.h>
9 #include <linux/led-class-multicolor.h>
15 #include <media/v4l2-flash-led-class.h>
29 #define MT6360_ISNK_ENMASK(_led_no) BIT(7 - (_led_no))
39 #define MT6360_REG_FLEDBASE(_id) (0x372 + 4 * (_id - MT6360_LED_FLASH1))
49 #define MT6360_FLCSEN_MASK(_id) BIT(MT6360_LED_FLASH2 - _id)
101 struct mt6360_led *led = container_of(mccdev, struct mt6360_led, mc); in mt6360_mc_brightness_set() local
102 struct mt6360_priv *priv = led->priv; in mt6360_mc_brightness_set()
106 mutex_lock(&priv->lock); in mt6360_mc_brightness_set()
[all …]
H A Dleds-mt6370-flash.c1 // SPDX-License-Identifier: GPL-2.0-only
15 #include <linux/led-class-flash.h>
22 #include <media/v4l2-flash-led-class.h>
43 #define MT6370_FLCSEN_MASK(_id) BIT(MT6370_LED_FLASH2 - (_id))
89 struct mt6370_led *led = to_mt6370_led(lcdev, flash.led_cdev); in mt6370_torch_brightness_set() local
90 struct mt6370_priv *priv = led->priv; in mt6370_torch_brightness_set()
91 u32 led_enable_mask = led->led_no == MT6370_LED_JOINT ? MT6370_FLCSEN_MASK_ALL : in mt6370_torch_brightness_set()
92 MT6370_FLCSEN_MASK(led->led_no); in mt6370_torch_brightness_set()
98 mutex_lock(&priv->lock); in mt6370_torch_brightness_set()
104 if (priv->fled_strobe_used) { in mt6370_torch_brightness_set()
[all …]
H A Dleds-sy7802.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Silergy SY7802 flash LED driver with an I2C interface
11 #include <linux/led-class-flash.h>
111 struct sy7802_led *led = container_of(lcdev, struct sy7802_led, flash.led_cdev); in sy7802_torch_brightness_set() local
112 struct sy7802 *chip = led->chip; in sy7802_torch_brightness_set()
120 mutex_lock(&chip->mutex); in sy7802_torch_brightness_set()
122 if (chip->fled_strobe_used) { in sy7802_torch_brightness_set()
123 dev_warn(chip->dev, "Cannot set torch brightness whilst strobe is enabled\n"); in sy7802_torch_brightness_set()
124 ret = -EBUSY; in sy7802_torch_brightness_set()
129 fled_torch_used_tmp = chip->fled_torch_used | BIT(led->led_id); in sy7802_torch_brightness_set()
[all …]
H A Dleds-aat1290.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * LED Flash class driver for the AAT1290
4 * 1.5A Step-Up Current Regulator for Flash LEDs
13 #include <linux/led-class-flash.h>
21 #include <media/v4l2-flash-led-class.h>
50 /* maximum LED current in movie mode */
52 /* maximum LED current in flash mode */
58 /* max LED brightness level */
68 /* corresponding LED Flash class device */
95 static void aat1290_as2cwire_write(struct aat1290_led *led, int addr, int value) in aat1290_as2cwire_write() argument
[all …]
H A Dleds-rt8515.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * LED driver for Richtek RT8515 flash/torch white LEDs
10 * from the RT8515 to the LED, with two resistors connected
28 #include <linux/led-class-flash.h>
35 #include <media/v4l2-flash-led-class.h>
37 /* We can provide 15-700 mA out to the LED */
40 /* The maximum intensity is 1-16 for flash and 1-100 for torch */
68 gpiod_set_value(rt->enable_flash, 0); in rt8515_gpio_led_off()
69 gpiod_set_value(rt->enable_torch, 0); in rt8515_gpio_led_off()
90 static int rt8515_led_brightness_set(struct led_classdev *led, in rt8515_led_brightness_set() argument
[all …]
H A Dleds-max77693.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * LED Flash class driver for the flash cell of max77693 mfd.
11 #include <linux/led-class-flash.h>
13 #include <linux/mfd/max77693-common.h>
14 #include <linux/mfd/max77693-private.h>
20 #include <media/v4l2-flash-led-class.h>
59 /* corresponding LED Flash class device */
80 /* sub led data */
96 /* bitmask of FLED outputs use state (bit 0. - FLED1, bit 1. - FLED2) */
109 return (ua - FLASH_IOUT_MIN) / FLASH_IOUT_STEP; in max77693_led_iout_to_reg()
[all …]
/linux/sound/core/
H A Dcontrol_led.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * LED state routines for driver control interface
14 MODULE_DESCRIPTION("ALSA control interface to LED trigger code.");
17 #define MAX_LED (((SNDRV_CTL_ELEM_ACCESS_MIC_LED - SNDRV_CTL_ELEM_ACCESS_SPK_LED) \
33 struct snd_ctl_led *led; member
60 .group = (SNDRV_CTL_ELEM_ACCESS_SPK_LED >> SNDRV_CTL_ELEM_ACCESS_LED_SHIFT) - 1,
66 .group = (SNDRV_CTL_ELEM_ACCESS_MIC_LED >> SNDRV_CTL_ELEM_ACCESS_LED_SHIFT) - 1,
85 SNDRV_CTL_ELEM_ACCESS_LED_SHIFT) - 1; in access_to_group()
109 struct snd_kcontrol *kctl = lctl->kctl; in snd_ctl_led_get()
114 info.id = kctl->id; in snd_ctl_led_get()
[all …]
/linux/drivers/leds/
H A Dleds-lp3944.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * leds-lp3944.c - driver for National Semiconductor LP3944 Funlight Chip
14 * as a led controller.
18 * - period: from 0s to 1.6s
19 * - duty cycle: percentage of the period the led is on, from 0 to 100
30 #include <linux/leds-lp3944.h>
33 #define LP3944_REG_INPUT1 0x00 /* LEDs 0-7 InputRegister (Read Only) */
40 #define LP3944_REG_LS0 0x06 /* LEDs 0-3 Selector (R/W) */
41 #define LP3944_REG_LS1 0x07 /* LEDs 4-7 Selector (R/W) */
95 * lp3944_dim_set_period() - Set the period for DIM status
[all …]
H A Dleds-powernv.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * PowerNV LED Driver
20 /* Map LED type to description. */
29 {-1, NULL},
35 * platform we want to retain LED state across reboot as these
42 /* Max supported LED type */
49 /* PowerNV LED data */
52 char *loc_code; /* LED location code */
59 /* Returns OPAL_SLOT_LED_TYPE_* for given led type string */
68 return -1; in powernv_get_led_type()
[all …]
H A Dleds-lm3533.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * leds-lm3533.c -- LM3533 LED driver
5 * Copyright (C) 2011-2012 Texas Instruments
59 static inline int lm3533_led_get_ctrlbank_id(struct lm3533_led *led) in lm3533_led_get_ctrlbank_id() argument
61 return led->id + 2; in lm3533_led_get_ctrlbank_id()
64 static inline u8 lm3533_led_get_lv_reg(struct lm3533_led *led, u8 base) in lm3533_led_get_lv_reg() argument
66 return base + led->id; in lm3533_led_get_lv_reg()
69 static inline u8 lm3533_led_get_pattern(struct lm3533_led *led) in lm3533_led_get_pattern() argument
71 return led->id; in lm3533_led_get_pattern()
74 static inline u8 lm3533_led_get_pattern_reg(struct lm3533_led *led, in lm3533_led_get_pattern_reg() argument
[all …]
H A Dleds-bd2802.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * leds-bd2802.c - RGB LED Driver
8 * Datasheet: http://www.rohm.com/products/databook/driver/pdf/bd2802gu-e.pdf
16 #include <linux/leds-bd2802.h>
73 struct led_state led[2]; member
104 /*--------------------------------------------------------------*/
106 /*--------------------------------------------------------------*/
108 static inline int bd2802_is_rgb_off(struct bd2802_led *led, enum led_ids id, in bd2802_is_rgb_off() argument
113 return !led->led[id].r; in bd2802_is_rgb_off()
115 return !led->led[id].g; in bd2802_is_rgb_off()
[all …]
H A Dled-class.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * LED Class Core
6 * Copyright (C) 2005-2007 Richard Purdie <rpurdie@openedhand.com>
36 return sprintf(buf, "%u\n", led_cdev->brightness); in brightness_show()
46 mutex_lock(&led_cdev->led_access); in brightness_store()
49 ret = -EBUSY; in brightness_store()
60 flush_work(&led_cdev->set_brightness_work); in brightness_store()
64 mutex_unlock(&led_cdev->led_access); in brightness_store()
74 return sprintf(buf, "%u\n", led_cdev->max_brightness); in max_brightness_show()
113 if (led_cdev->brightness_hw_changed == -1) in brightness_hw_changed_show()
[all …]
H A DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
16 bool "LED Support"
18 Say Y to enable Linux LED support. This allows control of supported
24 tristate "LED Class Support"
26 This option enables the LED sysfs class in /sys/class/leds. You'll
30 tristate "LED Flash Class Support"
33 This option enables the flash LED sysfs class in /sys/class/leds.
34 It wraps LED Class and adds flash LEDs specific sysfs attributes
36 for the flash related features of a LED device. It can be built
40 tristate "LED Multicolor Class Support"
[all …]
/linux/drivers/net/wireless/ralink/rt2x00/
H A Drt2x00leds.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 Copyright (C) 2004 - 2009 Ivo van Doorn <IvDoorn@gmail.com>
10 Abstract: rt2x00 led specific routines.
21 struct rt2x00_led *led = &rt2x00dev->led_qual; in rt2x00leds_led_quality() local
24 if ((led->type != LED_TYPE_QUALITY) || !(led->flags & LED_REGISTERED)) in rt2x00leds_led_quality()
28 * Led handling requires a positive value for the rssi, in rt2x00leds_led_quality()
31 rssi += rt2x00dev->rssi_offset; in rt2x00leds_led_quality()
35 * to a LED value inside the range LED_OFF - LED_FULL. in rt2x00leds_led_quality()
56 if (brightness != led->led_dev.brightness) { in rt2x00leds_led_quality()
57 led->led_dev.brightness_set(&led->led_dev, brightness); in rt2x00leds_led_quality()
[all …]
/linux/drivers/net/wireless/broadcom/b43legacy/
H A Dleds.c1 // SPDX-License-Identifier: GPL-2.0-or-later
5 LED control
7 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
9 Copyright (c) 2005-2007 Michael Buesch <m@bues.ch>
24 struct b43legacy_wl *wl = dev->wl; in b43legacy_led_turn_on()
28 spin_lock_irqsave(&wl->leds_lock, flags); in b43legacy_led_turn_on()
35 spin_unlock_irqrestore(&wl->leds_lock, flags); in b43legacy_led_turn_on()
41 struct b43legacy_wl *wl = dev->wl; in b43legacy_led_turn_off()
45 spin_lock_irqsave(&wl->leds_lock, flags); in b43legacy_led_turn_off()
52 spin_unlock_irqrestore(&wl->leds_lock, flags); in b43legacy_led_turn_off()
[all …]
/linux/drivers/net/wireless/broadcom/b43/
H A Dleds.c1 // SPDX-License-Identifier: GPL-2.0-or-later
5 LED control
7 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
9 Copyright (c) 2005-2007 Michael Buesch <m@bues.ch>
48 struct b43_led *led) in b43_led_update() argument
53 if (!led->wl) in b43_led_update()
56 radio_enabled = (dev->phy.radio_on && dev->radio_hw_enable); in b43_led_update()
58 /* The led->state read is racy, but we don't care. In case we raced in b43_led_update()
62 turn_on = atomic_read(&led->state) != LED_OFF; in b43_led_update()
65 if (turn_on == led->hw_state) in b43_led_update()
[all …]
/linux/Documentation/devicetree/bindings/leds/
H A Dcommon.yaml1 # SPDX-License-Identifier: GPL-2.0-only
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Jacek Anaszewski <jacek.anaszewski@gmail.com>
11 - Pavel Machek <pavel@ucw.cz>
14 LED and flash LED devices provide the same basic functionality as current
15 regulators, but extended with LED and flash LED specific features like
18 Many LED devices expose more than one current output that can be connected
19 to one or more discrete LED component. Since the arrangement of connections
20 can influence the way of the LED device initialization, the LED components
[all …]
/linux/drivers/platform/x86/
H A Dasus-wireless.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2015-2016 Endless Mobile, Inc.
29 struct led_classdev led; member
57 acpi_status s; in asus_wireless_method() local
59 acpi_handle_debug(handle, "Evaluating method %s, parameter %#x\n", in asus_wireless_method()
66 s = acpi_evaluate_integer(handle, (acpi_string) method, &p, ret); in asus_wireless_method()
67 if (ACPI_FAILURE(s)) in asus_wireless_method()
69 "Failed to eval method %s, param %#x (%d)\n", in asus_wireless_method()
70 method, param, s); in asus_wireless_method()
72 acpi_handle_debug(handle, "%s returned %#llx\n", method, *ret); in asus_wireless_method()
[all …]
/linux/include/linux/
H A Dleds.h1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Driver model for leds and led triggers
11 #include <dt-bindings/leds/common.h>
29 * LED Core
47 * struct led_lookup_data - represents a single LED lookup entry
49 * @list: internal list of all LED lookup entries
50 * @provider: name of led_classdev providing the LED
51 * @dev_id: name of the device associated with this LED
52 * @con_id: name of the LED from the device's point of view
66 * with in-driver hard-coded LED names used as a fallback when
[all …]
/linux/drivers/net/wireless/realtek/rtl818x/rtl8187/
H A Dleds.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Linux LED driver for RTL8187
7 * Based on the LED handling in the r8187 driver, which is:
30 struct rtl8187_led *led = &priv->led_tx; in led_turn_on() local
32 /* Don't change the LED, when the device is down. */ in led_turn_on()
33 if (!priv->vif || priv->vif->type == NL80211_IFTYPE_UNSPECIFIED) in led_turn_on()
36 /* Skip if the LED is not registered. */ in led_turn_on()
37 if (!led->dev) in led_turn_on()
39 mutex_lock(&priv->conf_mutex); in led_turn_on()
40 switch (led->ledpin) { in led_turn_on()
[all …]
/linux/drivers/media/dvb-frontends/
H A Dau8522_common.c1 // SPDX-License-Identifier: GPL-2.0-or-later
7 Copyright (C) 2005-2008 Auvitek International, Ltd.
35 struct i2c_msg msg = { .addr = state->config.demod_address, in au8522_writereg()
38 ret = i2c_transfer(state->i2c, &msg, 1); in au8522_writereg()
41 printk("%s: writereg error (reg == 0x%02x, val == 0x%04x, ret == %i)\n", in au8522_writereg()
44 return (ret != 1) ? -1 : 0; in au8522_writereg()
55 { .addr = state->config.demod_address, .flags = 0, in au8522_readreg()
57 { .addr = state->config.demod_address, .flags = I2C_M_RD, in au8522_readreg()
60 ret = i2c_transfer(state->i2c, msg, 2); in au8522_readreg()
63 printk(KERN_ERR "%s: readreg error (ret == %i)\n", in au8522_readreg()
[all …]
/linux/drivers/input/
H A Dinput-leds.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * LED support for the input layer
5 * Copyright 2010-2015 Samuel Thibault <samuel.thibault@ens-lyon.org>
31 [LED_NUML] = { "numlock", VT_TRIGGER("kbd-numlock") },
32 [LED_CAPSL] = { "capslock", VT_TRIGGER("kbd-capslock") },
33 [LED_SCROLLL] = { "scrolllock", VT_TRIGGER("kbd-scrolllock") },
35 [LED_KANA] = { "kana", VT_TRIGGER("kbd-kanalock") },
38 [LED_MUTE] = { "mute", AUDIO_TRIGGER("audio-mute") },
58 struct input_led *led = container_of(cdev, struct input_led, cdev); in input_leds_brightness_get() local
59 struct input_dev *input = led->handle->dev; in input_leds_brightness_get()
[all …]
/linux/drivers/hid/
H A Dhid-led.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Simple USB RGB LED driver
6 * Based on drivers/hid/hid-thingm.c and
16 #include "hid-ids.h"
32 /* R+2G+4B -> riso kagaku color index */
117 mutex_lock(&ldev->lock); in hidled_send()
123 memcpy(ldev->buf, buf, ldev->config->report_size); in hidled_send()
125 if (ldev->config->report_type == RAW_REQUEST) in hidled_send()
126 ret = hid_hw_raw_request(ldev->hdev, buf[0], ldev->buf, in hidled_send()
127 ldev->config->report_size, in hidled_send()
[all …]
/linux/drivers/net/wireless/intersil/p54/
H A Dled.c1 // SPDX-License-Identifier: GPL-2.0-only
6 * Copyright (c) 2007-2009, Christian Lamparter <chunkeey@web.de>
10 * - the islsm (softmac prism54) driver, which is:
11 * Copyright 2004-2006 Jean-Baptiste Note <jbnote@gmail.com>, et al.
12 * - stlc45xx driver
13 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
34 /* Don't toggle the LED, when the device is down. */ in p54_update_leds()
35 if (priv->mode == NL80211_IFTYPE_UNSPECIFIED) in p54_update_leds()
38 for (i = 0; i < ARRAY_SIZE(priv->leds); i++) in p54_update_leds()
39 if (priv->leds[i].toggled) { in p54_update_leds()
[all …]

12345678910>>...38