tech-kern archive

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

Re: Regulator




> On Jan 12, 2022, at 9:08 AM, Jason Thorpe <thorpej%me.com@localhost> wrote:
> 
> 
> 
>> On Jan 12, 2022, at 8:02 AM, Taylor R Campbell <campbell+netbsd-tech-kern%mumble.net@localhost> wrote:
>> 
>>> Date: Wed, 12 Jan 2022 15:42:17 +0000
>>> From: Robert Swindells <rjs%fdy2.co.uk@localhost>
>>> 
>>> 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



Home | Main Index | Thread Index | Old Index