> On Jan 12, 2022, at 9:08 AM, Jason Thorpe <thor...@me.com> wrote:
> 
> 
> 
>> On Jan 12, 2022, at 8:02 AM, Taylor R Campbell 
>> <campbell+netbsd-tech-k...@mumble.net> wrote:
>> 
>>> Date: Wed, 12 Jan 2022 15:42:17 +0000
>>> From: Robert Swindells <r...@fdy2.co.uk>
>>> 
>>> I'm guessing this is a platform that doesn't use FDT.
>>> 
>>> Maybe we need a more general API for regulators.
>> 
>> What other instances would a more general API cover?  Is there some
>> ACPI interface for regulators?
> 
> The ACPI interface for regulators is usually "put device into power state X", 
> but of course that depends on the right ASL being present in the node for the 
> device.

(Of course I mean AML here, but of course it's all initially written in ASL, 
so...)

> 
>>> The current situation causes a fair bit of "#ifdef FDT" in the drm
>>> compat code.
>> 
>> I count 1:
>> 
>> https://nxr.netbsd.org/xref/src/sys/external/bsd/drm2/include/linux/regulator/consumer.h?r=1.5#39
>> 
>> Am I missing some?
>> 
>> There's also one in linux/clk.h, for clocks, and two in nouveau_pci.c
>> and radeon_pci.c, for kicking out the FBT framebuffer; these don't
>> appear to be relevant to regulators.
> 
> Any place where there's an "#ifdef FDT" is a failure to create a proper 
> abstraction.
> 
> -- thorpej

-- thorpej

Reply via email to