Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3146805ybt; Mon, 22 Jun 2020 16:31:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweLfqKDzDvO3huLI5irRhRfD4neYc6B4j/B5mmv6+nt7SVOGgfkOa10fNwKFCMG/MJp+Xd X-Received: by 2002:a50:a881:: with SMTP id k1mr18975072edc.12.1592868718815; Mon, 22 Jun 2020 16:31:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592868718; cv=none; d=google.com; s=arc-20160816; b=U88VIAzsBpRdUGYIpeuxheO3cLfYKAoTehnSvodtd0QhgeP6z/1d+vJNixpYa+iPwO VdulYubWlfakPcyjHTd763iwMOt/du7jTm3yoW8ASpIzY6KBIbAGxWv4jusPYeIMfa4Y 4Gbwv9fjBME4ijpYtr1A4Eaq3yb1d/pZiNy/mfz2YAKc/6VFBsOwWzHznyMneKk3LYsk pFORi6J7bCVCGJT/w4C0J5OROadcam6J/ZaynXDFCrjxHXaNAfvMoOsN3+1D3aRKpP4c tV07nnOsi5/C/GRHUZo//+W2hAon6BVAWYRS5NaJwT8otIUUpLoEvF6u9PLLENTlYQaD 1YOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=wfYhB7RXUqaiyvTYfdggr111rUrcCYz0SCl+kSO679c=; b=zUcrs/bAHKSnMffpmh7lfpT6KBSp8lbjzeT71h4MaTUAutVbnjQWozeY+l5QZrp6DZ xygmI94frEEwFSHlFuZ4zSoR+6ONKDjRNYeJ2tlt5VFz0QQiSlJdDrxvi5sNryg0I2d8 2ZfWwJSt1LBnPwjzQB4X3X5sNZpA/7nGdBaLOcARA4nTNN41Xjmsa64/szGVozBgsqo5 Iux04d4j/XdBaLwmekuXwO0YMri5JtBgGMdn6ySt6yXEUc2y5VY6TmoODId2QybAFcwS GwSB0ht1KQ998+pSqonBtVsWlIWuUGQ5m6Q0hHsKIzOGUuqA7iHF2ns9Moa/Yfp/TMDW 3bnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=A8hbsldP; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i7si11171364edb.116.2020.06.22.16.31.36; Mon, 22 Jun 2020 16:31:58 -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=@walle.cc header.s=mail2016061301 header.b=A8hbsldP; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730513AbgFVVEL (ORCPT + 99 others); Mon, 22 Jun 2020 17:04:11 -0400 Received: from ssl.serverraum.org ([176.9.125.105]:34275 "EHLO ssl.serverraum.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730462AbgFVVEI (ORCPT ); Mon, 22 Jun 2020 17:04:08 -0400 Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id ED0C7226E9; Mon, 22 Jun 2020 23:03:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1592859846; 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=wfYhB7RXUqaiyvTYfdggr111rUrcCYz0SCl+kSO679c=; b=A8hbsldPm59by1p7qTlAcpiW2fSii5BxN2YF47VruG1AmYjMUX4eqDZUOQQxmep9NxFX39 uT+Ax7VQ2X/P/ykjrQSXvklnP4V7D60C5H8xKLNj4OSXgQ/MBzKY/BH/eIHpUE2iUyrnhs fJ0d/a0eA/3iWyoXCuolRflC+rhaLIA= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 22 Jun 2020 23:03:59 +0200 From: Michael Walle To: Rob Herring Cc: Lee Jones , Andy Shevchenko , Mark Brown , devicetree , Linux Kernel Mailing List , linux-arm Mailing List , Linus Walleij , Guenter Roeck , Andy Shevchenko , Robin Murphy , GregKroah-Hartman Subject: Re: [RFC] MFD's relationship with Device Tree (OF) In-Reply-To: <0709f20bc61afb6656bc57312eb69f56@walle.cc> References: <20200609110136.GJ4106@dell> <0709f20bc61afb6656bc57312eb69f56@walle.cc> User-Agent: Roundcube Webmail/1.4.5 Message-ID: <970bf15b1106df3355b13e06e8dc6f01@walle.cc> X-Sender: michael@walle.cc Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 2020-06-14 12:26, schrieb Michael Walle: > Hi Rob, > > Am 2020-06-10 00:03, schrieb Rob Herring: > [..] >> Yes, we should use 'reg' whenever possible. If we don't have 'reg', >> then you shouldn't have a unit-address either and you can simply match >> on the node name (standard DT driver matching is with compatible, >> device_type, and node name (w/o unit-address)). We've generally been >> doing 'classname-N' when there's no 'reg' to do 'classname@N'. >> Matching on 'classname-N' would work with node name matching as only >> unit-addresses are stripped. > > This still keeps me thinking. Shouldn't we allow the (MFD!) device > driver creator to choose between "classname@N" and "classname-N". > In most cases N might not be made up, but it is arbitrarily chosen; > for example you've chosen the bank for the ab8500 reg. It is not > a defined entity, like an I2C address if your parent is an I2C bus, > or a SPI chip select, or the memory address in case of MMIO. Instead > the device driver creator just chooses some "random" property from > the datasheet; another device creator might have chosen another > property. Wouldn't it make more sense, to just say this MFD provides > N pwm devices and the subnodes are matching based on pwm-{0,1..N-1}? > That would also be the logical consequence of the current MFD sub > device to OF node matching code, which just supports N=1. > Rob? Lee? -michael