Lines Matching refs:cfg
43 struct lp55xx_device_config *cfg = chip->cfg; in lp55xx_reset_device() local
44 u8 addr = cfg->reset.addr; in lp55xx_reset_device()
45 u8 val = cfg->reset.val; in lp55xx_reset_device()
53 struct lp55xx_device_config *cfg = chip->cfg; in lp55xx_detect_device() local
54 u8 addr = cfg->enable.addr; in lp55xx_detect_device()
55 u8 val = cfg->enable.val; in lp55xx_detect_device()
68 if (val != cfg->enable.val) in lp55xx_detect_device()
76 struct lp55xx_device_config *cfg = chip->cfg; in lp55xx_post_init_device() local
78 if (!cfg->post_init_device) in lp55xx_post_init_device()
81 return cfg->post_init_device(chip); in lp55xx_post_init_device()
107 if (!chip->cfg->set_led_current) in lp55xx_store_current()
111 chip->cfg->set_led_current(led, (u8)curr); in lp55xx_store_current()
150 struct lp55xx_device_config *cfg = chip->cfg; in lp55xx_init_led() local
154 int max_channel = cfg->max_channel; in lp55xx_init_led()
211 if (chip->cfg->firmware_cb) in lp55xx_firmware_loaded()
212 chip->cfg->firmware_cb(chip); in lp55xx_firmware_loaded()
278 if (chip->cfg->run_engine) in lp55xx_run_engine()
279 chip->cfg->run_engine(chip, start); in lp55xx_run_engine()
388 struct lp55xx_device_config *cfg; in lp55xx_init_device() local
395 cfg = chip->cfg; in lp55xx_init_device()
397 if (!pdata || !cfg) in lp55xx_init_device()
460 struct lp55xx_device_config *cfg = chip->cfg; in lp55xx_register_leds() local
467 if (!cfg->brightness_work_fn) { in lp55xx_register_leds()
484 INIT_WORK(&each->brightness_work, cfg->brightness_work_fn); in lp55xx_register_leds()
490 if (cfg->set_led_current) in lp55xx_register_leds()
491 cfg->set_led_current(each, led_current); in lp55xx_register_leds()
518 struct lp55xx_device_config *cfg = chip->cfg; in lp55xx_register_sysfs() local
521 if (!cfg->run_engine || !cfg->firmware_cb) in lp55xx_register_sysfs()
529 return cfg->dev_attr_group ? in lp55xx_register_sysfs()
530 sysfs_create_group(&dev->kobj, cfg->dev_attr_group) : 0; in lp55xx_register_sysfs()
537 struct lp55xx_device_config *cfg = chip->cfg; in lp55xx_unregister_sysfs() local
539 if (cfg->dev_attr_group) in lp55xx_unregister_sysfs()
540 sysfs_remove_group(&dev->kobj, cfg->dev_attr_group); in lp55xx_unregister_sysfs()
550 struct lp55xx_led_config *cfg; in lp55xx_of_populate_pdata() local
564 cfg = devm_kzalloc(dev, sizeof(*cfg) * num_channels, GFP_KERNEL); in lp55xx_of_populate_pdata()
565 if (!cfg) in lp55xx_of_populate_pdata()
568 pdata->led_config = &cfg[0]; in lp55xx_of_populate_pdata()
572 cfg[i].chan_nr = i; in lp55xx_of_populate_pdata()
574 of_property_read_string(child, "chan-name", &cfg[i].name); in lp55xx_of_populate_pdata()
575 of_property_read_u8(child, "led-cur", &cfg[i].led_current); in lp55xx_of_populate_pdata()
576 of_property_read_u8(child, "max-cur", &cfg[i].max_current); in lp55xx_of_populate_pdata()
577 cfg[i].default_trigger = in lp55xx_of_populate_pdata()