Re: [net-next PATCH v4 01/15] Documentation: ACPI: DSD: Document MDIO PHY

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

 



On Fri, Jan 29, 2021 at 6:44 PM Rafael J. Wysocki <rafael@xxxxxxxxxx> wrote:
> On Fri, Jan 29, 2021 at 5:37 PM Rafael J. Wysocki <rafael@xxxxxxxxxx> wrote:
> > On Fri, Jan 29, 2021 at 7:48 AM Calvin Johnson
> > <calvin.johnson@xxxxxxxxxxx> wrote:

...

> > It would work, but I would introduce a wrapper around the _ADR
> > evaluation, something like:
> >
> > int acpi_get_local_address(acpi_handle handle, u32 *addr)
> > {
> >       unsigned long long adr;
> >       acpi_status status;
> >
> >       status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, &adr);
> >       if (ACPI_FAILURE(status))
> >                 return -ENODATA;
> >
> >       *addr = (u32)adr;
> >       return 0;
> > }
> >
> > in drivers/acpi/utils.c and add a static inline stub always returning
> > -ENODEV for it for !CONFIG_ACPI.

...

> BTW, you may not need the fwnode_get_local_addr() at all then, just
> evaluate either the "reg" property for OF or acpi_get_local_address()
> for ACPI in the "caller" code directly. A common helper doing this can
> be added later.

Sounds good to me and it will address your concern about different
semantics of reg/_ADR on per driver/subsystem basis.

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux