# Re: \[RFC 09/11\] tools: gpio: Add new hardware clock type

- From: Kent Gibson \<warthog618@gmail.com\>
- Date: 2021-07-31 06:16:28 
- List: linux-devicetree
- Page: https://ratatoskr.run/linux-devicetree/2021/07/1463935
- Thread: https://ratatoskr.run/linux-tegra/2021/06/1426429/t.md

```text
On Thu, Jul 29, 2021 at 08:17:22PM -0700, Dipen Patel wrote:
> 
> On 6/27/21 4:36 AM, Linus Walleij wrote:
> > On Sat, Jun 26, 2021 at 1:48 AM Dipen Patel [ref] wrote:
> >
> >> gpiolib-cdev is extended to support hardware clock type, this
> >> patch reflects that fact.
> >>
> >> Signed-off-by: Dipen Patel <dipenp@nvidia.com>
> > (...)
> >>                 case 'w':
> >>                         config.flags |= GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME;
> >>                         break;
> >> +               case 't':
> >> +                       config.flags |= GPIO_V2_LINE_FLAG_EVENT_CLOCK_HARDWARE;
> >> +                       break;
> > After the checking of the command line options we need a small sanity
> > check so we don't try to enable both realtime and hardware clock
> > at the same time, we will only be able to request one of them.
> 
> This will any way fail at gpiolib-cdev layer. Do we want to add it here
> 
> as well?
> 

I can't speak for Linus, but I'm fine with it as is as it allows the tool
to be used to exercise the sanity check in the kernel.

Cheers,
Kent.

```
