Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp975739ybp; Wed, 9 Oct 2019 07:08:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqw5l8L5tKaWJdWzd8j8hFu/4GJ6w1JFiiODSc4K4D7SOuGnC4gtUYkvkCGoeXoJdcqerUaA X-Received: by 2002:a17:906:cc90:: with SMTP id oq16mr2977765ejb.322.1570630102157; Wed, 09 Oct 2019 07:08:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570630102; cv=none; d=google.com; s=arc-20160816; b=omW0zRh82h/9FJYULtRC2Y3yzNDptDV44tsEuktGKP0bY+olcJa2n9gcsRiTSToeq8 wyC+QAte4GQdmPBhoUERtDXPm7FE8PlQ1ZdJU++MneNPO6PP4TRDnUknfaAhExyTCRzo 7t9h6Zjqew7bSYXNgvOcKlMWUdvClYgJ3GulqLLXihYAgG4D0nSjNg+O56Q7Daw1OwJG 9g/AfymUtIGrCzrP/FS/JcWDiO/KZNCGMu9oOrt/djhPlekeJrVPCNeZjTelgWJVYPKz 4cuM3CGu6b3ljDPNnmMSMBhHcfyO92d2ArhEzzVb1CYWSfZpX4e7jvvpgF4ulJuWn7By Yk8w== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Uj3uK+PXxvqbeopMnt61nNLWeJ5KhO8l4CJVLwumEdU=; b=BjJ4xs8BppfqhaCmAjQk/mkp+Z6PtQbCoJ0RViQMz9MrXNXHRb432M/hkNIRCGii2L bqnRAtIKxwzgi7NbdLuTq+Ta17hGN6mmJSfGbxkFc9VOMGA15K486zHGaRzAivsoxIc8 fU/xB51Ev8iOjg1JYJRO3MqRlLf4leipYL3kOQQuId0JosLSwBFk0E6VzzQ7Sc6m1Oxj nSWe/e7vRrx7TVTizsme84l5zkesY/6e/LSDBI4Z44Eh3uTngqaikfHnUaBnV2Np5qHv UMTveV610QP5jgji0RdyqF0p56uDK/WkUTClq8cisZ+EvXl6pwesiTKEKHakxj6pcbB3 mxFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r0N9yf2b; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a30si1538259eda.39.2019.10.09.07.07.55; Wed, 09 Oct 2019 07:08:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r0N9yf2b; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730546AbfJIOFQ (ORCPT + 99 others); Wed, 9 Oct 2019 10:05:16 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:54870 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727769AbfJIOFQ (ORCPT ); Wed, 9 Oct 2019 10:05:16 -0400 Received: by mail-wm1-f66.google.com with SMTP id p7so2773005wmp.4 for ; Wed, 09 Oct 2019 07:05:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Uj3uK+PXxvqbeopMnt61nNLWeJ5KhO8l4CJVLwumEdU=; b=r0N9yf2b+byu4vuI8y0JeeHavanBpTMDQpn/KaBT8Gm4fGqhrZiXJi0RqeKptEsRWn Br9sL6Yil/FWaiOqUwPcODWe94yJNRyZzu/B8LEWYVr9gHUdwbSDbtiDcmi2byyJImGC YXqINhsTJVv9QKm5SIub8rUPhTw6lqrIfQDn6bO+Fhi9lPH2JT8Tz16ne+srPsgphekB 7HBBcyqyGGKSqEmo58Ndwm8VYH6Q/cg0zXvAVuOMeGHts28iFJiR2szzJePhV1zYuapJ ORG/XU7r4bwCNqLU+5GO4AscWIvAVeOsZPxTu36s4L+htHTizyP8MCAdOnMgeKp0V12x 8nKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Uj3uK+PXxvqbeopMnt61nNLWeJ5KhO8l4CJVLwumEdU=; b=MboPDVKK4O1PKNiPwtFMTrz4cymj4wdsqKViKcoiG//X75DTe47X66Gr/vu9S5w8Qo mPpqpQiEZHT/fkUAAgWG0zzYFhJrL1vJE1pv/lLApinI9Qb/OKfBDti7wB0zqx19R1im Oeq6Ib3VBli1yVxlHXiL0xX/xJ/HdlGl4ihx1L98+E7Bro8rgkhcFLY62r5E8hQfyJzE J5x9t/nIVLPYZ0d8c2fskMfH6gnAI69ttpOdVdXr9xTtuWJM3j8lgTMBFKfmA6XVXtOo Pa7ZWOWThMHKlMX/aj3b+mccGpNHfalMpLcc1biqJj9tjPcbKH5IYB60S/o5vy2HC1h/ 5aSA== X-Gm-Message-State: APjAAAX+wAaL1tKroY49WZ0NZizsOnNo7+u/7eO5uBzBZCcJpNxig1hf Flhy0RjIz1LAv1bvX3hcdZlcJw== X-Received: by 2002:a7b:ce12:: with SMTP id m18mr2759228wmc.108.1570629914590; Wed, 09 Oct 2019 07:05:14 -0700 (PDT) Received: from [192.168.86.34] (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.googlemail.com with ESMTPSA id s12sm2897774wra.82.2019.10.09.07.05.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Oct 2019 07:05:13 -0700 (PDT) Subject: Re: [PATCH] firmware: vpd: Add an interface to read VPD value To: Stephen Boyd , Cheng-yi Chiang Cc: Guenter Roeck , Tzung-Bi Shih , Linux Kernel Mailing List , ALSA development , Hung-Te Lin , Greg Kroah-Hartman , Sean Paul , Mark Brown , Dylan Reid , Tzung-Bi Shih References: <20191007071610.65714-1-cychiang@chromium.org> <5d9b5b3e.1c69fb81.7203c.1215@mx.google.com> <5d9ca7e4.1c69fb81.7f8fa.3f7d@mx.google.com> From: Srinivas Kandagatla Message-ID: Date: Wed, 9 Oct 2019 15:05:12 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <5d9ca7e4.1c69fb81.7f8fa.3f7d@mx.google.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/10/2019 16:14, Stephen Boyd wrote: >> 3) As my use case does not use device tree, it is hard for ASoC >> machine to access nvmem device. I am wondering if I can use >> nvm_cell_lookup so machine driver can find the nvmem device using a >> con_id. But currently the cell lookup API requires a matched device, >> which does not fit my usage because there will be different machine >> drivers requesting the value. >> I think I can still workaround this by adding the lookup table in >> machine driver. This would seem to be a bit weird because I found that >> most lookup table is added in provider side, not consumer side. Not >> sure if this is logically correct. > Maybe Srini has some input here. It looks like your main concern is > consumer to provider mapping? > In non-DT setup, there are various ways to lookup nvmem provider. 1> nvmem_device_get()/put() using provider devid/name. I think you should be able to use this in your case. 2> nvmem_register_notifier() which notifies when nvmem provider is added to system. 3> nvmem_device_find() with own match function this will be merged in next window (https://lkml.org/lkml/2019/10/3/215) If none of these are of any help, could explain what exactly are you looking for w.r.t nvmem to be able to move to what Stephen Boyd suggested? --srini