aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-10 13:19:57 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-10 13:19:57 -0500
commitd52739c62e0096dccea59f012d80256c6e359a98 (patch)
tree4df8ae0640c360eb79b6d0511f084b2337e21e12 /Documentation
parentabce00f962a11ed6f748c2569e11695a30716b53 (diff)
parent0d2006bbf09e817f125ba1e42b2549bc2c5d7351 (diff)
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (31 commits) pinctrl: remove unnecessary max pin number pinctrl: correct a offset while enumerating pins pinctrl: some typo fixes pinctrl: rename U300 and SIRF pin controllers pinctrl: pass name instead of device to pin_config_* pinctrl: add "struct seq_file;" to pinconf.h pinctrl: conjure names for unnamed pins pinctrl: add a group-specific hog macro pinctrl: don't create a device for each pin controller arm/u300: don't use PINMUX_MAP_PRIMARY* pinctrl: implement PINMUX_MAP_SYS_HOG pinctrl: add a pin config interface pinctrl/coh901: driver to request its pins pinctrl: u300-pinmux: register proper GPIO ranges pinctrl: move the U300 GPIO driver to pinctrl ARM: u300: localize GPIO assignments pinctrl: make it possible to add multiple maps pinctrl: make a copy of pinmux map pinctrl: GPIO direction support for muxing pinctrl: print pin range in GPIO range debugs ...
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/pinctrl.txt258
1 files changed, 178 insertions, 80 deletions
diff --git a/Documentation/pinctrl.txt b/Documentation/pinctrl.txt
index b04cb7d45a16..6727b92bc2fb 100644
--- a/Documentation/pinctrl.txt
+++ b/Documentation/pinctrl.txt
@@ -7,12 +7,9 @@ This subsystem deals with:
7 7
8- Multiplexing of pins, pads, fingers (etc) see below for details 8- Multiplexing of pins, pads, fingers (etc) see below for details
9 9
10The intention is to also deal with: 10- Configuration of pins, pads, fingers (etc), such as software-controlled
11 11 biasing and driving mode specific pins, such as pull-up/down, open drain,
12- Software-controlled biasing and driving mode specific pins, such as 12 load capacitance etc.
13 pull-up/down, open drain etc, load capacitance configuration when controlled
14 by software, etc.
15
16 13
17Top-level interface 14Top-level interface
18=================== 15===================
@@ -32,7 +29,7 @@ Definition of PIN:
32 be sparse - i.e. there may be gaps in the space with numbers where no 29 be sparse - i.e. there may be gaps in the space with numbers where no
33 pin exists. 30 pin exists.
34 31
35When a PIN CONTROLLER is instatiated, it will register a descriptor to the 32When a PIN CONTROLLER is instantiated, it will register a descriptor to the
36pin control framework, and this descriptor contains an array of pin descriptors 33pin control framework, and this descriptor contains an array of pin descriptors
37describing the pins handled by this specific pin controller. 34describing the pins handled by this specific pin controller.
38 35
@@ -61,14 +58,14 @@ this in our driver:
61 58
62#include <linux/pinctrl/pinctrl.h> 59#include <linux/pinctrl/pinctrl.h>
63 60
64const struct pinctrl_pin_desc __refdata foo_pins[] = { 61const struct pinctrl_pin_desc foo_pins[] = {
65 PINCTRL_PIN(0, "A1"), 62 PINCTRL_PIN(0, "A8"),
66 PINCTRL_PIN(1, "A2"), 63 PINCTRL_PIN(1, "B8"),
67 PINCTRL_PIN(2, "A3"), 64 PINCTRL_PIN(2, "C8"),
68 ... 65 ...
69 PINCTRL_PIN(61, "H6"), 66 PINCTRL_PIN(61, "F1"),
70 PINCTRL_PIN(62, "H7"), 67 PINCTRL_PIN(62, "G1"),
71 PINCTRL_PIN(63, "H8"), 68 PINCTRL_PIN(63, "H1"),
72}; 69};
73 70
74static struct pinctrl_desc foo_desc = { 71static struct pinctrl_desc foo_desc = {
@@ -88,11 +85,16 @@ int __init foo_probe(void)
88 pr_err("could not register foo pin driver\n"); 85 pr_err("could not register foo pin driver\n");
89} 86}
90 87
88To enable the pinctrl subsystem and the subgroups for PINMUX and PINCONF and
89selected drivers, you need to select them from your machine's Kconfig entry,
90since these are so tightly integrated with the machines they are used on.
91See for example arch/arm/mach-u300/Kconfig for an example.
92
91Pins usually have fancier names than this. You can find these in the dataheet 93Pins usually have fancier names than this. You can find these in the dataheet
92for your chip. Notice that the core pinctrl.h file provides a fancy macro 94for your chip. Notice that the core pinctrl.h file provides a fancy macro
93called PINCTRL_PIN() to create the struct entries. As you can see I enumerated 95called PINCTRL_PIN() to create the struct entries. As you can see I enumerated
94the pins from 0 in the upper left corner to 63 in the lower right corner, 96the pins from 0 in the upper left corner to 63 in the lower right corner.
95this enumeration was arbitrarily chosen, in practice you need to think 97This enumeration was arbitrarily chosen, in practice you need to think
96through your numbering system so that it matches the layout of registers 98through your numbering system so that it matches the layout of registers
97and such things in your driver, or the code may become complicated. You must 99and such things in your driver, or the code may become complicated. You must
98also consider matching of offsets to the GPIO ranges that may be handled by 100also consider matching of offsets to the GPIO ranges that may be handled by
@@ -133,8 +135,8 @@ struct foo_group {
133 const unsigned num_pins; 135 const unsigned num_pins;
134}; 136};
135 137
136static unsigned int spi0_pins[] = { 0, 8, 16, 24 }; 138static const unsigned int spi0_pins[] = { 0, 8, 16, 24 };
137static unsigned int i2c0_pins[] = { 24, 25 }; 139static const unsigned int i2c0_pins[] = { 24, 25 };
138 140
139static const struct foo_group foo_groups[] = { 141static const struct foo_group foo_groups[] = {
140 { 142 {
@@ -193,6 +195,88 @@ structure, for example specific register ranges associated with each group
193and so on. 195and so on.
194 196
195 197
198Pin configuration
199=================
200
201Pins can sometimes be software-configured in an various ways, mostly related
202to their electronic properties when used as inputs or outputs. For example you
203may be able to make an output pin high impedance, or "tristate" meaning it is
204effectively disconnected. You may be able to connect an input pin to VDD or GND
205using a certain resistor value - pull up and pull down - so that the pin has a
206stable value when nothing is driving the rail it is connected to, or when it's
207unconnected.
208
209For example, a platform may do this:
210
211ret = pin_config_set("foo-dev", "FOO_GPIO_PIN", PLATFORM_X_PULL_UP);
212
213To pull up a pin to VDD. The pin configuration driver implements callbacks for
214changing pin configuration in the pin controller ops like this:
215
216#include <linux/pinctrl/pinctrl.h>
217#include <linux/pinctrl/pinconf.h>
218#include "platform_x_pindefs.h"
219
220static int foo_pin_config_get(struct pinctrl_dev *pctldev,
221 unsigned offset,
222 unsigned long *config)
223{
224 struct my_conftype conf;
225
226 ... Find setting for pin @ offset ...
227
228 *config = (unsigned long) conf;
229}
230
231static int foo_pin_config_set(struct pinctrl_dev *pctldev,
232 unsigned offset,
233 unsigned long config)
234{
235 struct my_conftype *conf = (struct my_conftype *) config;
236
237 switch (conf) {
238 case PLATFORM_X_PULL_UP:
239 ...
240 }
241 }
242}
243
244static int foo_pin_config_group_get (struct pinctrl_dev *pctldev,
245 unsigned selector,
246 unsigned long *config)
247{
248 ...
249}
250
251static int foo_pin_config_group_set (struct pinctrl_dev *pctldev,
252 unsigned selector,
253 unsigned long config)
254{
255 ...
256}
257
258static struct pinconf_ops foo_pconf_ops = {
259 .pin_config_get = foo_pin_config_get,
260 .pin_config_set = foo_pin_config_set,
261 .pin_config_group_get = foo_pin_config_group_get,
262 .pin_config_group_set = foo_pin_config_group_set,
263};
264
265/* Pin config operations are handled by some pin controller */
266static struct pinctrl_desc foo_desc = {
267 ...
268 .confops = &foo_pconf_ops,
269};
270
271Since some controllers have special logic for handling entire groups of pins
272they can exploit the special whole-group pin control function. The
273pin_config_group_set() callback is allowed to return the error code -EAGAIN,
274for groups it does not want to handle, or if it just wants to do some
275group-level handling and then fall through to iterate over all pins, in which
276case each individual pin will be treated by separate pin_config_set() calls as
277well.
278
279
196Interaction with the GPIO subsystem 280Interaction with the GPIO subsystem
197=================================== 281===================================
198 282
@@ -214,19 +298,20 @@ static struct pinctrl_gpio_range gpio_range_a = {
214 .name = "chip a", 298 .name = "chip a",
215 .id = 0, 299 .id = 0,
216 .base = 32, 300 .base = 32,
301 .pin_base = 32,
217 .npins = 16, 302 .npins = 16,
218 .gc = &chip_a; 303 .gc = &chip_a;
219}; 304};
220 305
221static struct pinctrl_gpio_range gpio_range_a = { 306static struct pinctrl_gpio_range gpio_range_b = {
222 .name = "chip b", 307 .name = "chip b",
223 .id = 0, 308 .id = 0,
224 .base = 48, 309 .base = 48,
310 .pin_base = 64,
225 .npins = 8, 311 .npins = 8,
226 .gc = &chip_b; 312 .gc = &chip_b;
227}; 313};
228 314
229
230{ 315{
231 struct pinctrl_dev *pctl; 316 struct pinctrl_dev *pctl;
232 ... 317 ...
@@ -235,42 +320,39 @@ static struct pinctrl_gpio_range gpio_range_a = {
235} 320}
236 321
237So this complex system has one pin controller handling two different 322So this complex system has one pin controller handling two different
238GPIO chips. Chip a has 16 pins and chip b has 8 pins. They are mapped in 323GPIO chips. "chip a" has 16 pins and "chip b" has 8 pins. The "chip a" and
239the global GPIO pin space at: 324"chip b" have different .pin_base, which means a start pin number of the
325GPIO range.
326
327The GPIO range of "chip a" starts from the GPIO base of 32 and actual
328pin range also starts from 32. However "chip b" has different starting
329offset for the GPIO range and pin range. The GPIO range of "chip b" starts
330from GPIO number 48, while the pin range of "chip b" starts from 64.
331
332We can convert a gpio number to actual pin number using this "pin_base".
333They are mapped in the global GPIO pin space at:
240 334
241chip a: [32 .. 47] 335chip a:
242chip b: [48 .. 55] 336 - GPIO range : [32 .. 47]
337 - pin range : [32 .. 47]
338chip b:
339 - GPIO range : [48 .. 55]
340 - pin range : [64 .. 71]
243 341
244When GPIO-specific functions in the pin control subsystem are called, these 342When GPIO-specific functions in the pin control subsystem are called, these
245ranges will be used to look up the apropriate pin controller by inspecting 343ranges will be used to look up the appropriate pin controller by inspecting
246and matching the pin to the pin ranges across all controllers. When a 344and matching the pin to the pin ranges across all controllers. When a
247pin controller handling the matching range is found, GPIO-specific functions 345pin controller handling the matching range is found, GPIO-specific functions
248will be called on that specific pin controller. 346will be called on that specific pin controller.
249 347
250For all functionalities dealing with pin biasing, pin muxing etc, the pin 348For all functionalities dealing with pin biasing, pin muxing etc, the pin
251controller subsystem will subtract the range's .base offset from the passed 349controller subsystem will subtract the range's .base offset from the passed
252in gpio pin number, and pass that on to the pin control driver, so the driver 350in gpio number, and add the ranges's .pin_base offset to retrive a pin number.
253will get an offset into its handled number range. Further it is also passed 351After that, the subsystem passes it on to the pin control driver, so the driver
352will get an pin number into its handled number range. Further it is also passed
254the range ID value, so that the pin controller knows which range it should 353the range ID value, so that the pin controller knows which range it should
255deal with. 354deal with.
256 355
257For example: if a user issues pinctrl_gpio_set_foo(50), the pin control
258subsystem will find that the second range on this pin controller matches,
259subtract the base 48 and call the
260pinctrl_driver_gpio_set_foo(pinctrl, range, 2) where the latter function has
261this signature:
262
263int pinctrl_driver_gpio_set_foo(struct pinctrl_dev *pctldev,
264 struct pinctrl_gpio_range *rangeid,
265 unsigned offset);
266
267Now the driver knows that we want to do some GPIO-specific operation on the
268second GPIO range handled by "chip b", at offset 2 in that specific range.
269
270(If the GPIO subsystem is ever refactored to use a local per-GPIO controller
271pin space, this mapping will need to be augmented accordingly.)
272
273
274PINMUX interfaces 356PINMUX interfaces
275================= 357=================
276 358
@@ -438,7 +520,7 @@ you. Define enumerators only for the pins you can control if that makes sense.
438 520
439Assumptions: 521Assumptions:
440 522
441We assume that the number possible function maps to pin groups is limited by 523We assume that the number of possible function maps to pin groups is limited by
442the hardware. I.e. we assume that there is no system where any function can be 524the hardware. I.e. we assume that there is no system where any function can be
443mapped to any pin, like in a phone exchange. So the available pins groups for 525mapped to any pin, like in a phone exchange. So the available pins groups for
444a certain function will be limited to a few choices (say up to eight or so), 526a certain function will be limited to a few choices (say up to eight or so),
@@ -585,7 +667,7 @@ int foo_list_funcs(struct pinctrl_dev *pctldev, unsigned selector)
585 667
586const char *foo_get_fname(struct pinctrl_dev *pctldev, unsigned selector) 668const char *foo_get_fname(struct pinctrl_dev *pctldev, unsigned selector)
587{ 669{
588 return myfuncs[selector].name; 670 return foo_functions[selector].name;
589} 671}
590 672
591static int foo_get_groups(struct pinctrl_dev *pctldev, unsigned selector, 673static int foo_get_groups(struct pinctrl_dev *pctldev, unsigned selector,
@@ -600,16 +682,16 @@ static int foo_get_groups(struct pinctrl_dev *pctldev, unsigned selector,
600int foo_enable(struct pinctrl_dev *pctldev, unsigned selector, 682int foo_enable(struct pinctrl_dev *pctldev, unsigned selector,
601 unsigned group) 683 unsigned group)
602{ 684{
603 u8 regbit = (1 << group); 685 u8 regbit = (1 << selector + group);
604 686
605 writeb((readb(MUX)|regbit), MUX) 687 writeb((readb(MUX)|regbit), MUX)
606 return 0; 688 return 0;
607} 689}
608 690
609int foo_disable(struct pinctrl_dev *pctldev, unsigned selector, 691void foo_disable(struct pinctrl_dev *pctldev, unsigned selector,
610 unsigned group) 692 unsigned group)
611{ 693{
612 u8 regbit = (1 << group); 694 u8 regbit = (1 << selector + group);
613 695
614 writeb((readb(MUX) & ~(regbit)), MUX) 696 writeb((readb(MUX) & ~(regbit)), MUX)
615 return 0; 697 return 0;
@@ -647,6 +729,17 @@ All the above functions are mandatory to implement for a pinmux driver.
647Pinmux interaction with the GPIO subsystem 729Pinmux interaction with the GPIO subsystem
648========================================== 730==========================================
649 731
732The public pinmux API contains two functions named pinmux_request_gpio()
733and pinmux_free_gpio(). These two functions shall *ONLY* be called from
734gpiolib-based drivers as part of their gpio_request() and
735gpio_free() semantics. Likewise the pinmux_gpio_direction_[input|output]
736shall only be called from within respective gpio_direction_[input|output]
737gpiolib implementation.
738
739NOTE that platforms and individual drivers shall *NOT* request GPIO pins to be
740muxed in. Instead, implement a proper gpiolib driver and have that driver
741request proper muxing for its pins.
742
650The function list could become long, especially if you can convert every 743The function list could become long, especially if you can convert every
651individual pin into a GPIO pin independent of any other pins, and then try 744individual pin into a GPIO pin independent of any other pins, and then try
652the approach to define every pin as a function. 745the approach to define every pin as a function.
@@ -654,19 +747,24 @@ the approach to define every pin as a function.
654In this case, the function array would become 64 entries for each GPIO 747In this case, the function array would become 64 entries for each GPIO
655setting and then the device functions. 748setting and then the device functions.
656 749
657For this reason there is an additional function a pinmux driver can implement 750For this reason there are two functions a pinmux driver can implement
658to enable only GPIO on an individual pin: .gpio_request_enable(). The same 751to enable only GPIO on an individual pin: .gpio_request_enable() and
659.free() function as for other functions is assumed to be usable also for 752.gpio_disable_free().
660GPIO pins.
661 753
662This function will pass in the affected GPIO range identified by the pin 754This function will pass in the affected GPIO range identified by the pin
663controller core, so you know which GPIO pins are being affected by the request 755controller core, so you know which GPIO pins are being affected by the request
664operation. 756operation.
665 757
666Alternatively it is fully allowed to use named functions for each GPIO 758If your driver needs to have an indication from the framework of whether the
667pin, the pinmux_request_gpio() will attempt to obtain the function "gpioN" 759GPIO pin shall be used for input or output you can implement the
668where "N" is the global GPIO pin number if no special GPIO-handler is 760.gpio_set_direction() function. As described this shall be called from the
669registered. 761gpiolib driver and the affected GPIO range, pin offset and desired direction
762will be passed along to this function.
763
764Alternatively to using these special functions, it is fully allowed to use
765named functions for each GPIO pin, the pinmux_request_gpio() will attempt to
766obtain the function "gpioN" where "N" is the global GPIO pin number if no
767special GPIO-handler is registered.
670 768
671 769
672Pinmux board/machine configuration 770Pinmux board/machine configuration
@@ -683,19 +781,19 @@ spi on the second function mapping:
683 781
684#include <linux/pinctrl/machine.h> 782#include <linux/pinctrl/machine.h>
685 783
686static struct pinmux_map pmx_mapping[] = { 784static const struct pinmux_map __initdata pmx_mapping[] = {
687 { 785 {
688 .ctrl_dev_name = "pinctrl.0", 786 .ctrl_dev_name = "pinctrl-foo",
689 .function = "spi0", 787 .function = "spi0",
690 .dev_name = "foo-spi.0", 788 .dev_name = "foo-spi.0",
691 }, 789 },
692 { 790 {
693 .ctrl_dev_name = "pinctrl.0", 791 .ctrl_dev_name = "pinctrl-foo",
694 .function = "i2c0", 792 .function = "i2c0",
695 .dev_name = "foo-i2c.0", 793 .dev_name = "foo-i2c.0",
696 }, 794 },
697 { 795 {
698 .ctrl_dev_name = "pinctrl.0", 796 .ctrl_dev_name = "pinctrl-foo",
699 .function = "mmc0", 797 .function = "mmc0",
700 .dev_name = "foo-mmc.0", 798 .dev_name = "foo-mmc.0",
701 }, 799 },
@@ -714,14 +812,14 @@ for example if they are not yet instantiated or cumbersome to obtain.
714 812
715You register this pinmux mapping to the pinmux subsystem by simply: 813You register this pinmux mapping to the pinmux subsystem by simply:
716 814
717 ret = pinmux_register_mappings(&pmx_mapping, ARRAY_SIZE(pmx_mapping)); 815 ret = pinmux_register_mappings(pmx_mapping, ARRAY_SIZE(pmx_mapping));
718 816
719Since the above construct is pretty common there is a helper macro to make 817Since the above construct is pretty common there is a helper macro to make
720it even more compact which assumes you want to use pinctrl.0 and position 818it even more compact which assumes you want to use pinctrl-foo and position
7210 for mapping, for example: 8190 for mapping, for example:
722 820
723static struct pinmux_map pmx_mapping[] = { 821static struct pinmux_map __initdata pmx_mapping[] = {
724 PINMUX_MAP_PRIMARY("I2CMAP", "i2c0", "foo-i2c.0"), 822 PINMUX_MAP("I2CMAP", "pinctrl-foo", "i2c0", "foo-i2c.0"),
725}; 823};
726 824
727 825
@@ -734,14 +832,14 @@ As it is possible to map a function to different groups of pins an optional
734... 832...
735{ 833{
736 .name = "spi0-pos-A", 834 .name = "spi0-pos-A",
737 .ctrl_dev_name = "pinctrl.0", 835 .ctrl_dev_name = "pinctrl-foo",
738 .function = "spi0", 836 .function = "spi0",
739 .group = "spi0_0_grp", 837 .group = "spi0_0_grp",
740 .dev_name = "foo-spi.0", 838 .dev_name = "foo-spi.0",
741}, 839},
742{ 840{
743 .name = "spi0-pos-B", 841 .name = "spi0-pos-B",
744 .ctrl_dev_name = "pinctrl.0", 842 .ctrl_dev_name = "pinctrl-foo",
745 .function = "spi0", 843 .function = "spi0",
746 .group = "spi0_1_grp", 844 .group = "spi0_1_grp",
747 .dev_name = "foo-spi.0", 845 .dev_name = "foo-spi.0",
@@ -760,44 +858,44 @@ case), we define a mapping like this:
760... 858...
761{ 859{
762 .name "2bit" 860 .name "2bit"
763 .ctrl_dev_name = "pinctrl.0", 861 .ctrl_dev_name = "pinctrl-foo",
764 .function = "mmc0", 862 .function = "mmc0",
765 .group = "mmc0_0_grp", 863 .group = "mmc0_1_grp",
766 .dev_name = "foo-mmc.0", 864 .dev_name = "foo-mmc.0",
767}, 865},
768{ 866{
769 .name "4bit" 867 .name "4bit"
770 .ctrl_dev_name = "pinctrl.0", 868 .ctrl_dev_name = "pinctrl-foo",
771 .function = "mmc0", 869 .function = "mmc0",
772 .group = "mmc0_0_grp", 870 .group = "mmc0_1_grp",
773 .dev_name = "foo-mmc.0", 871 .dev_name = "foo-mmc.0",
774}, 872},
775{ 873{
776 .name "4bit" 874 .name "4bit"
777 .ctrl_dev_name = "pinctrl.0", 875 .ctrl_dev_name = "pinctrl-foo",
778 .function = "mmc0", 876 .function = "mmc0",
779 .group = "mmc0_1_grp", 877 .group = "mmc0_2_grp",
780 .dev_name = "foo-mmc.0", 878 .dev_name = "foo-mmc.0",
781}, 879},
782{ 880{
783 .name "8bit" 881 .name "8bit"
784 .ctrl_dev_name = "pinctrl.0", 882 .ctrl_dev_name = "pinctrl-foo",
785 .function = "mmc0", 883 .function = "mmc0",
786 .group = "mmc0_0_grp", 884 .group = "mmc0_1_grp",
787 .dev_name = "foo-mmc.0", 885 .dev_name = "foo-mmc.0",
788}, 886},
789{ 887{
790 .name "8bit" 888 .name "8bit"
791 .ctrl_dev_name = "pinctrl.0", 889 .ctrl_dev_name = "pinctrl-foo",
792 .function = "mmc0", 890 .function = "mmc0",
793 .group = "mmc0_1_grp", 891 .group = "mmc0_2_grp",
794 .dev_name = "foo-mmc.0", 892 .dev_name = "foo-mmc.0",
795}, 893},
796{ 894{
797 .name "8bit" 895 .name "8bit"
798 .ctrl_dev_name = "pinctrl.0", 896 .ctrl_dev_name = "pinctrl-foo",
799 .function = "mmc0", 897 .function = "mmc0",
800 .group = "mmc0_2_grp", 898 .group = "mmc0_3_grp",
801 .dev_name = "foo-mmc.0", 899 .dev_name = "foo-mmc.0",
802}, 900},
803... 901...
@@ -898,7 +996,7 @@ like this:
898 996
899{ 997{
900 .name "POWERMAP" 998 .name "POWERMAP"
901 .ctrl_dev_name = "pinctrl.0", 999 .ctrl_dev_name = "pinctrl-foo",
902 .function = "power_func", 1000 .function = "power_func",
903 .hog_on_boot = true, 1001 .hog_on_boot = true,
904}, 1002},