All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH] gpio: zynq: Setup bank_name to dev->name
Date: Tue, 24 Jul 2018 08:30:24 +0200	[thread overview]
Message-ID: <04f45af5-eb59-f9c1-b96f-2e385a6424d3@xilinx.com> (raw)
In-Reply-To: <CAPnjgZ2q3qf5Ld0RJ7awi=mm1peGie1U+mEf0QdYUp_B=8ZOwg@mail.gmail.com>

On 23.7.2018 20:41, Simon Glass wrote:
> Hi Michal,
> 
> On 23 July 2018 at 03:08, Michal Simek <michal.simek@xilinx.com> wrote:
>>
>> On 20.7.2018 21:31, Stefan Herbrechtsmeier wrote:
>>> Hi Michal,
>>>
>>> Am 12.07.2018 um 16:04 schrieb Michal Simek:
>>>> There should be proper bank name setup to distiguish between different
>>>> gpio drivers. Use dev->name for it.
>>>>
>>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>>> ---
>>>>
>>>>   drivers/gpio/zynq_gpio.c | 2 ++
>>>>   1 file changed, 2 insertions(+)
>>>>
>>>> diff --git a/drivers/gpio/zynq_gpio.c b/drivers/gpio/zynq_gpio.c
>>>> index 26f69b1a713f..f793ee5754a8 100644
>>>> --- a/drivers/gpio/zynq_gpio.c
>>>> +++ b/drivers/gpio/zynq_gpio.c
>>>> @@ -337,6 +337,8 @@ static int zynq_gpio_probe(struct udevice *dev)
>>>>       struct zynq_gpio_privdata *priv = dev_get_priv(dev);
>>>>       struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
>>>>   +    uc_priv->bank_name = dev->name;
>>>> +
>>>>       if (priv->p_data)
>>>>           uc_priv->gpio_count = priv->p_data->ngpio;
>>>>
>>> Does this not lead to ugly names because the gpio number is append to
>>> the bank_name? Have you check the "gpio status -a" output?
>>
>> Yes I was checking it. Names are composed together but also just numbers
>> works as before.
>>
>> gpio at ff0a00000: input: 0 [ ]
>> gpio at ff0a00001: input: 0 [ ]
>> gpio at ff0a00002: input: 0 [ ]
>> gpio at ff0a00003: input: 0 [ ]
>> gpio at ff0a00004: input: 0 [ ]
>> gpio at ff0a00005: input: 0 [ ]
>> gpio at ff0a00006: input: 0 [ ]
>> gpio at ff0a00007: input: 0 [ ]
>> gpio at ff0a00008: input: 0 [ ]
>> gpio at ff0a00009: input: 0 [ ]
>>
>> If you know better way how to setup a bank name please let me know but I
>> need to distinguish ps gpio from pl one and for pl we need to know the
>> address.
>>
>>>
>>> Other drivers use the gpio-bank-name from the device tree.
>>
>> I can't see this property inside Linux kernel. If this has been reviewed
>> by dt guys please let me know.
> 
> Linux doesn't have this concept and has no command line. I am
> skeptical they would be interested in adding the property.
> 
> If we can get this in by renaming it (e.g. to u-boot,gpio-bank-name)
> then that would be OK. Otherwise I think we just have to rely on
> having our own binding file.

There is a label property which could be used instead.

Thanks,
Michal

      reply	other threads:[~2018-07-24  6:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-12 14:04 [U-Boot] [RFC PATCH] gpio: zynq: Setup bank_name to dev->name Michal Simek
2018-07-16  5:19 ` Simon Glass
2018-07-16  5:26   ` Michal Simek
2018-07-20 19:31 ` Stefan Herbrechtsmeier
2018-07-23  9:08   ` Michal Simek
2018-07-23 18:29     ` Stefan Herbrechtsmeier
2018-07-24  8:37       ` Michal Simek
2018-07-24 19:39         ` Stefan Herbrechtsmeier
2018-07-25  6:07           ` Michal Simek
2018-07-25 19:17             ` Stefan Herbrechtsmeier
2018-07-26  8:22               ` Michal Simek
2018-07-26 20:04                 ` Stefan Herbrechtsmeier
2018-07-27  6:42                   ` Michal Simek
2018-07-27  9:14                     ` Stefan Herbrechtsmeier
2018-07-30  8:00                       ` Michal Simek
2018-08-01 18:23                         ` Stefan Herbrechtsmeier
2018-08-02 11:33                           ` Michal Simek
2018-07-23 18:41     ` Simon Glass
2018-07-24  6:30       ` Michal Simek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=04f45af5-eb59-f9c1-b96f-2e385a6424d3@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.