* [PATCH] Documentation/pinctrl: various minor fixes @ 2011-12-08 22:21 Uwe Kleine-König 2011-12-08 22:24 ` Stephen Warren 0 siblings, 1 reply; 8+ messages in thread From: Uwe Kleine-König @ 2011-12-08 22:21 UTC (permalink / raw) To: Linus Walleij Cc: Stephen Warren, Randy Dunlap, linux-arm-kernel, linux-kernel, linux-doc - add some consts - don't use the group index alone to determine the value to write to foo's mux register. For spi and i2c the group index is always 0. Additionally using the function index makes much more sense as it generates a different value for each function/group pair. - fix a few syntax errors Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> --- Documentation/pinctrl.txt | 28 ++++++++++++++-------------- 1 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Documentation/pinctrl.txt b/Documentation/pinctrl.txt index b04cb7d..27f7759 100644 --- a/Documentation/pinctrl.txt +++ b/Documentation/pinctrl.txt @@ -133,8 +133,8 @@ struct foo_group { const unsigned num_pins; }; -static unsigned int spi0_pins[] = { 0, 8, 16, 24 }; -static unsigned int i2c0_pins[] = { 24, 25 }; +static const unsigned int spi0_pins[] = { 0, 8, 16, 24 }; +static const unsigned int i2c0_pins[] = { 24, 25 }; static const struct foo_group foo_groups[] = { { @@ -585,7 +585,7 @@ int foo_list_funcs(struct pinctrl_dev *pctldev, unsigned selector) const char *foo_get_fname(struct pinctrl_dev *pctldev, unsigned selector) { - return myfuncs[selector].name; + return foo_functions[selector].name; } static int foo_get_groups(struct pinctrl_dev *pctldev, unsigned selector, @@ -600,7 +600,7 @@ static int foo_get_groups(struct pinctrl_dev *pctldev, unsigned selector, int foo_enable(struct pinctrl_dev *pctldev, unsigned selector, unsigned group) { - u8 regbit = (1 << group); + u8 regbit = (1 << selector + group); writeb((readb(MUX)|regbit), MUX) return 0; @@ -609,7 +609,7 @@ int foo_enable(struct pinctrl_dev *pctldev, unsigned selector, int foo_disable(struct pinctrl_dev *pctldev, unsigned selector, unsigned group) { - u8 regbit = (1 << group); + u8 regbit = (1 << selector); writeb((readb(MUX) & ~(regbit)), MUX) return 0; @@ -683,7 +683,7 @@ spi on the second function mapping: #include <linux/pinctrl/machine.h> -static struct pinmux_map pmx_mapping[] = { +static const struct pinmux_map pmx_mapping[] = { { .ctrl_dev_name = "pinctrl.0", .function = "spi0", @@ -714,7 +714,7 @@ for example if they are not yet instantiated or cumbersome to obtain. You register this pinmux mapping to the pinmux subsystem by simply: - ret = pinmux_register_mappings(&pmx_mapping, ARRAY_SIZE(pmx_mapping)); + ret = pinmux_register_mappings(pmx_mapping, ARRAY_SIZE(pmx_mapping)); Since the above construct is pretty common there is a helper macro to make it even more compact which assumes you want to use pinctrl.0 and position @@ -759,42 +759,42 @@ case), we define a mapping like this: ... { - .name "2bit" + .name = "2bit" .ctrl_dev_name = "pinctrl.0", .function = "mmc0", .group = "mmc0_0_grp", .dev_name = "foo-mmc.0", }, { - .name "4bit" + .name = "4bit" .ctrl_dev_name = "pinctrl.0", .function = "mmc0", .group = "mmc0_0_grp", .dev_name = "foo-mmc.0", }, { - .name "4bit" + .name = "4bit" .ctrl_dev_name = "pinctrl.0", .function = "mmc0", .group = "mmc0_1_grp", .dev_name = "foo-mmc.0", }, { - .name "8bit" + .name = "8bit" .ctrl_dev_name = "pinctrl.0", .function = "mmc0", .group = "mmc0_0_grp", .dev_name = "foo-mmc.0", }, { - .name "8bit" + .name = "8bit" .ctrl_dev_name = "pinctrl.0", .function = "mmc0", .group = "mmc0_1_grp", .dev_name = "foo-mmc.0", }, { - .name "8bit" + .name = "8bit" .ctrl_dev_name = "pinctrl.0", .function = "mmc0", .group = "mmc0_2_grp", @@ -897,7 +897,7 @@ This is enabled by simply setting the .hog_on_boot field in the map to true, like this: { - .name "POWERMAP" + .name = "POWERMAP" .ctrl_dev_name = "pinctrl.0", .function = "power_func", .hog_on_boot = true, -- 1.7.7.3 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* RE: [PATCH] Documentation/pinctrl: various minor fixes 2011-12-08 22:21 [PATCH] Documentation/pinctrl: various minor fixes Uwe Kleine-König @ 2011-12-08 22:24 ` Stephen Warren 2011-12-08 22:31 ` Uwe Kleine-König 2011-12-08 22:36 ` [PATCH v2] " Uwe Kleine-König 0 siblings, 2 replies; 8+ messages in thread From: Stephen Warren @ 2011-12-08 22:24 UTC (permalink / raw) To: Uwe Kleine-König, Linus Walleij Cc: Randy Dunlap, linux-arm-kernel, linux-kernel, linux-doc [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1221 bytes --] Uwe Kleine-König wrote at Thursday, December 08, 2011 3:22 PM: > - add some consts > - don't use the group index alone to determine the value to write to > foo's mux register. For spi and i2c the group index is always 0. > Additionally using the function index makes much more sense as it > generates a different value for each function/group pair. > - fix a few syntax errors > @@ -600,7 +600,7 @@ static int foo_get_groups(struct pinctrl_dev *pctldev, unsigned selector, > int foo_enable(struct pinctrl_dev *pctldev, unsigned selector, > unsigned group) > { > - u8 regbit = (1 << group); > + u8 regbit = (1 << selector + group); > > writeb((readb(MUX)|regbit), MUX) > return 0; > @@ -609,7 +609,7 @@ int foo_enable(struct pinctrl_dev *pctldev, unsigned selector, > int foo_disable(struct pinctrl_dev *pctldev, unsigned selector, > unsigned group) > { > - u8 regbit = (1 << group); > + u8 regbit = (1 << selector); > > writeb((readb(MUX) & ~(regbit)), MUX) > return 0; Shouldn't those two regbit calculations match? -- nvpublic ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Documentation/pinctrl: various minor fixes 2011-12-08 22:24 ` Stephen Warren @ 2011-12-08 22:31 ` Uwe Kleine-König 2011-12-08 22:36 ` [PATCH v2] " Uwe Kleine-König 1 sibling, 0 replies; 8+ messages in thread From: Uwe Kleine-König @ 2011-12-08 22:31 UTC (permalink / raw) To: Stephen Warren Cc: Linus Walleij, Randy Dunlap, linux-kernel, linux-arm-kernel, linux-doc On Thu, Dec 08, 2011 at 02:24:46PM -0800, Stephen Warren wrote: > Uwe Kleine-König wrote at Thursday, December 08, 2011 3:22 PM: > > - add some consts > > - don't use the group index alone to determine the value to write to > > foo's mux register. For spi and i2c the group index is always 0. > > Additionally using the function index makes much more sense as it > > generates a different value for each function/group pair. > > - fix a few syntax errors > > > @@ -600,7 +600,7 @@ static int foo_get_groups(struct pinctrl_dev *pctldev, unsigned selector, > > int foo_enable(struct pinctrl_dev *pctldev, unsigned selector, > > unsigned group) > > { > > - u8 regbit = (1 << group); > > + u8 regbit = (1 << selector + group); > > > > writeb((readb(MUX)|regbit), MUX) > > return 0; > > @@ -609,7 +609,7 @@ int foo_enable(struct pinctrl_dev *pctldev, unsigned selector, > > int foo_disable(struct pinctrl_dev *pctldev, unsigned selector, > > unsigned group) > > { > > - u8 regbit = (1 << group); > > + u8 regbit = (1 << selector); > > > > writeb((readb(MUX) & ~(regbit)), MUX) > > return 0; > > Shouldn't those two regbit calculations match? Yes, of course. (Well, it depends on the register model ...) Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ | ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2] Documentation/pinctrl: various minor fixes 2011-12-08 22:24 ` Stephen Warren 2011-12-08 22:31 ` Uwe Kleine-König @ 2011-12-08 22:36 ` Uwe Kleine-König 2011-12-08 22:41 ` Stephen Warren ` (2 more replies) 1 sibling, 3 replies; 8+ messages in thread From: Uwe Kleine-König @ 2011-12-08 22:36 UTC (permalink / raw) To: Linus Walleij, Stephen Warren Cc: Randy Dunlap, linux-kernel, linux-arm-kernel, linux-doc - add some consts - don't use the group index alone to determine the value to write to foo's mux register. For spi and i2c the group index is always 0. Additionally using the function index makes much more sense as it generates a different value for each function/group pair. - fix a few syntax errors Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> --- changes since (implicit) v1: - use the same register bit for disable as is used for enable. Spotted by Stephen. Documentation/pinctrl.txt | 28 ++++++++++++++-------------- 1 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Documentation/pinctrl.txt b/Documentation/pinctrl.txt index b04cb7d..d9bab7b 100644 --- a/Documentation/pinctrl.txt +++ b/Documentation/pinctrl.txt @@ -133,8 +133,8 @@ struct foo_group { const unsigned num_pins; }; -static unsigned int spi0_pins[] = { 0, 8, 16, 24 }; -static unsigned int i2c0_pins[] = { 24, 25 }; +static const unsigned int spi0_pins[] = { 0, 8, 16, 24 }; +static const unsigned int i2c0_pins[] = { 24, 25 }; static const struct foo_group foo_groups[] = { { @@ -585,7 +585,7 @@ int foo_list_funcs(struct pinctrl_dev *pctldev, unsigned selector) const char *foo_get_fname(struct pinctrl_dev *pctldev, unsigned selector) { - return myfuncs[selector].name; + return foo_functions[selector].name; } static int foo_get_groups(struct pinctrl_dev *pctldev, unsigned selector, @@ -600,7 +600,7 @@ static int foo_get_groups(struct pinctrl_dev *pctldev, unsigned selector, int foo_enable(struct pinctrl_dev *pctldev, unsigned selector, unsigned group) { - u8 regbit = (1 << group); + u8 regbit = (1 << selector + group); writeb((readb(MUX)|regbit), MUX) return 0; @@ -609,7 +609,7 @@ int foo_enable(struct pinctrl_dev *pctldev, unsigned selector, int foo_disable(struct pinctrl_dev *pctldev, unsigned selector, unsigned group) { - u8 regbit = (1 << group); + u8 regbit = (1 << selector + group); writeb((readb(MUX) & ~(regbit)), MUX) return 0; @@ -683,7 +683,7 @@ spi on the second function mapping: #include <linux/pinctrl/machine.h> -static struct pinmux_map pmx_mapping[] = { +static const struct pinmux_map pmx_mapping[] = { { .ctrl_dev_name = "pinctrl.0", .function = "spi0", @@ -714,7 +714,7 @@ for example if they are not yet instantiated or cumbersome to obtain. You register this pinmux mapping to the pinmux subsystem by simply: - ret = pinmux_register_mappings(&pmx_mapping, ARRAY_SIZE(pmx_mapping)); + ret = pinmux_register_mappings(pmx_mapping, ARRAY_SIZE(pmx_mapping)); Since the above construct is pretty common there is a helper macro to make it even more compact which assumes you want to use pinctrl.0 and position @@ -759,42 +759,42 @@ case), we define a mapping like this: ... { - .name "2bit" + .name = "2bit" .ctrl_dev_name = "pinctrl.0", .function = "mmc0", .group = "mmc0_0_grp", .dev_name = "foo-mmc.0", }, { - .name "4bit" + .name = "4bit" .ctrl_dev_name = "pinctrl.0", .function = "mmc0", .group = "mmc0_0_grp", .dev_name = "foo-mmc.0", }, { - .name "4bit" + .name = "4bit" .ctrl_dev_name = "pinctrl.0", .function = "mmc0", .group = "mmc0_1_grp", .dev_name = "foo-mmc.0", }, { - .name "8bit" + .name = "8bit" .ctrl_dev_name = "pinctrl.0", .function = "mmc0", .group = "mmc0_0_grp", .dev_name = "foo-mmc.0", }, { - .name "8bit" + .name = "8bit" .ctrl_dev_name = "pinctrl.0", .function = "mmc0", .group = "mmc0_1_grp", .dev_name = "foo-mmc.0", }, { - .name "8bit" + .name = "8bit" .ctrl_dev_name = "pinctrl.0", .function = "mmc0", .group = "mmc0_2_grp", @@ -897,7 +897,7 @@ This is enabled by simply setting the .hog_on_boot field in the map to true, like this: { - .name "POWERMAP" + .name = "POWERMAP" .ctrl_dev_name = "pinctrl.0", .function = "power_func", .hog_on_boot = true, -- 1.7.7.3 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* RE: [PATCH v2] Documentation/pinctrl: various minor fixes 2011-12-08 22:36 ` [PATCH v2] " Uwe Kleine-König @ 2011-12-08 22:41 ` Stephen Warren 2011-12-09 11:02 ` Linus Walleij 2012-01-19 21:35 ` [PATCH] Documentation/pinctrl: fix a few syntax errors in code examples Uwe Kleine-König 2 siblings, 0 replies; 8+ messages in thread From: Stephen Warren @ 2011-12-08 22:41 UTC (permalink / raw) To: Uwe Kleine-König, Linus Walleij Cc: Randy Dunlap, linux-kernel, linux-arm-kernel, linux-doc [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset="utf-8", Size: 677 bytes --] Uwe Kleine-König wrote at Thursday, December 08, 2011 3:36 PM: > - add some consts > - don't use the group index alone to determine the value to write to > foo's mux register. For spi and i2c the group index is always 0. > Additionally using the function index makes much more sense as it > generates a different value for each function/group pair. > - fix a few syntax errors > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Stephen Warren <swarren@nvidia.com> -- nvpublic ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] Documentation/pinctrl: various minor fixes 2011-12-08 22:36 ` [PATCH v2] " Uwe Kleine-König 2011-12-08 22:41 ` Stephen Warren @ 2011-12-09 11:02 ` Linus Walleij 2012-01-19 21:35 ` [PATCH] Documentation/pinctrl: fix a few syntax errors in code examples Uwe Kleine-König 2 siblings, 0 replies; 8+ messages in thread From: Linus Walleij @ 2011-12-09 11:02 UTC (permalink / raw) To: Uwe Kleine-König Cc: Stephen Warren, Randy Dunlap, linux-kernel, linux-arm-kernel, linux-doc 2011/12/8 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>: > - add some consts > - don't use the group index alone to determine the value to write to > foo's mux register. For spi and i2c the group index is always 0. > Additionally using the function index makes much more sense as it > generates a different value for each function/group pair. > - fix a few syntax errors > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Some of these were fixed in earlier documentation patches in my tree, so I took out the pieces that were missing and squashed into that patch. The result now looks like this: commit 478781254aea577029c7872bab5578e98ef0cbad Author: Linus Walleij <linus.walleij@linaro.org> Date: Thu Nov 10 09:27:41 2011 +0100 pinctrl: documentation update Update the docs removing an obsolete __refdata tag and document the mysterious return value of pin_free(). And fixes up some various confusions in the pinctrl documentation. Reported-by: Rajendra Nayak <rnayak@ti.com> Reported-by: Randy Dunlap <rdunlap@xenotime.net> Reported-by: Thomas Abraham <thomas.abraham@linaro.org> Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> diff --git a/Documentation/pinctrl.txt b/Documentation/pinctrl.txt index b04cb7d..0a8b225 100644 --- a/Documentation/pinctrl.txt +++ b/Documentation/pinctrl.txt @@ -32,7 +32,7 @@ Definition of PIN: be sparse - i.e. there may be gaps in the space with numbers where no pin exists. -When a PIN CONTROLLER is instatiated, it will register a descriptor to the +When a PIN CONTROLLER is instantiated, it will register a descriptor to the pin control framework, and this descriptor contains an array of pin descriptors describing the pins handled by this specific pin controller. @@ -61,14 +61,14 @@ this in our driver: #include <linux/pinctrl/pinctrl.h> -const struct pinctrl_pin_desc __refdata foo_pins[] = { - PINCTRL_PIN(0, "A1"), - PINCTRL_PIN(1, "A2"), - PINCTRL_PIN(2, "A3"), +const struct pinctrl_pin_desc foo_pins[] = { + PINCTRL_PIN(0, "A8"), + PINCTRL_PIN(1, "B8"), + PINCTRL_PIN(2, "C8"), ... - PINCTRL_PIN(61, "H6"), - PINCTRL_PIN(62, "H7"), - PINCTRL_PIN(63, "H8"), + PINCTRL_PIN(61, "F1"), + PINCTRL_PIN(62, "G1"), + PINCTRL_PIN(63, "H1"), }; static struct pinctrl_desc foo_desc = { @@ -91,8 +91,8 @@ int __init foo_probe(void) Pins usually have fancier names than this. You can find these in the dataheet for your chip. Notice that the core pinctrl.h file provides a fancy macro called PINCTRL_PIN() to create the struct entries. As you can see I enumerated -the pins from 0 in the upper left corner to 63 in the lower right corner, -this enumeration was arbitrarily chosen, in practice you need to think +the pins from 0 in the upper left corner to 63 in the lower right corner. +This enumeration was arbitrarily chosen, in practice you need to think through your numbering system so that it matches the layout of registers and such things in your driver, or the code may become complicated. You must also consider matching of offsets to the GPIO ranges that may be handled by @@ -133,8 +133,8 @@ struct foo_group { const unsigned num_pins; }; -static unsigned int spi0_pins[] = { 0, 8, 16, 24 }; -static unsigned int i2c0_pins[] = { 24, 25 }; +static const unsigned int spi0_pins[] = { 0, 8, 16, 24 }; +static const unsigned int i2c0_pins[] = { 24, 25 }; static const struct foo_group foo_groups[] = { { @@ -242,7 +242,7 @@ chip a: [32 .. 47] chip b: [48 .. 55] When GPIO-specific functions in the pin control subsystem are called, these -ranges will be used to look up the apropriate pin controller by inspecting +ranges will be used to look up the appropriate pin controller by inspecting and matching the pin to the pin ranges across all controllers. When a pin controller handling the matching range is found, GPIO-specific functions will be called on that specific pin controller. @@ -438,7 +438,7 @@ you. Define enumerators only for the pins you can control if that makes sense. Assumptions: -We assume that the number possible function maps to pin groups is limited by +We assume that the number of possible function maps to pin groups is limited by the hardware. I.e. we assume that there is no system where any function can be mapped to any pin, like in a phone exchange. So the available pins groups for a certain function will be limited to a few choices (say up to eight or so), @@ -585,7 +585,7 @@ int foo_list_funcs(struct pinctrl_dev *pctldev, unsigned selector) const char *foo_get_fname(struct pinctrl_dev *pctldev, unsigned selector) { - return myfuncs[selector].name; + return foo_functions[selector].name; } static int foo_get_groups(struct pinctrl_dev *pctldev, unsigned selector, @@ -600,16 +600,16 @@ static int foo_get_groups(struct pinctrl_dev *pctldev, unsigned selector, int foo_enable(struct pinctrl_dev *pctldev, unsigned selector, unsigned group) { - u8 regbit = (1 << group); + u8 regbit = (1 << selector + group); writeb((readb(MUX)|regbit), MUX) return 0; } -int foo_disable(struct pinctrl_dev *pctldev, unsigned selector, +void foo_disable(struct pinctrl_dev *pctldev, unsigned selector, unsigned group) { - u8 regbit = (1 << group); + u8 regbit = (1 << selector + group); writeb((readb(MUX) & ~(regbit)), MUX) return 0; @@ -683,7 +683,7 @@ spi on the second function mapping: #include <linux/pinctrl/machine.h> -static struct pinmux_map pmx_mapping[] = { +static const struct pinmux_map pmx_mapping[] = { { .ctrl_dev_name = "pinctrl.0", .function = "spi0", @@ -714,7 +714,7 @@ for example if they are not yet instantiated or cumbersome to obtain. You register this pinmux mapping to the pinmux subsystem by simply: - ret = pinmux_register_mappings(&pmx_mapping, ARRAY_SIZE(pmx_mapping)); + ret = pinmux_register_mappings(pmx_mapping, ARRAY_SIZE(pmx_mapping)); Since the above construct is pretty common there is a helper macro to make it even more compact which assumes you want to use pinctrl.0 and position @@ -762,42 +762,42 @@ case), we define a mapping like this: .name "2bit" .ctrl_dev_name = "pinctrl.0", .function = "mmc0", - .group = "mmc0_0_grp", + .group = "mmc0_1_grp", .dev_name = "foo-mmc.0", }, { .name "4bit" .ctrl_dev_name = "pinctrl.0", .function = "mmc0", - .group = "mmc0_0_grp", + .group = "mmc0_1_grp", .dev_name = "foo-mmc.0", }, { .name "4bit" .ctrl_dev_name = "pinctrl.0", .function = "mmc0", - .group = "mmc0_1_grp", + .group = "mmc0_2_grp", .dev_name = "foo-mmc.0", }, { .name "8bit" .ctrl_dev_name = "pinctrl.0", .function = "mmc0", - .group = "mmc0_0_grp", + .group = "mmc0_1_grp", .dev_name = "foo-mmc.0", }, { .name "8bit" .ctrl_dev_name = "pinctrl.0", .function = "mmc0", - .group = "mmc0_1_grp", + .group = "mmc0_2_grp", .dev_name = "foo-mmc.0", }, { .name "8bit" .ctrl_dev_name = "pinctrl.0", .function = "mmc0", - .group = "mmc0_2_grp", + .group = "mmc0_3_grp", .dev_name = "foo-mmc.0", }, ... diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c index c77aee5..0923824 100644 --- a/drivers/pinctrl/pinmux.c +++ b/drivers/pinctrl/pinmux.c @@ -174,6 +174,10 @@ out: * @pin: the pin to free * @gpio_range: the range matching the GPIO pin if this is a request for a * single GPIO pin + * + * This function returns a pointer to the function name in use. This is used + * for callers that dynamically allocate a function name so it can be freed + * once the pin is free. This is done for GPIO request functions. */ static const char *pin_free(struct pinctrl_dev *pctldev, int pin, struct pinctrl_gpio_range *gpio_range) Hope this looks OK for you Uwe. Thanks, Linus Walleij ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] Documentation/pinctrl: fix a few syntax errors in code examples 2011-12-08 22:36 ` [PATCH v2] " Uwe Kleine-König 2011-12-08 22:41 ` Stephen Warren 2011-12-09 11:02 ` Linus Walleij @ 2012-01-19 21:35 ` Uwe Kleine-König 2012-01-24 21:45 ` Linus Walleij 2 siblings, 1 reply; 8+ messages in thread From: Uwe Kleine-König @ 2012-01-19 21:35 UTC (permalink / raw) To: Linus Walleij Cc: Randy Dunlap, linux-kernel, Stephen Warren, linux-arm-kernel Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> --- Hello, this is what's left from the patch I sent in the mail with message-id 1323383765-30742-1-git-send-email-u.kleine-koenig@pengutronix.de after rebasing to current linus/master. The original submission got an ack by Stephen Warren that I assumed for this patch, too. Best regards Uwe Documentation/pinctrl.txt | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Documentation/pinctrl.txt b/Documentation/pinctrl.txt index 6727b92..5324d31 100644 --- a/Documentation/pinctrl.txt +++ b/Documentation/pinctrl.txt @@ -857,42 +857,41 @@ case), we define a mapping like this: ... { - .name "2bit" + .name = "2bit" .ctrl_dev_name = "pinctrl-foo", .function = "mmc0", .group = "mmc0_1_grp", .dev_name = "foo-mmc.0", }, { - .name "4bit" + .name = "4bit" .ctrl_dev_name = "pinctrl-foo", .function = "mmc0", .group = "mmc0_1_grp", .dev_name = "foo-mmc.0", }, { - .name "4bit" + .name = "4bit" .ctrl_dev_name = "pinctrl-foo", .function = "mmc0", .group = "mmc0_2_grp", .dev_name = "foo-mmc.0", }, { - .name "8bit" + .name = "8bit" .ctrl_dev_name = "pinctrl-foo", - .function = "mmc0", .group = "mmc0_1_grp", .dev_name = "foo-mmc.0", }, { - .name "8bit" + .name = "8bit" .ctrl_dev_name = "pinctrl-foo", .function = "mmc0", .group = "mmc0_2_grp", .dev_name = "foo-mmc.0", }, { - .name "8bit" + .name = "8bit" .ctrl_dev_name = "pinctrl-foo", .function = "mmc0", .group = "mmc0_3_grp", @@ -995,7 +994,7 @@ This is enabled by simply setting the .hog_on_boot field in the map to true, like this: { - .name "POWERMAP" + .name = "POWERMAP" .ctrl_dev_name = "pinctrl-foo", .function = "power_func", .hog_on_boot = true, -- 1.7.8.3 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] Documentation/pinctrl: fix a few syntax errors in code examples 2012-01-19 21:35 ` [PATCH] Documentation/pinctrl: fix a few syntax errors in code examples Uwe Kleine-König @ 2012-01-24 21:45 ` Linus Walleij 0 siblings, 0 replies; 8+ messages in thread From: Linus Walleij @ 2012-01-24 21:45 UTC (permalink / raw) To: Uwe Kleine-König Cc: Randy Dunlap, linux-kernel, Stephen Warren, linux-arm-kernel 2012/1/19 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>: > Acked-by: Stephen Warren <swarren@nvidia.com> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > --- > Hello, > > this is what's left from the patch I sent in the mail with message-id > 1323383765-30742-1-git-send-email-u.kleine-koenig@pengutronix.de after > rebasing to current linus/master. The original submission got an ack by > Stephen Warren that I assumed for this patch, too. Thanks, applied it, if there are many doc fixes I will likely squash them however. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-01-24 21:45 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-12-08 22:21 [PATCH] Documentation/pinctrl: various minor fixes Uwe Kleine-König 2011-12-08 22:24 ` Stephen Warren 2011-12-08 22:31 ` Uwe Kleine-König 2011-12-08 22:36 ` [PATCH v2] " Uwe Kleine-König 2011-12-08 22:41 ` Stephen Warren 2011-12-09 11:02 ` Linus Walleij 2012-01-19 21:35 ` [PATCH] Documentation/pinctrl: fix a few syntax errors in code examples Uwe Kleine-König 2012-01-24 21:45 ` Linus Walleij
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).