Re: [U-Boot] [PATCH v3 1/2] gpio: Add struct reset_ctl_bulk

2018-08-28 Thread Marek Vasut
On 08/29/2018 03:28 AM, Ley Foon Tan wrote:
> On Tue, Aug 28, 2018 at 5:53 PM Marek Vasut  wrote:
>>
>> On 08/28/2018 06:07 PM, Ley Foon Tan wrote:
>>> Add struct reset_ctl_bulk to struct gpio_dev_priv to support reset control
>>> in GPIO driver.
>>>
>>> Signed-off-by: Ley Foon Tan 
>>
>> Isn't this reset support supposed to be driver specific, and thus part
>> of driver private data ?
> 
> Just notice not all gpio node have sub gpio port node. platdata in
> dwgpio drivers is per gpio port.
> Will abandon this patch and add a platdata struct for dwgpio parent device.

That's probably a good idea.

-- 
Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 1/2] gpio: Add struct reset_ctl_bulk

2018-08-28 Thread Ley Foon Tan
On Tue, Aug 28, 2018 at 5:53 PM Marek Vasut  wrote:
>
> On 08/28/2018 06:07 PM, Ley Foon Tan wrote:
> > Add struct reset_ctl_bulk to struct gpio_dev_priv to support reset control
> > in GPIO driver.
> >
> > Signed-off-by: Ley Foon Tan 
>
> Isn't this reset support supposed to be driver specific, and thus part
> of driver private data ?

Just notice not all gpio node have sub gpio port node. platdata in
dwgpio drivers is per gpio port.
Will abandon this patch and add a platdata struct for dwgpio parent device.

>
> > ---
> >  include/asm-generic/gpio.h |2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> >
> > diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
> > index d036026..9fd5808 100644
> > --- a/include/asm-generic/gpio.h
> > +++ b/include/asm-generic/gpio.h
> > @@ -8,6 +8,7 @@
> >  #define _ASM_GENERIC_GPIO_H_
> >
> >  #include 
> > +#include 
> >
> >  struct ofnode_phandle_args;
> >
> > @@ -318,6 +319,7 @@ struct gpio_dev_priv {
> >   unsigned gpio_count;
> >   unsigned gpio_base;
> >   char **name;
> > + struct reset_ctl_bulk resets;
> >  };
> >
> >  /* Access the GPIO operations for a device */
> >
>
>
Regards
Ley Foon
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 1/2] gpio: Add struct reset_ctl_bulk

2018-08-28 Thread Marek Vasut
On 08/28/2018 06:07 PM, Ley Foon Tan wrote:
> Add struct reset_ctl_bulk to struct gpio_dev_priv to support reset control
> in GPIO driver.
> 
> Signed-off-by: Ley Foon Tan 

Isn't this reset support supposed to be driver specific, and thus part
of driver private data ?

> ---
>  include/asm-generic/gpio.h |2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
> index d036026..9fd5808 100644
> --- a/include/asm-generic/gpio.h
> +++ b/include/asm-generic/gpio.h
> @@ -8,6 +8,7 @@
>  #define _ASM_GENERIC_GPIO_H_
>  
>  #include 
> +#include 
>  
>  struct ofnode_phandle_args;
>  
> @@ -318,6 +319,7 @@ struct gpio_dev_priv {
>   unsigned gpio_count;
>   unsigned gpio_base;
>   char **name;
> + struct reset_ctl_bulk resets;
>  };
>  
>  /* Access the GPIO operations for a device */
> 


-- 
Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v3 1/2] gpio: Add struct reset_ctl_bulk

2018-08-28 Thread Ley Foon Tan
Add struct reset_ctl_bulk to struct gpio_dev_priv to support reset control
in GPIO driver.

Signed-off-by: Ley Foon Tan 
---
 include/asm-generic/gpio.h |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index d036026..9fd5808 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -8,6 +8,7 @@
 #define _ASM_GENERIC_GPIO_H_
 
 #include 
+#include 
 
 struct ofnode_phandle_args;
 
@@ -318,6 +319,7 @@ struct gpio_dev_priv {
unsigned gpio_count;
unsigned gpio_base;
char **name;
+   struct reset_ctl_bulk resets;
 };
 
 /* Access the GPIO operations for a device */
-- 
1.7.1

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot