lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8ead668a-2a1a-916a-585b-ac9830fdf490@linux.intel.com>
Date:   Thu, 3 Jan 2019 11:30:16 +0200
From:   "Fried, Ramon" <ramon.fried@...ux.intel.com>
To:     Vladimir Zapolskiy <vladimir_zapolskiy@...tor.com>,
        linus.walleij@...aro.org, bgolaszewski@...libre.com,
        linux-gpio@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, vladimir.kondratiev@...ux.intel.com
Subject: Re: RFC: gpio: mmio: add support for 3 direction regs


On 1/3/2019 10:59, Vladimir Zapolskiy wrote:
> On 01/03/2019 10:51 AM, Fried, Ramon wrote:
>> On 1/3/2019 10:07, Vladimir Zapolskiy wrote:
>>> Hi Ramon,
>>>
>>> On 01/03/2019 09:36 AM, Fried, Ramon wrote:
>>>> Hi.
>>>>
>>>> I'm working on a driver for STA2X11 GPIO controller who seems to fit
>>>> best to the generic mmio driver,
>>> I hope you have seen the existing driver drivers/gpio/gpio-sta2x11.c
>> I surely did. we have the same IP in our soc but it was changed a lot
>> internally, don't want to litter the original.
>>>> the only problem I have is with the dir register case. The STA2X11
>>>> has 3 registers for dir, one for data, one for set and one for
>>>> clear. The generic-mmio driver has support for this fashion for the
>>>> dat & set & clear registers but not for dirout/dirin registers.
>>>>
>>>> I wonder if support for this is generic enough to deserve a patch, if
>>>> so I'm willing to quickly add this support, if not, adding a flag
>>>> such as below, will allow partly using the generic mmio driver only
>>>> for set/get and the direction can be handled outside the driver.
>>>>
>>> If gpio-mmio fits well, then it might be simpler to set a flag
>>> BGPIOF_UNREADABLE_REG_DIR, then call bgpio_init() and then overwrite
>>> .direction_input, .direction_output and .get_direction callbacks,
>>> as a reference you can take a look at gpio-74xx-mmio.c
>> Nice.
>> That's an option I didn't think of, better than setting the flag.
>> what about adding the generic support ?
> Setting a GPIO direction over three different registers doesn't sound
> as a suitable candidate for generalization, also your particular
> implementation is partial, relies on external platform/driver code
> to preset the directions and it does not allow to change direction
> in runtime, so just renounce the idea.

Alrighty then, will overwrite the direction CBs.

Thanks.

>
> --
> Best wishes,
> Vladimir

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ