leds-pca9532.c (8853c95e997e0a3621bd8718bdaded81ed37bc9a) | leds-pca9532.c (99a013c840a05083fd82d220685af7579238bfa8) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * pca9532.c - 16-bit Led dimmer 4 * 5 * Copyright (C) 2011 Jan Weitzel 6 * Copyright (C) 2008 Riku Voipio 7 * 8 * Datasheet: http://www.nxp.com/documents/data_sheet/PCA9532.pdf --- 464 unchanged lines hidden (view full) --- 473 474 devid = (int)(uintptr_t)of_device_get_match_data(dev); 475 maxleds = pca9532_chip_info_tbl[devid].num_leds; 476 477 pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); 478 if (!pdata) 479 return ERR_PTR(-ENOMEM); 480 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * pca9532.c - 16-bit Led dimmer 4 * 5 * Copyright (C) 2011 Jan Weitzel 6 * Copyright (C) 2008 Riku Voipio 7 * 8 * Datasheet: http://www.nxp.com/documents/data_sheet/PCA9532.pdf --- 464 unchanged lines hidden (view full) --- 473 474 devid = (int)(uintptr_t)of_device_get_match_data(dev); 475 maxleds = pca9532_chip_info_tbl[devid].num_leds; 476 477 pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); 478 if (!pdata) 479 return ERR_PTR(-ENOMEM); 480 |
481 for_each_child_of_node(np, child) { | 481 for_each_available_child_of_node(np, child) { |
482 if (of_property_read_string(child, "label", 483 &pdata->leds[i].name)) 484 pdata->leds[i].name = child->name; 485 of_property_read_u32(child, "type", &pdata->leds[i].type); 486 of_property_read_string(child, "linux,default-trigger", 487 &pdata->leds[i].default_trigger); 488 if (!of_property_read_string(child, "default-state", &state)) { 489 if (!strcmp(state, "on")) --- 72 unchanged lines hidden --- | 482 if (of_property_read_string(child, "label", 483 &pdata->leds[i].name)) 484 pdata->leds[i].name = child->name; 485 of_property_read_u32(child, "type", &pdata->leds[i].type); 486 of_property_read_string(child, "linux,default-trigger", 487 &pdata->leds[i].default_trigger); 488 if (!of_property_read_string(child, "default-state", &state)) { 489 if (!strcmp(state, "on")) --- 72 unchanged lines hidden --- |