/linux-master/drivers/leds/ |
H A D | leds-dac124s085.c | 36 struct dac124s085_led *led = container_of(ldev, struct dac124s085_led, local 41 mutex_lock(&led->mutex); 42 word = cpu_to_le16(((led->id) << 14) | REG_WRITE_UPDATE | 44 ret = spi_write(led->spi, (const u8 *)&word, sizeof(word)); 45 mutex_unlock(&led->mutex); 53 struct dac124s085_led *led; local 63 led = dac->leds + i; 64 led->id = i; 65 led->spi = spi; 66 snprintf(led [all...] |
H A D | leds-lp8860.c | 90 * @led_dev: led class device pointer 139 static int lp8860_unlock_eeprom(struct lp8860_led *led, int lock) argument 143 mutex_lock(&led->lock); 146 ret = regmap_write(led->regmap, 150 dev_err(&led->client->dev, "EEPROM Unlock failed\n"); 154 ret = regmap_write(led->regmap, 158 dev_err(&led->client->dev, "EEPROM Unlock failed\n"); 161 ret = regmap_write(led->regmap, 165 dev_err(&led->client->dev, "EEPROM Unlock failed\n"); 169 ret = regmap_write(led 179 lp8860_fault_check(struct lp8860_led *led) argument 207 struct lp8860_led *led = local 238 lp8860_init(struct lp8860_led *led) argument 378 struct lp8860_led *led; local 446 struct lp8860_led *led = i2c_get_clientdata(client); local [all...] |
H A D | leds-bcm6328.c | 110 static void bcm6328_led_mode(struct bcm6328_led *led, unsigned long value) argument 115 shift = bcm6328_pin2shift(led->pin); 117 mode = led->mem + BCM6328_REG_MODE_HI; 119 mode = led->mem + BCM6328_REG_MODE_LO; 130 struct bcm6328_led *led = local 134 spin_lock_irqsave(led->lock, flags); 137 led->blink_leds[0] &= ~BIT(led->pin); 138 led->blink_leds[1] &= ~BIT(led 165 struct bcm6328_led *led = local 332 struct bcm6328_led *led; local [all...] |
H A D | leds-an30259a.c | 80 struct an30259a_led *led; local 84 led = container_of(cdev, struct an30259a_led, cdev); 85 mutex_lock(&led->chip->mutex); 87 ret = regmap_read(led->chip->regmap, AN30259A_REG_LED_ON, &led_on); 93 led_on &= ~AN30259A_LED_EN(led->num); 94 led_on &= ~AN30259A_LED_SLOPE(led->num); 95 led->sloping = false; 98 led_on |= AN30259A_LED_EN(led->num); 99 if (led->sloping) 100 led_on |= AN30259A_LED_SLOPE(led 126 struct an30259a_led *led; local 204 struct an30259a_led *led; local 245 an30259a_init_default_state(struct an30259a_led *led) argument [all...] |
H A D | leds-cht-wcove.c | 30 #define CHT_WC_LED1_SWCTL BIT(0) /* HW or SW control of charging led */ 109 struct cht_wc_led *led = container_of(cdev, struct cht_wc_led, cdev); local 112 mutex_lock(&led->mutex); 115 ret = regmap_update_bits(led->regmap, led->regs->ctrl, 116 led->regs->on_off_mask, led->regs->off_val); 123 ret = regmap_update_bits(led->regmap, led->regs->fsm, 128 ret = regmap_write(led 146 struct cht_wc_led *led = container_of(cdev, struct cht_wc_led, cdev); local 225 struct cht_wc_led *led = container_of(cdev, struct cht_wc_led, cdev); local 313 cht_wc_led_save_regs(struct cht_wc_led *led, struct cht_wc_led_saved_regs *saved_regs) argument 329 cht_wc_led_restore_regs(struct cht_wc_led *led, const struct cht_wc_led_saved_regs *saved_regs) argument 384 struct cht_wc_led *led = &leds->leds[i]; local [all...] |
H A D | leds-ariel.c | 36 struct ariel_led *led = led_cdev_to_ariel_led(led_cdev); local 39 if (regmap_read(led->ec_ram, led->ec_index, &led_status)) 51 struct ariel_led *led = led_cdev_to_ariel_led(led_cdev); local 54 regmap_write(led->ec_ram, led->ec_index, EC_LED_OFF); 56 regmap_write(led->ec_ram, led->ec_index, EC_LED_STILL); 62 struct ariel_led *led = led_cdev_to_ariel_led(led_cdev); local 68 regmap_write(led [all...] |
H A D | leds-88pm860x.c | 69 struct pm860x_led *led = container_of(cdev, struct pm860x_led, cdev); local 74 chip = led->chip; 75 mutex_lock(&led->lock); 76 led->brightness = value >> 3; 78 if ((led->current_brightness == 0) && led->brightness) { 79 led_power_set(chip, led->port, 1); 80 if (led->iset) { 81 pm860x_set_bits(led->i2c, led [all...] |
H A D | leds-bcm6358.c | 78 struct bcm6358_led *led = local 82 spin_lock_irqsave(led->lock, flags); 83 bcm6358_led_busy(led->mem); 84 val = bcm6358_led_read(led->mem + BCM6358_REG_MODE); 85 if ((led->active_low && value == LED_OFF) || 86 (!led->active_low && value != LED_OFF)) 87 val |= BIT(led->pin); 89 val &= ~(BIT(led->pin)); 90 bcm6358_led_write(led->mem + BCM6358_REG_MODE, val); 91 spin_unlock_irqrestore(led 98 struct bcm6358_led *led; local [all...] |
H A D | leds-tca6507.c | 17 * 500usec intervals in each 8msec that the led is 'on'. The levels 52 * blink. When a led changes, it relinquishes access and tries again, 138 /* Convert an led.brightness level (0..255) to a TCA6507 level (0..15) */ 256 * given led. 258 static void set_select(struct tca6507_chip *tca, int led, int val) argument 260 int mask = (1 << led); 361 static void led_release(struct tca6507_led *led) argument 363 /* If led owns any resource, release it. */ 364 struct tca6507_chip *tca = led->chip; 365 if (led 375 led_prepare(struct tca6507_led *led) argument 517 led_assign(struct tca6507_led *led) argument 545 struct tca6507_led *led = container_of(led_cdev, struct tca6507_led, local 557 struct tca6507_led *led = container_of(led_cdev, struct tca6507_led, local 675 struct led_info led; local [all...] |
H A D | leds-adp5520.c | 32 struct adp5520_led *led; local 34 led = container_of(led_cdev, struct adp5520_led, cdev); 35 return adp5520_write(led->master, ADP5520_LED1_CURRENT + led->id - 1, 39 static int adp5520_led_setup(struct adp5520_led *led) argument 41 struct device *dev = led->master; 42 int flags = led->flags; 45 switch (led->id) { 95 struct adp5520_led *led, *led_dat; local 110 led 169 struct adp5520_led *led; local [all...] |
H A D | leds-max77650.c | 50 struct max77650_led *led = max77650_to_led(cdev); local 60 return regmap_update_bits(led->map, led->regA, mask, val); 66 struct max77650_led *leds, *led; local 96 led = &leds[reg]; 97 led->map = map; 98 led->regA = MAX77650_LED_A_BASE + reg; 99 led->regB = MAX77650_LED_B_BASE + reg; 100 led->cdev.brightness_set_blocking = max77650_led_brightness_set; 101 led [all...] |
H A D | leds-pca963x.c | 118 static int pca963x_brightness(struct pca963x_led *led, argument 121 struct i2c_client *client = led->chip->client; 122 struct pca963x_chipdef *chipdef = led->chip->chipdef; 127 ledout_addr = chipdef->ledout_base + (led->led_num / 4); 128 shift = 2 * (led->led_num % 4); 134 if (led->blinking) { 138 led->led_num, 148 led->blinking = false; 153 led->led_num, 158 if (led 170 pca963x_blink(struct pca963x_led *led) argument 202 pca963x_power_state(struct pca963x_led *led) argument 223 struct pca963x_led *led; local 240 pca963x_period_scale(struct pca963x_led *led, unsigned int val) argument 252 struct pca963x_led *led; local 307 struct pca963x_led *led = chip->leds; local [all...] |
H A D | leds-mt6323.c | 140 * @led: the array that contains the state of individual 149 struct mt6323_led *led[MAX_SUPPORTED_LEDS]; member in struct:mt6323_leds 155 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); local 156 struct mt6323_leds *leds = led->parent; 173 ret = regmap_update_bits(regmap, ISINK_CON(regs->isink_con[2], led->id), 180 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); local 181 struct mt6323_leds *leds = led->parent; 187 status = ISINK_CH_EN(led->id); 189 ISINK_CH_EN_MASK(led->id), ~status); 195 RG_ISINK_CK_PDN_MASK(led 206 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); local 238 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); local 293 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); local 362 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); local 391 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); local 425 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); local 456 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); local 476 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); local 503 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); local 533 struct mt6323_led *led; local [all...] |
H A D | leds-turris-omnia.c | 9 #include <linux/led-class-multicolor.h> 107 struct omnia_led *led) 113 cmd[1] = led->reg; 114 cmd[2] = led->subled_info[0].brightness; 115 cmd[3] = led->subled_info[1].brightness; 116 cmd[4] = led->subled_info[2].brightness; 125 led->cached_channels[i] = led->subled_info[i].brightness; 131 static bool omnia_led_channels_changed(struct omnia_led *led) argument 134 if (led 106 omnia_led_send_color_cmd(const struct i2c_client *client, struct omnia_led *led) argument 145 struct omnia_led *led = to_omnia_led(mc_cdev); local 195 struct omnia_led *led = to_omnia_led(mc_cdev); local 228 struct omnia_led *led = to_omnia_led(lcdev_to_mccdev(cdev)); local 254 omnia_led_register(struct i2c_client *client, struct omnia_led *led, struct device_node *np) argument 457 struct omnia_led *led; local [all...] |
/linux-master/drivers/leds/flash/ |
H A D | leds-max77693.c | 11 #include <linux/led-class-flash.h> 20 #include <media/v4l2-flash-led-class.h> 80 /* sub led data */ 140 static inline bool max77693_fled_used(struct max77693_led_device *led, argument 145 return led->fled_mask & fled_bit; 148 static int max77693_set_mode_reg(struct max77693_led_device *led, u8 mode) argument 150 struct regmap *rmap = led->regmap; 163 * camera sensors use torch led to fathom ambient light 180 static int max77693_add_mode(struct max77693_led_device *led, u8 mode) argument 185 if (led 220 max77693_clear_mode(struct max77693_led_device *led, u8 mode) argument 232 max77693_add_allowed_modes(struct max77693_led_device *led, int fled_id, enum max77693_led_mode mode) argument 242 max77693_distribute_currents(struct max77693_led_device *led, int fled_id, enum max77693_led_mode mode, u32 micro_amp, u32 iout_max[2], u32 iout[2]) argument 266 max77693_set_torch_current(struct max77693_led_device *led, int fled_id, u32 micro_amp) argument 292 max77693_set_flash_current(struct max77693_led_device *led, int fled_id, u32 micro_amp) argument 320 max77693_set_timeout(struct max77693_led_device *led, u32 microsec) argument 337 max77693_get_strobe_status(struct max77693_led_device *led, bool *state) argument 355 struct max77693_led_device *led = sub_led_to_led(sub_led); local 390 max77693_setup(struct max77693_led_device *led, struct max77693_led_config_data *led_cfg) argument 466 struct max77693_led_device *led = sub_led_to_led(sub_led); local 504 struct max77693_led_device *led = sub_led_to_led(sub_led); local 519 struct max77693_led_device *led = sub_led_to_led(sub_led); local 565 struct max77693_led_device *led = sub_led_to_led(sub_led); local 587 struct max77693_led_device *led = sub_led_to_led(sub_led); local 596 max77693_led_parse_dt(struct max77693_led_device *led, struct max77693_led_config_data *cfg, struct device_node **sub_nodes) argument 705 max77693_align_iout_current(struct max77693_led_device *led, u32 *iout, u32 min, u32 max, u32 step) argument 728 max77693_led_validate_configuration(struct max77693_led_device *led, struct max77693_led_config_data *cfg) argument 764 max77693_led_get_configuration(struct max77693_led_device *led, struct max77693_led_config_data *cfg, struct device_node **sub_nodes) argument 796 struct max77693_led_device *led = sub_led_to_led(sub_led); local 826 struct max77693_led_device *led = sub_led_to_led(sub_led); local 846 struct max77693_led_device *led = sub_led_to_led(sub_led); local 886 struct max77693_led_device *led = sub_led_to_led(sub_led); local 916 struct max77693_led_device *led = sub_led_to_led(sub_led); local 949 struct max77693_led_device *led; local 1021 struct max77693_led_device *led = platform_get_drvdata(pdev); local [all...] |
H A D | leds-mt6360.c | 8 #include <linux/led-class-flash.h> 9 #include <linux/led-class-multicolor.h> 15 #include <media/v4l2-flash-led-class.h> 101 struct mt6360_led *led = container_of(mccdev, struct mt6360_led, mc); local 102 struct mt6360_priv *priv = led->priv; 135 struct mt6360_led *led = container_of(lcdev, struct mt6360_led, isnk); local 136 struct mt6360_priv *priv = led->priv; 137 u32 enable_mask = MT6360_ISNK_ENMASK(led->led_no); 138 u32 val = level ? MT6360_ISNK_ENMASK(led->led_no) : 0; 143 ret = regmap_update_bits(priv->regmap, MT6360_REG_ISNK(led 159 struct mt6360_led *led = local 223 struct mt6360_led *led = local 236 struct mt6360_led *led = local 302 struct mt6360_led *led = local 315 struct mt6360_led *led = local 332 struct mt6360_led *led = local 384 mt6360_isnk_init_default_state(struct mt6360_led *led) argument 417 mt6360_flash_init_default_state(struct mt6360_led *led) argument 462 struct mt6360_led *led = container_of(flash, struct mt6360_led, flash); local 488 mt6360_init_v4l2_flash_config(struct mt6360_led *led, struct v4l2_flash_config *config) argument 510 mt6360_init_v4l2_flash_config(struct mt6360_led *led, struct v4l2_flash_config *config) argument 516 mt6360_led_register(struct device *parent, struct mt6360_led *led, struct led_init_data *init_data) argument 613 mt6360_init_isnk_properties(struct mt6360_led *led, struct led_init_data *init_data) argument 691 mt6360_init_flash_properties(struct mt6360_led *led, struct led_init_data *init_data) argument 764 struct mt6360_led *led = priv->leds + i; local 802 struct mt6360_led *led = priv->leds + i; local [all...] |
/linux-master/drivers/leds/trigger/ |
H A D | ledtrig-backlight.c | 21 struct led_classdev *led; member in struct:bl_trig_notifier 33 struct led_classdev *led = n->led; local 49 n->brightness = led->brightness; 50 led_set_brightness_nosleep(led, LED_OFF); 52 led_set_brightness_nosleep(led, n->brightness); 71 struct led_classdev *led = led_trigger_get_led(dev); local 87 led_set_brightness_nosleep(led, LED_OFF); 89 led_set_brightness_nosleep(led, n->brightness); 101 static int bl_trig_activate(struct led_classdev *led) argument 124 bl_trig_deactivate(struct led_classdev *led) argument [all...] |
H A D | ledtrig-gpio.c | 19 struct led_classdev *led; member in struct:gpio_trig_data 20 unsigned desired_brightness; /* desired brightness when led is on */ 21 struct gpio_desc *gpiod; /* gpio that triggers the led */ 26 struct led_classdev *led = _led; local 27 struct gpio_trig_data *gpio_data = led_get_trigger_data(led); 33 led_set_brightness_nosleep(gpio_data->led, 36 led_set_brightness_nosleep(gpio_data->led, LED_FULL); 38 led_set_brightness_nosleep(gpio_data->led, LED_OFF); 75 static int gpio_trig_activate(struct led_classdev *led) argument 78 struct device *dev = led 122 gpio_trig_deactivate(struct led_classdev *led) argument [all...] |
/linux-master/drivers/leds/blink/ |
H A D | leds-bcm63138.c | 89 struct bcm63138_led *led, 92 int reg_offset = (led->pin >> fls((BCM63138_LEDS_PER_REG - 1))) * 4; 93 int shift = (led->pin & (BCM63138_LEDS_PER_REG - 1)) * BCM63138_LED_BITS; 100 struct bcm63138_led *led, 103 int reg_offset = (led->pin >> fls((BCM63138_LEDS_PER_REG - 1))) * 4; 104 int shift = (led->pin & (BCM63138_LEDS_PER_REG - 1)) * BCM63138_LED_BITS; 111 struct bcm63138_led *led, 114 u32 bit = BIT(led->pin); 126 struct bcm63138_led *led = container_of(led_cdev, struct bcm63138_led, cdev); local 127 struct bcm63138_leds *leds = led 88 bcm63138_leds_set_flash_rate(struct bcm63138_leds *leds, struct bcm63138_led *led, u8 value) argument 99 bcm63138_leds_set_bright(struct bcm63138_leds *leds, struct bcm63138_led *led, u8 value) argument 110 bcm63138_leds_enable_led(struct bcm63138_leds *leds, struct bcm63138_led *led, enum led_brightness value) argument 145 struct bcm63138_led *led = container_of(led_cdev, struct bcm63138_led, cdev); local 203 struct bcm63138_led *led; local [all...] |
/linux-master/drivers/net/wireless/intel/iwlwifi/mvm/ |
H A D | led.c | 48 struct iwl_mvm *mvm = container_of(led_cdev, struct iwl_mvm, led); 60 IWL_ERR(mvm, "Blink led mode not supported, used default\n"); 73 mvm->led.name = kasprintf(GFP_KERNEL, "%s-led", 75 if (!mvm->led.name) 78 mvm->led.brightness_set = iwl_led_brightness_set; 79 mvm->led.max_brightness = 1; 82 mvm->led.default_trigger = 85 ret = led_classdev_register(mvm->trans->dev, &mvm->led); 87 kfree(mvm->led [all...] |
/linux-master/drivers/net/wireless/ralink/rt2x00/ |
H A D | rt2x00leds.c | 10 Abstract: rt2x00 led specific routines. 21 struct rt2x00_led *led = &rt2x00dev->led_qual; local 24 if ((led->type != LED_TYPE_QUALITY) || !(led->flags & LED_REGISTERED)) 56 if (brightness != led->led_dev.brightness) { 57 led->led_dev.brightness_set(&led->led_dev, brightness); 58 led->led_dev.brightness = brightness; 62 static void rt2x00led_led_simple(struct rt2x00_led *led, bool enabled) argument 66 if (!(led 91 rt2x00leds_register_led(struct rt2x00_dev *rt2x00dev, struct rt2x00_led *led, const char *name) argument 171 rt2x00leds_unregister_led(struct rt2x00_led *led) argument 197 rt2x00leds_suspend_led(struct rt2x00_led *led) argument 216 rt2x00leds_resume_led(struct rt2x00_led *led) argument [all...] |
/linux-master/drivers/net/wireless/ath/ath5k/ |
H A D | led.c | 118 struct ath5k_led *led = container_of(led_dev, struct ath5k_led, local 122 ath5k_led_off(led->ah); 124 ath5k_led_on(led->ah); 128 ath5k_register_led(struct ath5k_hw *ah, struct ath5k_led *led, argument 133 led->ah = ah; 134 strscpy(led->name, name, sizeof(led->name)); 135 led->led_dev.name = led->name; 136 led 148 ath5k_unregister_led(struct ath5k_led *led) argument [all...] |
/linux-master/drivers/net/dsa/qca/ |
H A D | qca8k-leds.c | 95 qca8k_led_brightness_set(struct qca8k_led *led, argument 99 struct qca8k_priv *priv = led->priv; 102 qca8k_get_enable_led_reg(led->port_num, led->led_num, ®_info); 138 * To abstract this and have less code, we use the port and led numm 142 if (led->port_num == 0 || led->port_num == 4) { 158 struct qca8k_led *led = container_of(ldev, struct qca8k_led, cdev); local 160 return qca8k_led_brightness_set(led, brightness); 164 qca8k_led_brightness_get(struct qca8k_led *led) argument 195 struct qca8k_led *led = container_of(ldev, struct qca8k_led, cdev); local 230 struct qca8k_led *led = container_of(ldev, struct qca8k_led, cdev); local 255 struct qca8k_led *led = container_of(ldev, struct qca8k_led, cdev); local 288 struct qca8k_led *led = container_of(ldev, struct qca8k_led, cdev); local 312 struct qca8k_led *led = container_of(ldev, struct qca8k_led, cdev); local 352 struct qca8k_led *led = container_of(ldev, struct qca8k_led, cdev); local 367 struct fwnode_handle *led = NULL, *leds = NULL; local [all...] |
/linux-master/drivers/net/wireless/broadcom/b43legacy/ |
H A D | leds.c | 59 struct b43legacy_led *led = container_of(led_dev, struct b43legacy_led, local 61 struct b43legacy_wldev *dev = led->dev; 70 b43legacy_led_turn_off(dev, led->index, led->activelow); 72 b43legacy_led_turn_on(dev, led->index, led->activelow); 76 struct b43legacy_led *led, 84 if (led->dev) 88 led->dev = dev; 89 led 75 b43legacy_register_led(struct b43legacy_wldev *dev, struct b43legacy_led *led, const char *name, const char *default_trigger, u8 led_index, bool activelow) argument 106 b43legacy_unregister_led(struct b43legacy_led *led) argument [all...] |
/linux-master/drivers/net/wireless/realtek/rtl818x/rtl8187/ |
H A D | leds.c | 30 struct rtl8187_led *led = &priv->led_tx; local 37 if (!led->dev) 40 switch (led->ledpin) { 68 struct rtl8187_led *led = &priv->led_tx; local 75 if (!led->dev) 78 switch (led->ledpin) { 102 struct rtl8187_led *led = container_of(led_dev, struct rtl8187_led, local 104 struct ieee80211_hw *hw = led->dev; 111 if (led->is_radio) { 132 struct rtl8187_led *led, cons 131 rtl8187_register_led(struct ieee80211_hw *dev, struct rtl8187_led *led, const char *name, const char *default_trigger, u8 ledpin, bool is_radio) argument 161 rtl8187_unregister_led(struct rtl8187_led *led) argument [all...] |