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()
141 struct lp55xx_device_config *cfg = led->chip->cfg; in lp55xx_set_brightness() local
144 return cfg->brightness_fn(led); in lp55xx_set_brightness()
151 struct lp55xx_device_config *cfg = chip->cfg; in lp55xx_init_led() local
155 int max_channel = cfg->max_channel; in lp55xx_init_led()
212 if (chip->cfg->firmware_cb) in lp55xx_firmware_loaded()
213 chip->cfg->firmware_cb(chip); in lp55xx_firmware_loaded()
279 if (chip->cfg->run_engine) in lp55xx_run_engine()
280 chip->cfg->run_engine(chip, start); in lp55xx_run_engine()
389 struct lp55xx_device_config *cfg; in lp55xx_init_device() local
396 cfg = chip->cfg; in lp55xx_init_device()
398 if (!pdata || !cfg) in lp55xx_init_device()
461 struct lp55xx_device_config *cfg = chip->cfg; in lp55xx_register_leds() local
468 if (!cfg->brightness_fn) { in lp55xx_register_leds()
489 if (cfg->set_led_current) in lp55xx_register_leds()
490 cfg->set_led_current(each, led_current); in lp55xx_register_leds()
516 struct lp55xx_device_config *cfg = chip->cfg; in lp55xx_register_sysfs() local
519 if (!cfg->run_engine || !cfg->firmware_cb) in lp55xx_register_sysfs()
527 return cfg->dev_attr_group ? in lp55xx_register_sysfs()
528 sysfs_create_group(&dev->kobj, cfg->dev_attr_group) : 0; in lp55xx_register_sysfs()
535 struct lp55xx_device_config *cfg = chip->cfg; in lp55xx_unregister_sysfs() local
537 if (cfg->dev_attr_group) in lp55xx_unregister_sysfs()
538 sysfs_remove_group(&dev->kobj, cfg->dev_attr_group); in lp55xx_unregister_sysfs()
549 struct lp55xx_led_config *cfg; in lp55xx_of_populate_pdata() local
563 cfg = devm_kzalloc(dev, sizeof(*cfg) * num_channels, GFP_KERNEL); in lp55xx_of_populate_pdata()
564 if (!cfg) in lp55xx_of_populate_pdata()
567 pdata->led_config = &cfg[0]; in lp55xx_of_populate_pdata()
571 cfg[i].chan_nr = i; in lp55xx_of_populate_pdata()
573 of_property_read_string(child, "chan-name", &cfg[i].name); in lp55xx_of_populate_pdata()
574 of_property_read_u8(child, "led-cur", &cfg[i].led_current); in lp55xx_of_populate_pdata()
575 of_property_read_u8(child, "max-cur", &cfg[i].max_current); in lp55xx_of_populate_pdata()
576 cfg[i].default_trigger = in lp55xx_of_populate_pdata()