[PATCH 1/2] spi: bcm2835: add spi-bcm2835aux driver for the auxiliar spi1 and spi2

Martin Sperl kernel at martin.sperl.org
Wed Jul 29 14:16:15 PDT 2015



> On 29.07.2015, at 18:37, Stefan Wahren <info at lategoodbye.de> wrote:
> 
> Hi Martin,
> 
>> Am 28.07.2015 um 12:48 schrieb Martin Sperl:
>>> On 28.07.2015 08:18, Martin Sperl wrote:
>>> Hi Stephen!
>>> But the bigger question you have not answered is: “where should such an
>>> auxiliar driver go in the kernel tree?” i.e. which directory?
>> One thing: could the "module" be a regulator?
> 
> IMHO that won't be acceptable.
Why would it not be acceptable?

It provides all sorts of methods and you do not have to implement all of them.
Enable and disable would be sufficient.
On top it would be a generic interface.

Even the mcp251x can driver uses 2 of those to enable/disable  the controller chip 
and the transceiver (and 2 dummy regulators if none are defined) 
There are also gpio regulators to switch a gpio to enable/disable a power-supply.

So with all those features it should be fairly standard to be used for
such things.

See here for a bit of documentation:
http://lxr.free-electrons.com/source/Documentation/power/regulator/design.txt
http://lxr.free-electrons.com/source/Documentation/power/regulator/consumer.txt
(Especially point 2 about enable/disable)

> How about a multifunction device driver (drivers/mfd)?
> Other candidates could be drivers/soc or drivers/misc.
Also possible...

Martin


More information about the linux-rpi-kernel mailing list