Re: [PATCH v11 3/7] anybus-s: support the Arcx anybus controller

From: Enrico Weigelt, metux IT consult
Date: Thu Apr 18 2019 - 04:17:43 EST


On 17.04.19 16:17, Sven Van Asbroeck wrote:

<snip>

> The input subsystem is concerned with input from humans?
Not necessarily.

> But in this case, it's really a power output from an external card
> on a PCB assembly. Regulator seemed the kernel abstraction
> closest to what this actually represents.

IMHO, regulator framework is for actually controlling power supplies
and things like some device driver asking for powering it's device.

Let's recap what the regulator framework was invented for:

* on many boards, some devices need to be explicitly powered
(or are powered off for power saving) via external regulators
* these regulators usually are generic chips, just wired up
differently on the individual boards

If I understood you correctly, your controller has an generic
digital input, which you just use for monitoring that external
power supply in your specific usecase - while other folks might
attach completely different things here.

The really "formally correct" way, the pure doctine, IMHO would
be having that line as a generic input, and in case that there
really is this some power readback connected here, bind it to
a generic driver. (of course, pure doctrine isn't necessarily
the best way to do things)

> I'm honestly not fully satisfied by the use of the regulator
> abstraction here. If you know of a different abstraction
> which seems better, I'll definitely consider it.

hmm, maybe we should talk about what is actually done with
this information.

can you give some practical usecases ?


--mtx

--
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@xxxxxxxxx -- +49-151-27565287