* RE: [PATCH] Documentation: Add examples to samsung-pinctrl device tree bindings documentation
2013-06-17 10:44 [PATCH] Documentation: Add examples to samsung-pinctrl device tree bindings documentation Leela Krishna Amudala
@ 2013-06-17 11:57 ` Kukjin Kim
2013-06-17 11:59 ` Kukjin Kim
2013-06-17 12:10 ` Tomasz Figa
2 siblings, 0 replies; 5+ messages in thread
From: Kukjin Kim @ 2013-06-17 11:57 UTC (permalink / raw)
To: 'Leela Krishna Amudala', linux-samsung-soc
Cc: devicetree-discuss, dianders
Leela Krishna Amudala wrote:
>
> This patch adds examples to samsung-pinctrl.txt documentaion file
> on how to make gpio binding and gpio request
>
> Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
> Reviewed-by: Doug Anderson <dianders@chromium.org>
> ---
> .../bindings/pinctrl/samsung-pinctrl.txt | 48
> +++++++++++++++++++-
> 1 file changed, 46 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
> b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
> index b2bc219..f1cf177 100644
> --- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
> +++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
> @@ -25,8 +25,18 @@ Required Properties:
>
> - gpio-controller: identifies the node as a gpio controller and pin
> bank.
> - #gpio-cells: number of cells in GPIO specifier. Since the generic
> GPIO
> - binding is used, the amount of cells must be specified as 2. See
> generic
> - GPIO binding documentation for description of particular cells.
> + binding is used, the amount of cells must be specified as 2. See the
> below
> + mentioned gpio binding representation for description of particular
> cells.
> +
> + Eg: <&gpx2 6 0>
> + <[phandle of the gpio controller node]
> + [pin number within the gpio controller]
> + [flags]>
> +
> + Values for gpio specifier:
> + - Pin number: is a value between 0 to 7.
> + - Flags: 0 - Active High
> + 1 - Active Low
>
> - Pin mux/config groups as child nodes: The pin mux (selecting pin
> function
> mode) and pin config (pull up/down, driver strength) settings are
> represented
> @@ -274,3 +284,37 @@ Example 4: Set up the default pin state for uart
> controller.
>
> pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
> }
> +
> +Example 5: A display port client node that supports 'default' pinctrl
> state
> + and gpio binding.
> +
> + display-port-controller {
> + samsung,color-space = <0>;
> + samsung,dynamic-range = <0>;
> + samsung,ycbcr-coeff = <0>;
> + samsung,color-depth = <1>;
> + samsung,link-rate = <0x06>;
> + samsung,lane-count = <2>;
> + samsung,hpd-gpio = <&gpx2 6 0>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&dp_hpd>;
> + };
> +
> +Example 6: Request the gpio for display port controller
> +
> + static int exynos_dp_probe(struct platform_device *pdev)
> + {
> + int hpd_gpio, ret;
> + struct device *dev = &pdev->dev;
> + struct device_node *dp_node = dev->of_node;
> +
> + /* ... */
> +
> + hpd_gpio = of_get_named_gpio(dp_node, "samsung,hpd-gpio",
0);
> +
> + /* ... */
> +
> + ret = devm_gpio_request_one(&pdev->dev, hpd_gpio, GPIOF_IN,
> + "hpd_gpio");
> + /* ... */
> + }
> --
> 1.7.9.5
Looks good to me, applied.
Thanks,
- Kukjin
^ permalink raw reply [flat|nested] 5+ messages in thread* RE: [PATCH] Documentation: Add examples to samsung-pinctrl device tree bindings documentation
2013-06-17 10:44 [PATCH] Documentation: Add examples to samsung-pinctrl device tree bindings documentation Leela Krishna Amudala
2013-06-17 11:57 ` Kukjin Kim
@ 2013-06-17 11:59 ` Kukjin Kim
2013-06-17 12:10 ` Tomasz Figa
2 siblings, 0 replies; 5+ messages in thread
From: Kukjin Kim @ 2013-06-17 11:59 UTC (permalink / raw)
To: 'Kukjin Kim', 'Leela Krishna Amudala',
linux-samsung-soc
Cc: devicetree-discuss, dianders, 'Linus Walleij'
Kukjin Kim wrote:
>
> Leela Krishna Amudala wrote:
> >
> > This patch adds examples to samsung-pinctrl.txt documentaion file
> > on how to make gpio binding and gpio request
> >
> > Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
> > Reviewed-by: Doug Anderson <dianders@chromium.org>
> > ---
> > .../bindings/pinctrl/samsung-pinctrl.txt | 48
> > +++++++++++++++++++-
> > 1 file changed, 46 insertions(+), 2 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-
> pinctrl.txt
> > b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
> > index b2bc219..f1cf177 100644
> > --- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
> > +++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
> > @@ -25,8 +25,18 @@ Required Properties:
> >
> > - gpio-controller: identifies the node as a gpio controller and pin
> > bank.
> > - #gpio-cells: number of cells in GPIO specifier. Since the generic
> > GPIO
> > - binding is used, the amount of cells must be specified as 2. See
> > generic
> > - GPIO binding documentation for description of particular cells.
> > + binding is used, the amount of cells must be specified as 2. See
the
> > below
> > + mentioned gpio binding representation for description of particular
> > cells.
> > +
> > + Eg: <&gpx2 6 0>
> > + <[phandle of the gpio controller node]
> > + [pin number within the gpio controller]
> > + [flags]>
> > +
> > + Values for gpio specifier:
> > + - Pin number: is a value between 0 to 7.
> > + - Flags: 0 - Active High
> > + 1 - Active Low
> >
> > - Pin mux/config groups as child nodes: The pin mux (selecting pin
> > function
> > mode) and pin config (pull up/down, driver strength) settings are
> > represented
> > @@ -274,3 +284,37 @@ Example 4: Set up the default pin state for uart
> > controller.
> >
> > pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
> > }
> > +
> > +Example 5: A display port client node that supports 'default' pinctrl
> > state
> > + and gpio binding.
> > +
> > + display-port-controller {
> > + samsung,color-space = <0>;
> > + samsung,dynamic-range = <0>;
> > + samsung,ycbcr-coeff = <0>;
> > + samsung,color-depth = <1>;
> > + samsung,link-rate = <0x06>;
> > + samsung,lane-count = <2>;
> > + samsung,hpd-gpio = <&gpx2 6 0>;
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&dp_hpd>;
> > + };
> > +
> > +Example 6: Request the gpio for display port controller
> > +
> > + static int exynos_dp_probe(struct platform_device *pdev)
> > + {
> > + int hpd_gpio, ret;
> > + struct device *dev = &pdev->dev;
> > + struct device_node *dp_node = dev->of_node;
> > +
> > + /* ... */
> > +
> > + hpd_gpio = of_get_named_gpio(dp_node, "samsung,hpd-gpio",
0);
> > +
> > + /* ... */
> > +
> > + ret = devm_gpio_request_one(&pdev->dev, hpd_gpio, GPIOF_IN,
> > + "hpd_gpio");
> > + /* ... */
> > + }
> > --
> > 1.7.9.5
>
> Looks good to me, applied.
>
(+ Linus Walleij)
Hmm, probably I need Linus' ack on this ;-)
- Kukjin
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] Documentation: Add examples to samsung-pinctrl device tree bindings documentation
2013-06-17 10:44 [PATCH] Documentation: Add examples to samsung-pinctrl device tree bindings documentation Leela Krishna Amudala
2013-06-17 11:57 ` Kukjin Kim
2013-06-17 11:59 ` Kukjin Kim
@ 2013-06-17 12:10 ` Tomasz Figa
2013-06-17 12:28 ` Leela Krishna Amudala
2 siblings, 1 reply; 5+ messages in thread
From: Tomasz Figa @ 2013-06-17 12:10 UTC (permalink / raw)
To: Leela Krishna Amudala
Cc: linux-samsung-soc, devicetree-discuss, kgene.kim, dianders
Hi Leela,
On Monday 17 of June 2013 16:14:55 Leela Krishna Amudala wrote:
> This patch adds examples to samsung-pinctrl.txt documentaion file
> on how to make gpio binding and gpio request
>
> Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
> Reviewed-by: Doug Anderson <dianders@chromium.org>
> ---
> .../bindings/pinctrl/samsung-pinctrl.txt | 48
> +++++++++++++++++++- 1 file changed, 46 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
> b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt index
> b2bc219..f1cf177 100644
> --- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
> +++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
> @@ -25,8 +25,18 @@ Required Properties:
>
> - gpio-controller: identifies the node as a gpio controller and pin bank.
> - #gpio-cells: number of cells in GPIO specifier. Since the generic GPIO -
> binding is used, the amount of cells must be specified as 2. See generic
> - GPIO binding documentation for description of particular cells. +
> binding is used, the amount of cells must be specified as 2. See the below
> + mentioned gpio binding representation for description of particular
> cells. +
> + Eg: <&gpx2 6 0>
> + <[phandle of the gpio controller node]
> + [pin number within the gpio controller]
> + [flags]>
> +
> + Values for gpio specifier:
> + - Pin number: is a value between 0 to 7.
> + - Flags: 0 - Active High
> + 1 - Active Low
>
> - Pin mux/config groups as child nodes: The pin mux (selecting pin function
> mode) and pin config (pull up/down, driver strength) settings are
> represented @@ -274,3 +284,37 @@ Example 4: Set up the default pin state
> for uart controller.
>
> pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
> }
> +
> +Example 5: A display port client node that supports 'default' pinctrl state
> + and gpio binding.
> +
> + display-port-controller {
> + samsung,color-space = <0>;
> + samsung,dynamic-range = <0>;
> + samsung,ycbcr-coeff = <0>;
> + samsung,color-depth = <1>;
> + samsung,link-rate = <0x06>;
> + samsung,lane-count = <2>;
Maybe it would be better to omit those properties above for readability of the
example? Just like you did with example 6.
But generally it's a good addition to our documentation. Thanks.
Best regards,
Tomasz
> + samsung,hpd-gpio = <&gpx2 6 0>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&dp_hpd>;
> + };
> +
> +Example 6: Request the gpio for display port controller
> +
> + static int exynos_dp_probe(struct platform_device *pdev)
> + {
> + int hpd_gpio, ret;
> + struct device *dev = &pdev->dev;
> + struct device_node *dp_node = dev->of_node;
> +
> + /* ... */
> +
> + hpd_gpio = of_get_named_gpio(dp_node, "samsung,hpd-gpio", 0);
> +
> + /* ... */
> +
> + ret = devm_gpio_request_one(&pdev->dev, hpd_gpio, GPIOF_IN,
> + "hpd_gpio");
> + /* ... */
> + }
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] Documentation: Add examples to samsung-pinctrl device tree bindings documentation
2013-06-17 12:10 ` Tomasz Figa
@ 2013-06-17 12:28 ` Leela Krishna Amudala
0 siblings, 0 replies; 5+ messages in thread
From: Leela Krishna Amudala @ 2013-06-17 12:28 UTC (permalink / raw)
To: Tomasz Figa
Cc: Leela Krishna Amudala, linux-samsung-soc,
devicetree-discuss@lists.ozlabs.org, Kukjin Kim, Doug Anderson
Hi Tomasz,
Thanks for reviewing the patch.
Will post version 2 soon addressing your comments.
Best Wishes,
Leela Krishna.
On Mon, Jun 17, 2013 at 5:40 PM, Tomasz Figa <t.figa@samsung.com> wrote:
> Hi Leela,
>
> On Monday 17 of June 2013 16:14:55 Leela Krishna Amudala wrote:
>> This patch adds examples to samsung-pinctrl.txt documentaion file
>> on how to make gpio binding and gpio request
>>
>> Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
>> Reviewed-by: Doug Anderson <dianders@chromium.org>
>> ---
>> .../bindings/pinctrl/samsung-pinctrl.txt | 48
>> +++++++++++++++++++- 1 file changed, 46 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
>> b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt index
>> b2bc219..f1cf177 100644
>> --- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
>> +++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
>> @@ -25,8 +25,18 @@ Required Properties:
>>
>> - gpio-controller: identifies the node as a gpio controller and pin bank.
>> - #gpio-cells: number of cells in GPIO specifier. Since the generic GPIO -
>> binding is used, the amount of cells must be specified as 2. See generic
>> - GPIO binding documentation for description of particular cells. +
>> binding is used, the amount of cells must be specified as 2. See the below
>> + mentioned gpio binding representation for description of particular
>> cells. +
>> + Eg: <&gpx2 6 0>
>> + <[phandle of the gpio controller node]
>> + [pin number within the gpio controller]
>> + [flags]>
>> +
>> + Values for gpio specifier:
>> + - Pin number: is a value between 0 to 7.
>> + - Flags: 0 - Active High
>> + 1 - Active Low
>>
>> - Pin mux/config groups as child nodes: The pin mux (selecting pin function
>> mode) and pin config (pull up/down, driver strength) settings are
>> represented @@ -274,3 +284,37 @@ Example 4: Set up the default pin state
>> for uart controller.
>>
>> pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
>> }
>> +
>> +Example 5: A display port client node that supports 'default' pinctrl state
>> + and gpio binding.
>> +
>> + display-port-controller {
>> + samsung,color-space = <0>;
>> + samsung,dynamic-range = <0>;
>> + samsung,ycbcr-coeff = <0>;
>> + samsung,color-depth = <1>;
>> + samsung,link-rate = <0x06>;
>> + samsung,lane-count = <2>;
>
> Maybe it would be better to omit those properties above for readability of the
> example? Just like you did with example 6.
>
> But generally it's a good addition to our documentation. Thanks.
>
> Best regards,
> Tomasz
>
>> + samsung,hpd-gpio = <&gpx2 6 0>;
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&dp_hpd>;
>> + };
>> +
>> +Example 6: Request the gpio for display port controller
>> +
>> + static int exynos_dp_probe(struct platform_device *pdev)
>> + {
>> + int hpd_gpio, ret;
>> + struct device *dev = &pdev->dev;
>> + struct device_node *dp_node = dev->of_node;
>> +
>> + /* ... */
>> +
>> + hpd_gpio = of_get_named_gpio(dp_node, "samsung,hpd-gpio", 0);
>> +
>> + /* ... */
>> +
>> + ret = devm_gpio_request_one(&pdev->dev, hpd_gpio, GPIOF_IN,
>> + "hpd_gpio");
>> + /* ... */
>> + }
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread