Lines Matching full:cfg

44 	struct lp55xx_device_config *cfg = chip->cfg;  in lp55xx_reset_device()  local
45 u8 addr = cfg->reset.addr; in lp55xx_reset_device()
46 u8 val = cfg->reset.val; in lp55xx_reset_device()
54 struct lp55xx_device_config *cfg = chip->cfg; in lp55xx_detect_device() local
55 u8 addr = cfg->enable.addr; in lp55xx_detect_device()
56 u8 val = cfg->enable.val; in lp55xx_detect_device()
69 if (val != cfg->enable.val) in lp55xx_detect_device()
77 struct lp55xx_device_config *cfg = chip->cfg; in lp55xx_post_init_device() local
79 if (!cfg->post_init_device) in lp55xx_post_init_device()
82 return cfg->post_init_device(chip); in lp55xx_post_init_device()
108 if (!chip->cfg->set_led_current) in led_current_store()
112 chip->cfg->set_led_current(led, (u8)curr); in led_current_store()
142 struct lp55xx_device_config *cfg = led->chip->cfg; in lp55xx_set_mc_brightness() local
145 return cfg->multicolor_brightness_fn(led); in lp55xx_set_mc_brightness()
153 struct lp55xx_device_config *cfg = led->chip->cfg; in lp55xx_set_brightness() local
156 return cfg->brightness_fn(led); in lp55xx_set_brightness()
163 struct lp55xx_device_config *cfg = chip->cfg; in lp55xx_init_led() local
165 int max_channel = cfg->max_channel; in lp55xx_init_led()
253 if (chip->cfg->firmware_cb) in lp55xx_firmware_loaded()
254 chip->cfg->firmware_cb(chip); in lp55xx_firmware_loaded()
320 if (chip->cfg->run_engine) in lp55xx_run_engine()
321 chip->cfg->run_engine(chip, start); in lp55xx_run_engine()
429 struct lp55xx_device_config *cfg; in lp55xx_init_device() local
436 cfg = chip->cfg; in lp55xx_init_device()
438 if (!pdata || !cfg) in lp55xx_init_device()
494 struct lp55xx_device_config *cfg = chip->cfg; in lp55xx_register_leds() local
501 if (!cfg->brightness_fn) { in lp55xx_register_leds()
522 if (cfg->set_led_current) in lp55xx_register_leds()
523 cfg->set_led_current(each, led_current); in lp55xx_register_leds()
536 struct lp55xx_device_config *cfg = chip->cfg; in lp55xx_register_sysfs() local
539 if (!cfg->run_engine || !cfg->firmware_cb) in lp55xx_register_sysfs()
547 return cfg->dev_attr_group ? in lp55xx_register_sysfs()
548 sysfs_create_group(&dev->kobj, cfg->dev_attr_group) : 0; in lp55xx_register_sysfs()
555 struct lp55xx_device_config *cfg = chip->cfg; in lp55xx_unregister_sysfs() local
557 if (cfg->dev_attr_group) in lp55xx_unregister_sysfs()
558 sysfs_remove_group(&dev->kobj, cfg->dev_attr_group); in lp55xx_unregister_sysfs()
565 struct lp55xx_led_config *cfg, in lp55xx_parse_common_child() argument
571 &cfg[led_number].name); in lp55xx_parse_common_child()
573 &cfg[led_number].led_current); in lp55xx_parse_common_child()
575 &cfg[led_number].max_current); in lp55xx_parse_common_child()
581 if (*chan_nr < 0 || *chan_nr > cfg->max_channel) in lp55xx_parse_common_child()
588 struct lp55xx_led_config *cfg, in lp55xx_parse_multi_led_child() argument
593 ret = lp55xx_parse_common_child(child, cfg, child_number, &chan_nr); in lp55xx_parse_multi_led_child()
601 cfg[child_number].color_id[color_number] = color_id; in lp55xx_parse_multi_led_child()
602 cfg[child_number].output_num[color_number] = chan_nr; in lp55xx_parse_multi_led_child()
608 struct lp55xx_led_config *cfg, in lp55xx_parse_multi_led() argument
615 ret = lp55xx_parse_multi_led_child(child, cfg, child_number, in lp55xx_parse_multi_led()
624 cfg[child_number].num_colors = num_colors; in lp55xx_parse_multi_led()
630 struct lp55xx_led_config *cfg, in lp55xx_parse_logical_led() argument
636 cfg[child_number].default_trigger = in lp55xx_parse_logical_led()
644 return lp55xx_parse_multi_led(np, cfg, child_number); in lp55xx_parse_logical_led()
646 ret = lp55xx_parse_common_child(np, cfg, child_number, &chan_nr); in lp55xx_parse_logical_led()
650 cfg[child_number].chan_nr = chan_nr; in lp55xx_parse_logical_led()
661 struct lp55xx_led_config *cfg; in lp55xx_of_populate_pdata() local
676 cfg = devm_kcalloc(dev, num_channels, sizeof(*cfg), GFP_KERNEL); in lp55xx_of_populate_pdata()
677 if (!cfg) in lp55xx_of_populate_pdata()
680 pdata->led_config = &cfg[0]; in lp55xx_of_populate_pdata()
682 cfg->max_channel = chip->cfg->max_channel; in lp55xx_of_populate_pdata()
685 ret = lp55xx_parse_logical_led(child, cfg, i); in lp55xx_of_populate_pdata()