• Home
  • Raw
  • Download

Lines Matching refs: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()
496 struct lp55xx_device_config *cfg = chip->cfg; in lp55xx_register_leds() local
503 if (!cfg->brightness_fn) { in lp55xx_register_leds()
524 if (cfg->set_led_current) in lp55xx_register_leds()
525 cfg->set_led_current(each, led_current); in lp55xx_register_leds()
538 struct lp55xx_device_config *cfg = chip->cfg; in lp55xx_register_sysfs() local
541 if (!cfg->run_engine || !cfg->firmware_cb) in lp55xx_register_sysfs()
549 return cfg->dev_attr_group ? in lp55xx_register_sysfs()
550 sysfs_create_group(&dev->kobj, cfg->dev_attr_group) : 0; in lp55xx_register_sysfs()
557 struct lp55xx_device_config *cfg = chip->cfg; in lp55xx_unregister_sysfs() local
559 if (cfg->dev_attr_group) in lp55xx_unregister_sysfs()
560 sysfs_remove_group(&dev->kobj, cfg->dev_attr_group); in lp55xx_unregister_sysfs()
567 struct lp55xx_led_config *cfg, in lp55xx_parse_common_child() argument
573 &cfg[led_number].name); in lp55xx_parse_common_child()
575 &cfg[led_number].led_current); in lp55xx_parse_common_child()
577 &cfg[led_number].max_current); in lp55xx_parse_common_child()
583 if (*chan_nr < 0 || *chan_nr > cfg->max_channel) in lp55xx_parse_common_child()
590 struct lp55xx_led_config *cfg, in lp55xx_parse_multi_led_child() argument
595 ret = lp55xx_parse_common_child(child, cfg, child_number, &chan_nr); in lp55xx_parse_multi_led_child()
603 cfg[child_number].color_id[color_number] = color_id; in lp55xx_parse_multi_led_child()
604 cfg[child_number].output_num[color_number] = chan_nr; in lp55xx_parse_multi_led_child()
610 struct lp55xx_led_config *cfg, in lp55xx_parse_multi_led() argument
617 ret = lp55xx_parse_multi_led_child(child, cfg, child_number, in lp55xx_parse_multi_led()
626 cfg[child_number].num_colors = num_colors; in lp55xx_parse_multi_led()
632 struct lp55xx_led_config *cfg, in lp55xx_parse_logical_led() argument
638 cfg[child_number].default_trigger = in lp55xx_parse_logical_led()
646 return lp55xx_parse_multi_led(np, cfg, child_number); in lp55xx_parse_logical_led()
648 ret = lp55xx_parse_common_child(np, cfg, child_number, &chan_nr); in lp55xx_parse_logical_led()
652 cfg[child_number].chan_nr = chan_nr; in lp55xx_parse_logical_led()
663 struct lp55xx_led_config *cfg; in lp55xx_of_populate_pdata() local
678 cfg = devm_kcalloc(dev, num_channels, sizeof(*cfg), GFP_KERNEL); in lp55xx_of_populate_pdata()
679 if (!cfg) in lp55xx_of_populate_pdata()
682 pdata->led_config = &cfg[0]; in lp55xx_of_populate_pdata()
684 cfg->max_channel = chip->cfg->max_channel; in lp55xx_of_populate_pdata()
687 ret = lp55xx_parse_logical_led(child, cfg, i); in lp55xx_of_populate_pdata()