Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1962023pxb; Fri, 29 Jan 2021 09:23:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJzZv3rwOOcflcCzszzQt8wfk4+gEo98OB9TsGRRd1JHoAYEJcVN+fjnWsGHvkPLDl6kB+dz X-Received: by 2002:a17:906:3101:: with SMTP id 1mr5733473ejx.115.1611940984591; Fri, 29 Jan 2021 09:23:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611940984; cv=none; d=google.com; s=arc-20160816; b=ljdQhXXCFvusUch0NhUxHJ91kCtImneE6nxYUEO8rz9q4RDdvhgGNTIMneSLEePsJq H2HELl7lmNPaXagTAp85Oeo4tVdUOAAKx5i3t6enGPHot/mnIAdjfSgqatq/UB74TJEl 1xoLua85NzZIHxtCNfKP1Yj30sqB+ktTZ+yGgehoGiXUZcZYAFsdjXzoNu5M5URL5iLS xRZwVHq7IwSInh9zIwambzxfooB1xJhUe2/qqtBrJcJZoK0e9lkJhGtgMOj3rDXyeSoz sPUt1pR8dvIXhV2sfN1ZbPH2NdRbPHERZI6en2ku9bVhkzb19RybC7gV7kGlTezrb7zz M4Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=mpRwxmNoK4zRm0ABxxngmN28HRh6rDJ6+OLZGZ+9rbg=; b=MXdOH/lDebMDQN412/NAPZwmU4BJZB8qMqq0aSyA9bCMB8bfFeYqNHc1PQW1v29ZBj g7GGGOSsKeGbYc7iL0AIRElybYJCbw6rwTDoLnhadDnVrVh1tdkkD1UvqEwvQlpOgklo ZZGVPaxnOy7raME4HjrCZayTujsKo/Jne7KtUA8n8WXtKIr2k+HBtJj/YvmcUNSImGoC b6tQoU798N/Z9mQCcyrJU6kHtfDU3/KQbhUjYtfjGUOFJUAdeZn8VwKSZCsCKxkpAvjz HVXIf8NZPLCopLtyc2sM24Rb3Hn+BT8fxiURq8eKiFGrJojKOwmQcNFmnyRPODS7FouQ ++qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Pd0gq8sB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hb19si4811528ejc.14.2021.01.29.09.22.39; Fri, 29 Jan 2021 09:23:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Pd0gq8sB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231246AbhA2RWI (ORCPT + 99 others); Fri, 29 Jan 2021 12:22:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229953AbhA2RWF (ORCPT ); Fri, 29 Jan 2021 12:22:05 -0500 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C3CFC061573; Fri, 29 Jan 2021 09:21:25 -0800 (PST) Received: by mail-pf1-x42d.google.com with SMTP id w14so6647347pfi.2; Fri, 29 Jan 2021 09:21:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mpRwxmNoK4zRm0ABxxngmN28HRh6rDJ6+OLZGZ+9rbg=; b=Pd0gq8sBQOE7jDW7l3EY2lggegQw+66lD6svdPfel98i9pRz5ibkDIgCo4m5B5wfaC A+jhjOz5zp7kK4L0pZSkU6PxFe855OmDNEVpD4HdSybmDa5CdBiVeD4j2Md41Z4sla/c glnbOeaR3Q8cb9ffwmsHFuSmh5PJ0jjeH2OCl01aMC/+OBABG09H71zrmAKQn0YPA+4O BIvUfV1J15URctuRg5R6CWy9BpZhJyNFF5sCsFXs7uHFIA0CWTGl+YTocK9aIgFY8Mu2 KhKtjQeUa3zGsB1WSg6Bt44eSKvY3u5hA7H/s2saX/hmpKkBiD0vTxxwbShdvsB0HyQx N58g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mpRwxmNoK4zRm0ABxxngmN28HRh6rDJ6+OLZGZ+9rbg=; b=jfXPw1sJcUZBTEGUq36C5fQFw9HYD24YiBIegYeM4JP+Bzh3sVHb3PTW08r1GlLssY f74z9J9OhYrESb43MGQ8D6kSw07eKSnXu+lKLSfJ0NcW91Q4zFnqHpRxMIy3LYcf9Pob JkEdDUSwyJz05tO/UIGpwrL/9iIfaTIVL4UVeE5kKGQxX4Udx1nQROlPvyE4nV9BeaeX G8YcD/VR1G5ung8V68w2JCVResawr2Hy+FVseeDJxBlan+CozxUMdv7eLFGr25qP5tR4 QBDygUm5MKbLCH7g5xNjeWmCwlkQEDmCBwoxu+G2efg8Jm/qkWduMQpLbkgeWgrnP/CB lrWg== X-Gm-Message-State: AOAM530RK9/T88MX3HouG/1AKJjTHlLbKmxjIyG8Pya+jO6B63CWI1zW QOp7cpitF1sC6Dxeag5MwN4Yq9ZejxgaqSwCSIU= X-Received: by 2002:a62:5a86:0:b029:1ae:6b45:b6a9 with SMTP id o128-20020a625a860000b02901ae6b45b6a9mr5255939pfb.7.1611940884875; Fri, 29 Jan 2021 09:21:24 -0800 (PST) MIME-Version: 1.0 References: <20210122154300.7628-1-calvin.johnson@oss.nxp.com> <20210122154300.7628-2-calvin.johnson@oss.nxp.com> <20210128112729.GA28413@lsv03152.swis.in-blr01.nxp.com> <20210128131205.GA7882@lsv03152.swis.in-blr01.nxp.com> <20210129064739.GA24267@lsv03152.swis.in-blr01.nxp.com> In-Reply-To: From: Andy Shevchenko Date: Fri, 29 Jan 2021 19:21:07 +0200 Message-ID: Subject: Re: [net-next PATCH v4 01/15] Documentation: ACPI: DSD: Document MDIO PHY To: "Rafael J. Wysocki" Cc: Calvin Johnson , Grant Likely , Jeremy Linton , Andrew Lunn , Florian Fainelli , Russell King - ARM Linux admin , Cristi Sovaiala , Florin Laurentiu Chiculita , Ioana Ciornei , Madalin Bucur , Heikki Krogerus , Marcin Wojtas , Pieter Jansen Van Vuuren , Jon , Saravana Kannan , Randy Dunlap , "linux.cj" , Diana Madalina Craciun , ACPI Devel Maling List , Linux ARM , Linux Kernel Mailing List , netdev , Laurentiu Tudor , Len Brown , "Rafael J. Wysocki" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 29, 2021 at 6:44 PM Rafael J. Wysocki wrote: > On Fri, Jan 29, 2021 at 5:37 PM Rafael J. Wysocki wrote: > > On Fri, Jan 29, 2021 at 7:48 AM Calvin Johnson > > 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