Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp883033ybv; Thu, 20 Feb 2020 08:58:07 -0800 (PST) X-Google-Smtp-Source: APXvYqwj50NbNvQjhKzfmc6g6BIc+nxGGNR8jO+IV/NF+JWSzuf+g0Iee4v56ZNDzqv63iIB72/h X-Received: by 2002:a05:6830:1251:: with SMTP id s17mr21954526otp.108.1582217886655; Thu, 20 Feb 2020 08:58:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582217886; cv=none; d=google.com; s=arc-20160816; b=p/bSeEgDjZgaMc2/6eMWBBffZU/nDSNQIqZ7va0P6Iktwnycb/WXdMJmwvRU9u4dWr LXby1pCQAKjkhA3mKEvwDQkmSlSQ317MMksOrP5i8JEJndeRUbjujj5511w3AoSZh62A YFkbWCPwkt2aJu/hb0/BNA9IFOoG0+GL7zCjbQKRF25k3r1af3dHC/7PVjesEtT8l19p nNF2fXAFiH54O754BUCc0o6Mwh1jUMxac5GJm5/Dq7oEELnGNa1DsC9xSJqqNckFPHwa iUGsO5/rKI1Z+q3FvPkQGE18OIZN/HtlXtR4PkARQFhncubSqvu1lSSbC5wAUU36tt9a ZkVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=GjQd9e+UgSgoPM2hFDY5ElBfzhoevLFkdzzelP3YRkc=; b=ORhG9nW1ZQ8/tmw7JB1Uz1quLnlG1hqgxz1hchQhfnPtKqXIXKPwy71BPEA3s1Auuq h4ygxwrcc2rUeh10NYmMhlvLgRlZ2trghgeOdm8prVEbexk8b7Cdnw4PvZYVs05iSgf1 Hw6QX217KK8ASQvm9qJvMSoF4ZvxQWMXHrLCIsqP8y4TSdS3kLwbHnRqkht8S5ayv/39 Q8cxbZBTmnvrjZJTbuPOKMy0fLkFpMhtKRV8D/819f0maFFz0ABQ6N7MDcc1HiP9p0hU OzLrEVI223LCuNIIQ7cKmmXs21e9d6CH7lMHQIfTl1z1IlXy94MiSp4JmPYcJYwpTWFm ti1w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r4si1896020otq.188.2020.02.20.08.57.54; Thu, 20 Feb 2020 08:58:06 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728111AbgBTQ4R (ORCPT + 99 others); Thu, 20 Feb 2020 11:56:17 -0500 Received: from foss.arm.com ([217.140.110.172]:46790 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727868AbgBTQ4Q (ORCPT ); Thu, 20 Feb 2020 11:56:16 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6857431B; Thu, 20 Feb 2020 08:56:16 -0800 (PST) Received: from localhost (unknown [10.37.6.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D28823F68F; Thu, 20 Feb 2020 08:56:15 -0800 (PST) Date: Thu, 20 Feb 2020 16:56:14 +0000 From: Mark Brown To: Marek Szyprowski Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Chanwoo Choi , MyungJoo Ham , Sebastian Reichel Subject: Re: [PATCH 1/3] regulator: max14577: Add proper dt-compatible strings Message-ID: <20200220165614.GD3926@sirena.org.uk> References: <20200220145127.21273-1-m.szyprowski@samsung.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="vni90+aGYgRvsTuO" Content-Disposition: inline In-Reply-To: <20200220145127.21273-1-m.szyprowski@samsung.com> X-Cookie: You are number 6! Who is number one? User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --vni90+aGYgRvsTuO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Feb 20, 2020 at 03:51:25PM +0100, Marek Szyprowski wrote: > Add device tree compatible strings and create proper modalias structures > to let this driver load automatically if compiled as module, because > max14577 MFD driver creates MFD cells with such compatible strings. > +static const struct of_device_id of_max14577_regulator_dt_match[] = { > + { .compatible = "maxim,max77836-regulator", > + .data = (void *)MAXIM_DEVICE_TYPE_MAX77836, }, > + { .compatible = "maxim,max14577-regulator", > + .data = (void *)MAXIM_DEVICE_TYPE_MAX14577, }, Why would we want to encode the particular way Linux happens to represent regulators on a MFD into the DT binding? It's not clear that this is a generic thing (another OS might choose to have a separate object for each regulator with no parent for example) and the compatible isn't adding any information we didn't have already knowing about the parent device. --vni90+aGYgRvsTuO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl5Oui0ACgkQJNaLcl1U h9B+tAf+O5wXN8/UCmxlhMHjjjsn7O63zZZ7rqMfIafoctlUWeySnrJfhBzLPRv2 0ymUV/Z1QPobWCjwgq05dJz0Nhb3IGdMc1lYSaNd52YtP2o2E+Ru8mLGa8By7NOh mkfBkbjkqcn6Tteg3aihHhRzAiwkyCW6o9jQ3OxfZIdjUwMbQkZqUSKn65Vt22b7 AZp7PiqicQawrv22ob1b40v0+nMcdd6HXoHTBCXPQoTniobWf2dskNDr/SucOifC 3gbU7DAZXG4i023KOw31b4RWvgpb+dypKFyit7/8fQCvt7hcv/jfExZIWXTRmN7K LpXRFJaCw1vAhQgRLyredfngs/DNlg== =bBti -----END PGP SIGNATURE----- --vni90+aGYgRvsTuO--