Re: Userspace and Device-Tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Fri, Aug 28, 2015 at 11:52 AM, Mark Brown <broonie@xxxxxxxxxx> wrote:
> On Fri, Aug 28, 2015 at 11:43:19AM -0700, Chris Read wrote:

> Please delete unneeded context from your replies, it makes it much
> easier to find any new content you have added.
Thanks.  I'll do better.

> Sure, but that's just a normal driver...  ideally for these sorts of
> connectors there'd also be a way of enumerating anything that is
> connected (but often that's not specified).

So for such a connector, would it be appropriate to have a kernel
module that gets configured using DT data, that is intended to be
an "enumerator" of GPIOs, in that it configures them (sets them to
input/output, gives labels, etc.), and also exposes them to
userspace (if specified in the configuration data)?

>> > A driver can instantiate a userspace consummer if it finds that useful.
>
>> There is a userspace power-regulator consumer driver (found in
>> drivers/regulator/userspace-consumer.c) that was created to do
>> just that.  It allows hooking up a userspace controlled consumer
>> to any regulator allowing control from userspace.  So far so good.
>
> No, you're missing the point.  The point is that that driver can be
> instantiated from another device (one that describes the actual
> hardware) if it is useful to do so.
Perhaps I'm misunderstanding.  Is there already a board-specific
not driver-specific way to have the userspace-consumer get attached
to a regulator?  Can you point me at it?

> I'd be very cautious about general drivers exposing regulators to
> userspace at all...

Certainly most don't.  We have externally powered devices that we
want to power on and off, though, so sometimes it's helpful.

Thanks,

Chris
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux