Re: [PATCH 2/2] reset: Add basic single-register reset driver

From: Andy Shevchenko
Date: Mon May 29 2017 - 11:41:19 EST


On Mon, May 29, 2017 at 1:24 PM, Joel Stanley <joel@xxxxxxxxx> wrote:
> On Sun, May 28, 2017 at 12:41 AM, Andy Shevchenko
> <andy.shevchenko@xxxxxxxxx> wrote:
>> On Fri, May 26, 2017 at 6:32 AM, Joel Stanley <joel@xxxxxxxxx> wrote:
>>> This driver is a basic single-register reset controller driver that
>>> supports clearing a single bit in a register.
>>>
>>
>> While this makes sense, I'm wondering if there can be generic
>> interface for this from which we can derive this one and GPIO-based
>> one.
>
> Do we have a GPIO based one already? I couldn't find it.

No, we haven't.

> Having a think, it would be a very similar looking driver, but with
> little shared code. The context struct would contain a gpio pointer
> instead of regmap, probe would request a GPIO instead of a regmap and
> the assert/deassert/status callbacks would be gpiod_ calls.
>
> Given this is four of the four functions in this driver, do you think would be
> better off with two small drivers?

Fair enough.
Sounds like independent drivers for now is a good approach, though
it's up to maintainer.

--
With Best Regards,
Andy Shevchenko