Lines Matching +full:resource +full:- +full:id
1 // SPDX-License-Identifier: GPL-2.0
21 #include <linux/dma-mapping.h>
30 #include <linux/platform_data/s3c-hsudc.h>
31 #include <linux/platform_data/s3c-hsotg.h>
32 #include <linux/platform_data/dma-s3c24xx.h>
43 #include "gpio-samsung.h"
44 #include "gpio-cfg.h"
47 #include "regs-s3c2443-clock.h"
52 #include <linux/soc/samsung/s3c-adc.h>
53 #include <linux/platform_data/ata-samsung_cf.h>
55 #include <linux/platform_data/fb-s3c2410.h>
56 #include <linux/platform_data/hwmon-s3c.h>
57 #include <linux/platform_data/i2c-s3c2410.h>
59 #include <linux/platform_data/mmc-s3cmci.h>
60 #include <linux/platform_data/mtd-nand-s3c2410.h>
61 #include "pwm-core.h"
63 #include <linux/platform_data/touchscreen-s3c2410.h>
64 #include <linux/platform_data/usb-s3c2410_udc.h>
65 #include <linux/platform_data/usb-ohci-s3c2410.h>
66 #include "usb-phy.h"
67 #include <linux/platform_data/asoc-s3c.h>
68 #include <linux/platform_data/spi-s3c64xx.h>
74 static struct resource s3c_ac97_resource[] = {
80 .name = "samsung-ac97",
81 .id = -1,
83 .resource = s3c_ac97_resource,
94 static struct resource s3c_adc_resource[] = {
101 .name = "s3c24xx-adc",
102 .id = -1,
104 .resource = s3c_adc_resource,
109 static struct resource s3c_adc_resource[] = {
116 .name = "exynos-adc",
117 .id = -1,
119 .resource = s3c_adc_resource,
126 static struct resource s3c_camif_resource[] = {
133 .name = "s3c2440-camif",
134 .id = -1,
136 .resource = s3c_camif_resource,
147 static struct resource s3c_fb_resource[] = {
155 .name = "s3c-fb",
156 .id = -1,
158 .resource = s3c_fb_resource,
176 .name = "s3c-hwmon",
177 .id = -1,
191 static struct resource s3c_hsmmc_resource[] = {
203 .name = "s3c-sdhci",
204 .id = 0,
206 .resource = s3c_hsmmc_resource,
221 static struct resource s3c_hsmmc1_resource[] = {
233 .name = "s3c-sdhci",
234 .id = 1,
236 .resource = s3c_hsmmc1_resource,
253 static struct resource s3c_hsmmc2_resource[] = {
265 .name = "s3c-sdhci",
266 .id = 2,
268 .resource = s3c_hsmmc2_resource,
283 static struct resource s3c_hsmmc3_resource[] = {
295 .name = "s3c-sdhci",
296 .id = 3,
298 .resource = s3c_hsmmc3_resource,
314 static struct resource s3c_i2c0_resource[] = {
320 .name = "s3c2410-i2c",
321 .id = 0,
323 .resource = s3c_i2c0_resource,
339 pd->bus_num = 0; in s3c_i2c0_set_platdata()
344 if (!npd->cfg_gpio) in s3c_i2c0_set_platdata()
345 npd->cfg_gpio = s3c_i2c0_cfg_gpio; in s3c_i2c0_set_platdata()
349 static struct resource s3c_i2c1_resource[] = {
355 .name = "s3c2410-i2c",
356 .id = 1,
358 .resource = s3c_i2c1_resource,
367 pd->bus_num = 1; in s3c_i2c1_set_platdata()
372 if (!npd->cfg_gpio) in s3c_i2c1_set_platdata()
373 npd->cfg_gpio = s3c_i2c1_cfg_gpio; in s3c_i2c1_set_platdata()
378 static struct resource s3c_i2c2_resource[] = {
384 .name = "s3c2410-i2c",
385 .id = 2,
387 .resource = s3c_i2c2_resource,
396 pd->bus_num = 2; in s3c_i2c2_set_platdata()
401 if (!npd->cfg_gpio) in s3c_i2c2_set_platdata()
402 npd->cfg_gpio = s3c_i2c2_cfg_gpio; in s3c_i2c2_set_platdata()
407 static struct resource s3c_i2c3_resource[] = {
413 .name = "s3c2440-i2c",
414 .id = 3,
416 .resource = s3c_i2c3_resource,
425 pd->bus_num = 3; in s3c_i2c3_set_platdata()
430 if (!npd->cfg_gpio) in s3c_i2c3_set_platdata()
431 npd->cfg_gpio = s3c_i2c3_cfg_gpio; in s3c_i2c3_set_platdata()
436 static struct resource s3c_i2c4_resource[] = {
442 .name = "s3c2440-i2c",
443 .id = 4,
445 .resource = s3c_i2c4_resource,
454 pd->bus_num = 4; in s3c_i2c4_set_platdata()
459 if (!npd->cfg_gpio) in s3c_i2c4_set_platdata()
460 npd->cfg_gpio = s3c_i2c4_cfg_gpio; in s3c_i2c4_set_platdata()
465 static struct resource s3c_i2c5_resource[] = {
471 .name = "s3c2440-i2c",
472 .id = 5,
474 .resource = s3c_i2c5_resource,
483 pd->bus_num = 5; in s3c_i2c5_set_platdata()
488 if (!npd->cfg_gpio) in s3c_i2c5_set_platdata()
489 npd->cfg_gpio = s3c_i2c5_cfg_gpio; in s3c_i2c5_set_platdata()
494 static struct resource s3c_i2c6_resource[] = {
500 .name = "s3c2440-i2c",
501 .id = 6,
503 .resource = s3c_i2c6_resource,
512 pd->bus_num = 6; in s3c_i2c6_set_platdata()
517 if (!npd->cfg_gpio) in s3c_i2c6_set_platdata()
518 npd->cfg_gpio = s3c_i2c6_cfg_gpio; in s3c_i2c6_set_platdata()
523 static struct resource s3c_i2c7_resource[] = {
529 .name = "s3c2440-i2c",
530 .id = 7,
532 .resource = s3c_i2c7_resource,
541 pd->bus_num = 7; in s3c_i2c7_set_platdata()
546 if (!npd->cfg_gpio) in s3c_i2c7_set_platdata()
547 npd->cfg_gpio = s3c_i2c7_cfg_gpio; in s3c_i2c7_set_platdata()
554 static struct resource s3c_iis_resource[] = {
559 .name = "s3c24xx-iis",
560 .id = -1,
562 .resource = s3c_iis_resource,
573 static struct resource s3c_cfcon_resource[] = {
579 .id = 0,
581 .resource = s3c_cfcon_resource,
594 static struct resource samsung_keypad_resources[] = {
600 .name = "samsung-keypad",
601 .id = -1,
603 .resource = samsung_keypad_resources,
612 if (!npd->cfg_gpio) in samsung_keypad_set_platdata()
613 npd->cfg_gpio = samsung_keypad_cfg_gpio; in samsung_keypad_set_platdata()
620 static struct resource s3c_lcd_resource[] = {
626 .name = "s3c2410-lcd",
627 .id = -1,
629 .resource = s3c_lcd_resource,
642 npd->displays = kmemdup(pd->displays, in s3c24xx_fb_set_platdata()
643 sizeof(struct s3c2410fb_display) * npd->num_displays, in s3c24xx_fb_set_platdata()
645 if (!npd->displays) in s3c24xx_fb_set_platdata()
656 static struct resource s3c_nand_resource[] = {
661 .name = "s3c2410-nand",
662 .id = -1,
664 .resource = s3c_nand_resource,
668 * s3c_nand_copy_set() - copy nand set data
683 size = sizeof(struct mtd_partition) * set->nr_partitions; in s3c_nand_copy_set()
685 ptr = kmemdup(set->partitions, size, GFP_KERNEL); in s3c_nand_copy_set()
686 set->partitions = ptr; in s3c_nand_copy_set()
689 return -ENOMEM; in s3c_nand_copy_set()
692 if (set->nr_map && set->nr_chips) { in s3c_nand_copy_set()
693 size = sizeof(int) * set->nr_chips; in s3c_nand_copy_set()
694 ptr = kmemdup(set->nr_map, size, GFP_KERNEL); in s3c_nand_copy_set()
695 set->nr_map = ptr; in s3c_nand_copy_set()
698 return -ENOMEM; in s3c_nand_copy_set()
721 size = sizeof(struct s3c2410_nand_set) * npd->nr_sets; in s3c_nand_set_platdata()
723 struct s3c2410_nand_set *from = npd->sets; in s3c_nand_set_platdata()
728 npd->sets = to; /* set, even if we failed */ in s3c_nand_set_platdata()
735 for (i = 0; i < npd->nr_sets; i++) { in s3c_nand_set_platdata()
751 static struct resource s3c_onenand_resources[] = {
758 .name = "samsung-onenand",
759 .id = 0,
761 .resource = s3c_onenand_resources,
766 static struct resource s3c64xx_onenand1_resources[] = {
773 .name = "samsung-onenand",
774 .id = 1,
776 .resource = s3c64xx_onenand1_resources,
789 static struct resource samsung_pwm_resource[] = {
794 .name = "samsung-pwm",
795 .id = -1,
797 .resource = samsung_pwm_resource,
809 static struct resource s3c_rtc_resource[] = {
816 .name = "s3c2410-rtc",
817 .id = -1,
819 .resource = s3c_rtc_resource,
824 static struct resource s3c_rtc_resource[] = {
831 .name = "s3c64xx-rtc",
832 .id = -1,
834 .resource = s3c_rtc_resource,
858 static struct resource s3c_sdi_resource[] = {
864 /* This is currently here to avoid a number of if (host->pdata)
872 .name = "s3c2410-sdi",
873 .id = -1,
875 .resource = s3c_sdi_resource,
889 static struct resource s3c_spi0_resource[] = {
895 .name = "s3c2410-spi",
896 .id = 0,
898 .resource = s3c_spi0_resource,
905 static struct resource s3c_spi1_resource[] = {
911 .name = "s3c2410-spi",
912 .id = 1,
914 .resource = s3c_spi1_resource,
925 static struct resource s3c_ts_resource[] = {
931 .name = "s3c2410-ts",
932 .id = -1,
935 .resource = s3c_ts_resource,
965 static struct resource s3c_usb_resource[] = {
971 .name = "s3c2410-ohci",
972 .id = -1,
974 .resource = s3c_usb_resource,
982 * s3c_ohci_set_platdata - initialise OHCI device platform data
1000 static struct resource s3c_usbgadget_resource[] = {
1006 .name = "s3c2410-usbgadget",
1007 .id = -1,
1009 .resource = s3c_usbgadget_resource,
1021 static struct resource s3c_usb_hsotg_resources[] = {
1027 .name = "s3c-hsotg",
1028 .id = -1,
1030 .resource = s3c_usb_hsotg_resources,
1043 if (!npd->phy_init) in dwc2_hsotg_set_platdata()
1044 npd->phy_init = s3c_usb_phy_init; in dwc2_hsotg_set_platdata()
1045 if (!npd->phy_exit) in dwc2_hsotg_set_platdata()
1046 npd->phy_exit = s3c_usb_phy_exit; in dwc2_hsotg_set_platdata()
1053 static struct resource s3c_hsudc_resource[] = {
1059 .name = "s3c-hsudc",
1060 .id = -1,
1062 .resource = s3c_hsudc_resource,
1072 pd->phy_init = s3c_hsudc_init_phy; in s3c24xx_hsudc_set_platdata()
1073 pd->phy_uninit = s3c_hsudc_uninit_phy; in s3c24xx_hsudc_set_platdata()
1080 static struct resource s3c_wdt_resource[] = {
1086 .name = "s3c2410-wdt",
1087 .id = -1,
1089 .resource = s3c_wdt_resource,
1094 static struct resource s3c64xx_spi0_resource[] = {
1100 .name = "s3c6410-spi",
1101 .id = 0,
1103 .resource = s3c64xx_spi0_resource,
1130 static struct resource s3c64xx_spi1_resource[] = {
1136 .name = "s3c6410-spi",
1137 .id = 1,
1139 .resource = s3c64xx_spi1_resource,
1166 static struct resource s3c64xx_spi2_resource[] = {
1172 .name = "s3c6410-spi",
1173 .id = 2,
1175 .resource = s3c64xx_spi2_resource,