Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp431456pxk; Thu, 3 Sep 2020 03:44:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXRF7zM9PO/dcGtC7RX7N4GKCO8pBNaBi17r2Y/oQ0K26f2CI1M4HAiZByUFR4UPnl1tqQ X-Received: by 2002:a17:906:9718:: with SMTP id k24mr1299590ejx.365.1599129843821; Thu, 03 Sep 2020 03:44:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599129843; cv=none; d=google.com; s=arc-20160816; b=TdBVRkMg6kJXW6Y33bkQ6M4J3NA8ykxxsOHhUsh8QR0MCFjtwY9XQWZnvwKbSGGecl Ea4FJ6kFCnREevYPAKI76FhzsNGHlE+SCG0flkSV0e0/USTHLBEZuxFKKphtTtW43lx8 7D5nHCNnLNu31D3dcpKr2uKGrDjmXtyGmzAzMWYx8kt42FsUffFhGW4pIqzvWfLGslz2 uLLPpb/6PCF/DDAjuCIK65L9upFCscNF6l6uZPkW9NM6xTqAF6bYL9N2zuC0lvAdvLlU VAi02k+FCJzUElp4CkVPAaqjtvCy1WVXsnxHJmZlDgtSTBQ2LDYrhXGwAAI8FQb61I6s NjRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=aFbz9SK9Nrxa2E9LPeezB4X58SZviUfZBi06Rq535T4=; b=C7w/WPcfJrWVuZxM9fsTAoms8jUBrABgefRmtVJii06nDyKSdHVY6zG+k0PtNXPHfK 5PZlDj/ycpfsyJmFNeQt9gJ0vcgQr9eXpQeLISUw8pfehxLpoCCpROWGfSGthe7VzPl5 Qg5hZRPnjx6uj/+/Hq1yGmiB4LEZjHCI3B3AxVbpr3e3U98qndh6xSQE34fL7NVGmntz oOwNaa5doDqlqggVI9VVRERI8ot12ClAozTaze/sw0+J7fXn5S+dSTFM1sakeTca1XMF EQfcNCWc0fjKWISzt9gMK58buYVUl+2o1kltrEI4rU/KZ+wlaP8d8WIuh/H5jBF0lIDk ZuFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TNxli9wc; 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 l21si1368014edq.277.2020.09.03.03.43.38; Thu, 03 Sep 2020 03:44:03 -0700 (PDT) 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=TNxli9wc; 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 S1726543AbgICKmf (ORCPT + 99 others); Thu, 3 Sep 2020 06:42:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725984AbgICKma (ORCPT ); Thu, 3 Sep 2020 06:42:30 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49402C061244; Thu, 3 Sep 2020 03:42:30 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id u128so1994348pfb.6; Thu, 03 Sep 2020 03:42:30 -0700 (PDT) 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:content-transfer-encoding; bh=aFbz9SK9Nrxa2E9LPeezB4X58SZviUfZBi06Rq535T4=; b=TNxli9wcYSXAitaIux7dlyj6o9b0i5BIFNGEG3WBdSpc7QMvfBrz5/ym4DS/NF9lzp 3ntNgkPTB4MXzDHxyX3ZJPeosICb0OC+0HJYboWvKkJZhg4KayQgZZgSgb88ifk5dJXQ KQhCDiPM+m5yZ+cuejw0rcs00+21FgaOHOwjEpyjYyDDQ96Gncq1cdw92FhPGdAv7uaO gN4n+7wqr6/kH/z+/hfrtNZWeNf7ifzGudUx41CtTNvgMHSzYm3XqOraIzzOoTk5DW57 ebH/IdXssnSiunfBjigxUvm+pk16cfTS/w3hfSywa9GHU2MfynXMuQPNDOVZ2s6JT0DM dBWw== 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:content-transfer-encoding; bh=aFbz9SK9Nrxa2E9LPeezB4X58SZviUfZBi06Rq535T4=; b=ZvzPdARGyp+pn4+S2bPo4j/vKKkBrjN7qQgRhqeDqn+CcNZlGXCW4YbY6BEahUAEBY 3hIh4PinqZaYxk7y6E40ydruMqpPojSdNF+Mi2kWgcL89GzDt6Px9c3TTJA2r2jLfBZx U0hGFr8Qn7DktmQWZqfW7/66Hjsaq91id7Hnrm4DC9J6vVw6UhaSCze8Y6hPzogzaKf8 vuMfMiWWTdZrw9LneZJdtkAMOQkKJAi85Bi52Umz+aFk8HFkVyinkGZa+Hh7rpA1iPQD Q2DrrpY9FxeAcdWmwzzPtUncjWzXvIJA//IqIc5gvz9qvgrj15AS/SB0cVBrpIZX6FRr ZRFg== X-Gm-Message-State: AOAM530A9SLn0S5MuxmOLOzG9Z4ijl9q24/9B7dC/5rmotlIgVFuvBm2 2jproj1tEW7dheLIGNAd8B9BisXNMMHeSAcWH0A= X-Received: by 2002:aa7:942a:: with SMTP id y10mr2235033pfo.68.1599129749735; Thu, 03 Sep 2020 03:42:29 -0700 (PDT) MIME-Version: 1.0 References: <20200824054347.3805-1-william.sung@advantech.com.tw> In-Reply-To: From: Andy Shevchenko Date: Thu, 3 Sep 2020 13:42:12 +0300 Message-ID: Subject: Re: [PATCH] iio: dac: ad5593r: Dynamically set AD5593R channel modes To: AceLan Kao Cc: Alexandru Ardelean , William Sung , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Hartmut Knaack , Peter Meerwald-Stadler , linux-iio , Linux Kernel Mailing List , Campion Kang Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 3, 2020 at 10:37 AM AceLan Kao wrote= : > > Hi Andy, > > I spent some time studying/reading what you wrote, but I still don't > understand how to leverage meta-acpi. meta-acpi is a Yocto layer to support provided ACPI tables for the build. My point here is to have it as a collection of ASL examples. It's what you asked for below in this email. Also we can collect your ASL example under board (presumably new) folder. > From what I understand from the following discussion in the thread, > ADS5593 could be used, > so we can keep using it and don't have to introduce PRP0001 in the table,= right? Precisely! > Here is the ADS5593 asl code, but I have no idea how to re-use it > after it's been modified, > the only way I know is to override the ACPI tables via initrd[1]. There is also Config FS approach (like overlays) to do it at runtime. That what we are using in Yocto build for Intel Edison. > Could you share some examples in real cases that I can follow? Yes, like I mentioned StackOverflow search results (maybe G will give bette= r). But let's see what you have in your ASL code first. On the first glance I didn't see any issues with it, but on second look here is one. Look into this [5] example. If you noticed it uses the same path in Scope and in the reference in I2cSerialBus() while in your ASL they are different. Do you have issues with loading it (as is and after above addressed)? [5]: https://github.com/westeri/meta-acpi/blob/master/recipes-bsp/acpi-tabl= es/samples/edison/ft6236.asli > Thanks. > > 1. Documentation/admin-guide/acpi/initrd_table_override.rst > > Andy Shevchenko =E6=96=BC 2020=E5=B9=B48=E6= =9C=8831=E6=97=A5 =E9=80=B1=E4=B8=80 =E4=B8=8B=E5=8D=888:48=E5=AF=AB=E9=81= =93=EF=BC=9A > > > > On Mon, Aug 31, 2020 at 3:45 PM Andy Shevchenko > > wrote: > > > On Mon, Aug 31, 2020 at 2:28 PM AceLan Kao = wrote: > > > > This patch is mainly for Advantech's UNO-420[1] which is a x86-base= d platform. > > > > This platform is more like a development platform for customers to > > > > customize their products, > > > > so, specify the channel modes in ACPI table is not generic enough, > > > > that's why William submit this patch. > > > > > > > > Are there other ways to specify or pass values to the module withou= t > > > > using module parameters? > > > > It's good if we can leverage sysfs, but I don't know if there is on= e > > > > for this scenario. > > > > > > Can we provide DT bindings for that and use then in ACPI? ACPI has a > > > possibility to reuse DT properties and compatible strings [1]. As far > > > as I can see the driver uses fwnode API, so it supports ACPI case > > > already [2]. So, what prevents you to utilize 'adi,mode' property? > > > > > > Also, we accept examples of ASL excerpt in meta-acpi project [3]. It > > > has already plenty of examples [4] how to use PRP0001 for DIY / > > > development boards. > > > > > > So, take all together I think this patch is simple redundant. > > > > One more useful link is SO answers on the topic: > > https://stackoverflow.com/search?tab=3Dnewest&q=3Dprp0001 > > > > > [1]: https://www.kernel.org/doc/html/latest/firmware-guide/acpi/enume= ration.html#device-tree-namespace-link-device-id > > > [2]: https://elixir.bootlin.com/linux/v5.9-rc3/source/Documentation/d= evicetree/bindings/iio/dac/ad5592r.txt > > > [3]: https://github.com/westeri/meta-acpi > > > [4]: https://github.com/westeri/meta-acpi/tree/master/recipes-bsp/acp= i-tables/samples > > > > > > P.S. Jonathan, it seems this driver has artificial ACPI HID. We > > > probably have to remove it. However, ADS is indeed reserved for Analo= g > > > Devices in PNP registry. Can we have AD's official answer on this? > > > Cc'ing additional AD people. > > > > > > > 1. https://www.advantech.com/products/9a0cc561-8fc2-4e22-969c-9df90= a3952b5/uno-420/mod_2d6a546b-39e3-4bc4-bbf4-ac89e6b7667c --=20 With Best Regards, Andy Shevchenko