Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2558755pxb; Sun, 17 Oct 2021 18:53:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxcjzCezYFY0wLsyEvrXEx6QLjjt4RsaMUufdcWaM9ey04EneapGbLZ5f6qn6xtoISf/+a X-Received: by 2002:a63:b04c:: with SMTP id z12mr20469462pgo.371.1634521995550; Sun, 17 Oct 2021 18:53:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634521995; cv=none; d=google.com; s=arc-20160816; b=qk24ffVAz5/1IAoVRvSk8+r6eDDzqKyEL4SEwsErYoJc9AXAhplVuOACMBic6vR/zA CUPueaYL8xmJDFKGkoexy9ugTgiLjciYT5bWCv0g3hCqUf9zs222P8mjBdFAuUhIw071 kHvm6jav7GU5CQQo9K82ILvGnlRHEK/vihKEqM1JqdRCaqNKFn8a24VCDMizENrQ10ul 5+pOGDW2bIxUbV/IXTRFNLLdjM2LaaJ4YoRJXcsRIEHhUCfKfWwLBDfBAMge7eMtLh1F TV6Bl3rBgIty1qm5c+3M85VhIvjtzIzF4Ie5kvs0ROMDBn8ncsHzkkRy4tfC6J+dPC1F uh1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=ob0cXS+iTVqhTc0LL+1lwvmPqj++Muh+HEaU63BqtuQ=; b=Uoi+XSSQAT4qgkBH4J5P/Tek2ICIxL/57CcVkB3tUjPeWw3k0qPPd3h3sxcQ11cYRI wdSKaT81jXg2Q6o4x5fokGRE124pmNRGzXRhS4gCHprovs509GONGtrl5g2Ppsszue8n Bfc7jeJJPgU7lz26ucUnfP4DjuGtMiOB7HptLcw1YRXgSAHfyHFuh+KQNZ0pH1cOd5Pj lcN5/nzYcEE7tFyfJuvmz796wwOrbzS10myOgSISxKNpszzNw77BnMquUETbcRCRzvJQ LUgQ1r1wdyv6MHkSZt4tMQJoQxiovufx3vUVomt4oso7U9AfDAmOreLLCudKGtaVR5cU zq0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OGWzt5e2; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s207si17050901pgs.116.2021.10.17.18.53.02; Sun, 17 Oct 2021 18:53:15 -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=@redhat.com header.s=mimecast20190719 header.b=OGWzt5e2; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232308AbhJOUQn (ORCPT + 99 others); Fri, 15 Oct 2021 16:16:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:36395 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234165AbhJOUQm (ORCPT ); Fri, 15 Oct 2021 16:16:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634328875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ob0cXS+iTVqhTc0LL+1lwvmPqj++Muh+HEaU63BqtuQ=; b=OGWzt5e25yJYQiQD7/uF8o+UKGtYVDv5oE7oDURTcvbPBEYtOKPrlhvQfdWBaxwjDQS0JO X9ECFLmDU7/O8GHVKiQtm2jVhUTa6cWeaclrBzB9SRvErD9jVWnhZ2vZT45KU4dmQW2N2Q Slx3SPuQYj63wlRBl3g6xijzBjJWYHU= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-440-hSYBd5cyMTSl8xqBpgKxdw-1; Fri, 15 Oct 2021 16:14:34 -0400 X-MC-Unique: hSYBd5cyMTSl8xqBpgKxdw-1 Received: by mail-ed1-f71.google.com with SMTP id t18-20020a056402021200b003db9e6b0e57so9246754edv.10 for ; Fri, 15 Oct 2021 13:14:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=ob0cXS+iTVqhTc0LL+1lwvmPqj++Muh+HEaU63BqtuQ=; b=TUrhyqvZeEUf9UzD9mS6hxWMsPzSd/MJihiF89oJasIG9mzbAo64lqcoO2GyFLf3Hp U4j9Tdym5kOIZK67tBd8MvFtXSGdz7DUF35KHPCSJWTNqeYHgMbynFOfI5he6GytlN2A mwBiKeX7Cdc8HTuL3/oVRF2dyhE4RFRuUnUPWUxd3GsGGcAgFmHbewkjGWn7Ad724R1u 1pPCGHl+DaAnZwVFvBH8j15g+p/JaDWq6vXqKFWRXxmyPUSZp4an/cK/CjRyZltB8Q2R prQfTutWE6gICx139WV8OWl+UJq6nrdk/pjqaejmHENW47233mcworyVfIxD0twkn0/8 /yxg== X-Gm-Message-State: AOAM530/po/Ulaa8xK9Lf2v2ZI3b2oF7/u3YUQ5ro7jC+0tiuBe2nTMh y/MX0b4Pb8GSKEjMXlGNSR8JMoMWUearLMXRdCgyTwbKMmelqJwD5L0W7ZaBJ9cTZwYQ1eDUtq5 W0XrTnOgPI59MGuKZPkVy0YLH X-Received: by 2002:a17:906:25d7:: with SMTP id n23mr9598467ejb.322.1634328872857; Fri, 15 Oct 2021 13:14:32 -0700 (PDT) X-Received: by 2002:a17:906:25d7:: with SMTP id n23mr9598434ejb.322.1634328872644; Fri, 15 Oct 2021 13:14:32 -0700 (PDT) Received: from x1.localdomain ([2a0e:5700:4:11:334c:7e36:8d57:40cb]) by smtp.gmail.com with ESMTPSA id z18sm4752728ejl.67.2021.10.15.13.14.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Oct 2021 13:14:31 -0700 (PDT) Subject: Re: [PATCH 05/12] regulator: Introduce tps68470-regulator driver To: Mark Brown Cc: "Rafael J . Wysocki" , Mark Gross , Andy Shevchenko , Daniel Scally , Laurent Pinchart , Mauro Carvalho Chehab , Liam Girdwood , Michael Turquette , Stephen Boyd , Len Brown , linux-acpi@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Sakari Ailus , Kate Hsuan , linux-media@vger.kernel.org, linux-clk@vger.kernel.org References: <20211008162121.6628-1-hdegoede@redhat.com> <20211008162121.6628-6-hdegoede@redhat.com> <843f939a-7e43-bc12-e9fc-582e01129b63@redhat.com> From: Hans de Goede Message-ID: <1805d16e-87ab-c291-6a73-adabf41344ca@redhat.com> Date: Fri, 15 Oct 2021 22:14:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 10/15/21 9:59 PM, Mark Brown wrote: > On Fri, Oct 15, 2021 at 09:48:24PM +0200, Hans de Goede wrote: >> On 10/15/21 9:40 PM, Mark Brown wrote: > >>> I can't see how the quirking gets propagated through into the driver and >>> I'd really expect that in a situation like this the platform data would >>> be passed through as platform data from the code doing the quirks, > >> That is exactly what is happening here. The platform_data in this >> case is just an array of regulator_init_data pointers (one per >> regulator in the PMIC): > > No, it's not. What normally happens is that whatever registers the > device will when registering the device supply platform data that the > device later picks up from the struct device during probe. What you're > saying is that the idea here is that driver unconditionally declares > platform data and then other code scribbles over that before the driver > instantiates. This is cleaner in that it keeps the platform > configuration together and safer since the device can't exist before > it's configuration is provided. Right, this is the standard device-tree model. Unfortunately the information about which supplies are needed and the constraints for those supplies is missing from the ACPI description for the devices which we are dealing with here. Daniel Scally tried to solve this by allowing specifying this in software-firmware-nodes. Which you nacked because those need separate parsing code in the regulator core. During that discussion you said that instead we should sinmply directly pass the regulator_init_data, rather then first encoding this in device-properties in a swnode and then decoding those again in the regulator core. And passing the regulator_init_data is exactly what we are doing now; and now again this is not what we should be doing ? Also note that the current solution is exactly what I suggested we should do during the discussion with Daniel and I even provided example code and you said absolutely nothing about this! >> So we have the code doing the quirks determining the regulator_init_data >> and passing this through platform_data, which AFAICT is exactly what >> you want? > > No. There should be no sign of the platform data getting allocated or > initialised in the driver consuming the platform data. It should purely > be reading the data it gets passed by the platform initialisation code. > > Please make the use of platform data look like normal platform data use > rather than going and inventing some new scheme. I'm sorry but I no longer have any clue what it is what you want us to do / how you want us to solve this. AFAIK what the current code is doing is exactly what you requested during the discussion with Daniel. If this is not to your looking please provide some pseudo code explaining how you want us to solve this problem instead of the current solution. And please keep in mind that we *cannot* change the ACPI firmware interfaces and that whether we like it or not things simply work different in the ACPI world. Frankly I'm quit unhappy, angry even about how you are blocking progress here. You don't like APCI we get it, can we get over that now please? So far all you seem to be doing is shooting down solutions, then first being quiet about suggested alternative solutions and then once the alternative solutions are implemented shoot them down again... And all that without adding anything constructive. All you have told us is how things should not be done (according to you). So fine everything we come up is wrong, please tell us how we should solve this instead then! Regards, Hans