Re: [RESEND PATCH v4 1/6] regulator: lm363x: Make the gpio register enable flexible
From: Mark Brown
Date: Wed May 29 2019 - 11:13:40 EST
On Wed, May 29, 2019 at 06:51:32AM -0500, Dan Murphy wrote:
> Although I don't disagree with you I don't see how the interface is fragile
> with only these 3 regulators defined.
> Would it not be prudent to amend this driver if/when a new regulator is
> needed that has a different enable bit/register combination? And if that
The fragility I'm worried about is someone forgetting to make suitable
updates, especially if they don't use the feature in their own system.
> was the case I would almost expect a different driver completely if the
> regmap did not line up correctly. I only reused this driver because the
> registers and bits lined up and did not think it was necessary to create a
> whole new driver.
This is a single register bit which is set once on startup isn't it? It
seems like exactly the sort of thing that a hardware designer might
change incompatibly, perhaps even for good reasons like adding more
flexibility over which pins can be used to control the enable and far
from something that would require a totally new driver if it was handled
differently.
Attachment:
signature.asc
Description: PGP signature