Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp893722ybt; Sun, 14 Jun 2020 03:31:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0UQnFJTymRZeyhibDHZ0wh3EZvanzoly7fKjaOn242J9gTloQNi9hWUy7s65bCim+nIDO X-Received: by 2002:a17:906:4c46:: with SMTP id d6mr20413792ejw.503.1592130663882; Sun, 14 Jun 2020 03:31:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592130663; cv=none; d=google.com; s=arc-20160816; b=gROX4EH2E3+gKse0pu4RsGKAZbQH/wIT5ZK61ijrAln5qtSflBb9qCDeQZcqcUumtd EkSBsuvhxzCxAqDUXMUbMFHBIozFf1YBGCZZ5k+BbzJIJ5aTZvQFVTKBePad0Ezfktut UM78/VNsQ7X1ciLInX1+xnGQZTlEJ61Fjb/0Je2h5jKse6g1URBcfUZiQYh1dJgzJy/4 7bS3isMFaIbMJXb7n4iaCMi6YWt9841r2TjkFq8H6oPcC2yA+kxQjEX9T/C0euK1Y3Og r8t/t+AXoVU/edVTEMxEEDYZiMMvcF8NsOB61zqQFbu+oLUaAPldWz0DYsiwICyhD17A AbyA== 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=gJxvGjLG+zCr4pQZGoAns/cjbZC5rD9SgUiVfLcsZLU=; b=D70mJ97kjXdqU2iCfJHrcbi46YwnUpPfmIGIoyeAOeuNNrDFUVv3Jh7poMf6PmA2sv 82DSvTZfiUzkYk+4Uj/4LjavE0wTIc8tKQdVvrOasl+2O8iD8jhEA/YTw3We2lF4VT4A gWhOEvXlgMmendlrqaD/r9clEkPy99MiVBpp0O7aql7tqmt5ZhfwS5cEhhU4hcmW/kUf S9N8hpQbbDP/GxO/XX7ouGlPHrQPB0dafeW291mU4kDK7bMGq6RP0dO4x4Xpu1GHcC8m df6KkP+qCyk40VX0pXa29OsRA22zr2KwygcCgGsKuvGBFlUIRTijV7JlYK+fNQuEWL5G uY4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=BlnySnM1; 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 y25si6640354ejr.322.2020.06.14.03.30.40; Sun, 14 Jun 2020 03:31: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=@walle.cc header.s=mail2016061301 header.b=BlnySnM1; 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 S1726950AbgFNK0n (ORCPT + 99 others); Sun, 14 Jun 2020 06:26:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725265AbgFNK0l (ORCPT ); Sun, 14 Jun 2020 06:26:41 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76259C05BD43; Sun, 14 Jun 2020 03:26:41 -0700 (PDT) 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 0729722F99; Sun, 14 Jun 2020 12:26:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1592130396; 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=gJxvGjLG+zCr4pQZGoAns/cjbZC5rD9SgUiVfLcsZLU=; b=BlnySnM1M9f1ZLAY/nIMAW9bAmVM+K1Bf0A3llGF/CTB6QOnLrIBj40JijOMu1qlQSjljA ZtMT+RwKwVKn+uGRrfs5xtJu6Q8SxuYPJCt9FvQTRBheTbAujw+6glWcKcLZOU7A3BmMWG pvRuQ/8ZNiI21iavo62b6Q0nAC/+PSc= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 14 Jun 2020 12:26:30 +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: References: <20200609110136.GJ4106@dell> User-Agent: Roundcube Webmail/1.4.5 Message-ID: <0709f20bc61afb6656bc57312eb69f56@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 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. -michael