Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp493191ybt; Wed, 24 Jun 2020 04:26:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQQqD0gzvQ4QdvcKnOkgkMaLyCGauyVBhFloYRrMq57GIHzw70kKqT3wR2lUrESnEJ6bKV X-Received: by 2002:a50:8e1e:: with SMTP id 30mr16049724edw.283.1592997960817; Wed, 24 Jun 2020 04:26:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592997960; cv=none; d=google.com; s=arc-20160816; b=RNQeeSKaGtYxbLcvie2ZhhL6XYpPNP1V47tK4vMpqw38rkRpzlllNRpVRyvs1SwbEd 4ZgjAubwM0wQ2jHg//JxX5WRIRmOwW0pB2615tzWF9HLrGUn6aQoGSKr8Wd4Y0oEPBmS PMa34SfGRkZkGFCRoysjHW2GvwAIQxe0xfjEQZASbzGHNZXyTbfswrBzFUuQpTLwQUSS lDzuq0lUEMeDkgWsY+sZO/rOtLth2ZCN2bqkOmKMDkAS8pkMAEjnEq+lCA4nVnfZiK2+ rB6KYi89O4ThUq/6c3BQlUnXkdK9bAw/A4YG47M7BY5K54eEJEnLq5bdSkAtPXfWBjBp fWTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=NrvSiaDLXTBfKnuOt7hk8LUvf/vD6JGQ7WAbFA5i7Uc=; b=YCK0v6+85ZOfdIgx/PPgOn1PmWwZjNTBmb1wK6D2lSP6AfkjoCvzFZzHEHxXZoLOaj rMt3dSWEv2Ncawz2WVxlAtoKkiqrXNfwDhzDiAeJZRmKo76sPCZYRWsitH2DRuqndHuQ f125GkcjsF9qNMV56S7QLTPH20u9+vPJtkxJgWWh1jiBCTMiZxT4ReoF2ICM+Xf4FD49 a0lhHjpVa/cbBEdmxPXTwClnNk+LCagJRdYMiiPYMJdnEikbwQ5bNMmMO8PbOfIOVHaw V534h08pM/Zt2X8Z9V2PAVGN5qxgkPzABYgDTn9mrQRGsEQzrn5OwXaGNLj7ohM13Frm 6Z3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h+qiZfi0; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oi20si12319123ejb.571.2020.06.24.04.25.37; Wed, 24 Jun 2020 04:26:00 -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=@linaro.org header.s=google header.b=h+qiZfi0; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390610AbgFXLYV (ORCPT + 99 others); Wed, 24 Jun 2020 07:24:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390564AbgFXLYU (ORCPT ); Wed, 24 Jun 2020 07:24:20 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FFF2C0613ED for ; Wed, 24 Jun 2020 04:24:19 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id o2so2145438wmh.2 for ; Wed, 24 Jun 2020 04:24:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=NrvSiaDLXTBfKnuOt7hk8LUvf/vD6JGQ7WAbFA5i7Uc=; b=h+qiZfi0OhOnDkgTLpZizeUC5IOa97wx3ik8VofmQ5pfxMjOrV/QZdQ1bzH0PCVdiU UgreOMhRLysmM+bBtebPY7anIyh5Ho7OoqBtQmM4nX9hm9SZdRD6PwLqtvezCvD5x2bP yKLL3oYAOG9YVSUhAPv2B0YkFFu+XrIW2mOMZL0AxwspP7uIhMzfAKKRW5Sjn3PfuI7I 8tUEK+4WbXF6HcnEghMiSEhm2Z6Z58auYOW96L/YLupOfUvseYw9YDjMWDUdRzEAqj/T mPxbp9qt//mWBrqgyYQmdqSzcji9eNyItiQcmo1Ts9oa2hmbhVVJiBaLSzhtiyZR1Cab UiuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=NrvSiaDLXTBfKnuOt7hk8LUvf/vD6JGQ7WAbFA5i7Uc=; b=bJJgtUTEfoLtG/vJFRSSzxdEAi5osV4mqAfAWiB1NQ72LiJHay+ReDB3pl/e6rgFqe Mp4MeFPEKeUnDuI7O4RLDCRb1o8GGGj1yL9tVkRZ+/9yQOQXz60maFUHqrNKJoI+jMe/ BehsZQJJ1ozNXo4bRByqistlVvvoVWYZixMEu2n9o4Nr3oMFuObOTyI72jCMlKiR2C7Z jmmakYdEYHYx6/NzCsYqah1eyxPrcZSdXgsrBGFjwAvERr3hndoPA3QbFS5CxoP/34uA +yZoEh4DACfID1DQdVWQ4+OVrl1e6fxsE8RSMmj4RZuv6VEkxV7OTtqLIseF8xl6L/p5 zI9A== X-Gm-Message-State: AOAM5309Xl/efi5eaeEa2rT7/mDSi1I/hEpK3FvnvMJSShzQcbhJPpfc AkReiOXl8e0WBSPA6OfXHEUwNQ== X-Received: by 2002:a7b:c4c3:: with SMTP id g3mr8696211wmk.126.1592997857631; Wed, 24 Jun 2020 04:24:17 -0700 (PDT) Received: from dell ([2.27.35.144]) by smtp.gmail.com with ESMTPSA id x5sm7962485wmg.2.2020.06.24.04.24.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 04:24:16 -0700 (PDT) Date: Wed, 24 Jun 2020 12:24:14 +0100 From: Lee Jones To: Michael Walle Cc: Frank Rowand , andy.shevchenko@gmail.com, robh+dt@kernel.org, broonie@kernel.org, devicetree@vger.kernel.org, linus.walleij@linaro.org, linux@roeck-us.net, andriy.shevchenko@linux.intel.com, robin.murphy@arm.com, gregkh@linuxfoundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/3] mfd: core: Make a best effort attempt to match devices with the correct of_nodes Message-ID: <20200624112414.GG954398@dell> References: <20200611191002.2256570-1-lee.jones@linaro.org> <30f03734-61fd-1b6b-bf11-21b6423a7c50@gmail.com> <20200624064145.GC954398@dell> <7a31b34940984b3f0921ed2d4fb29a58@walle.cc> <20200624082352.GF954398@dell> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 24 Jun 2020, Michael Walle wrote: > Am 2020-06-24 10:23, schrieb Lee Jones: > > On Wed, 24 Jun 2020, Michael Walle wrote: > > [..] > > > > Although Rob mentioned to maybe relax that, but I sill fail to see > > > the advantage to have an arbitrary reg property instead of a unique > > > node name. > > > > I don't have a strong opinion either way. > > > > We can *also* add node name matching if Rob deems it fit. > > Where do you see a use of the reg property? The vast proportion of devices do and will have 'reg' properties. > You already expressed > that you see exposing the internal offset as a hack: > > "Placing "internal offsets" into the 'reg' property is a hack." [1] > > So what are you putting into reg instead? Rob suggested "anything" > documented in the hardware manual. But isn't this just also something > we make up and especially for the MFD driver. Thus IMHO it doesn't > qualify as a unit-address, which - as far as I understand it - is > unique on the parent bus. To repeat my argument, its not a defined > thing like an I2C address. So our argument in the past (although this is going back the best part of 10 years) has always been that; if devices are different, there is almost always a documented (in the H/W manual/datasheet) way to differentiate/address them. Whether that's a physical address, an offset, a bank ID, an I2C/SPI address or whatever. As to not being able to use that address/ID due to the DT rules surrounding address space as per the example in your previous email, well that's a rule specific to DT and makes little sense in some real world cases (such as, dare I say it, the AB8500). You'll have to take the aforementioned point and the point about using node names instead of 'reg' properties up with Rob and the other interested DT folk. Again, I'm happy to extend that functionality if it becomes acceptable practice. > [1] https://lore.kernel.org/linux-devicetree/20200609185231.GO4106@dell/ > > -michael -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog