From patchwork Thu Sep 10 13:42:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Hunter X-Patchwork-Id: 254736 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39D87C433E2 for ; Thu, 10 Sep 2020 21:31:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DB49A221E2 for ; Thu, 10 Sep 2020 21:31:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="MdGi4QUT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728300AbgIJVbC (ORCPT ); Thu, 10 Sep 2020 17:31:02 -0400 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:10014 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730983AbgIJNwC (ORCPT ); Thu, 10 Sep 2020 09:52:02 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Thu, 10 Sep 2020 06:42:46 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Thu, 10 Sep 2020 06:43:00 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Thu, 10 Sep 2020 06:43:00 -0700 Received: from HQMAIL109.nvidia.com (172.20.187.15) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 10 Sep 2020 13:42:59 +0000 Received: from hqnvemgw03.nvidia.com (10.124.88.68) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Thu, 10 Sep 2020 13:42:59 +0000 Received: from moonraker.nvidia.com (Not Verified[10.26.73.219]) by hqnvemgw03.nvidia.com with Trustwave SEG (v7, 5, 8, 10121) id ; Thu, 10 Sep 2020 06:42:59 -0700 From: Jon Hunter To: Bartosz Golaszewski , Rob Herring , Thierry Reding CC: , , , , Jon Hunter Subject: [PATCH 1/5] misc: eeprom: at24: Initialise AT24 NVMEM ID field Date: Thu, 10 Sep 2020 14:42:35 +0100 Message-ID: <20200910134239.192030-2-jonathanh@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200910134239.192030-1-jonathanh@nvidia.com> References: <20200910134239.192030-1-jonathanh@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1599745366; bh=eUWz+BUycmtkyBt7NEujKfX09kU6ioD/uAMi+r9OUCI=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:X-NVConfidentiality: Content-Transfer-Encoding:Content-Type; b=MdGi4QUT1wm7d8uBr9LDdiDqw0/09mkzqrRRhSebZWxhOz/o+LWyoWP3XD8kECm88 nFzbfaT9Bai1qbRewAQBjywYd1IEIX7zAKlo5O9W12Ll00aHVou8U64DV/vz1wNbyH lFeREFZ/7L+P0YZ2mjM1lB+YmskHlINI441wnTLWBKEjVEwzBhsTUDIGB3EX2KjfcH Bn3bNbupDPm5S6bSBGreLJKthMZS4X99hr3KC3O1rLMlC0atPenHSZAG8X/e6oitpc deBXUU7fzkP+EeGnBjGpKsoQ0PbTypXvfovY4KUbcKkvFY0IWn5vJfG10BLCm5d8uf CQwQ/57KwWsTg== Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org The AT24 EEPROM driver does not initialise the 'id' field of the nvmem_config structure and because the entire structure is not initialised, it ends up with a random value. This causes the NVMEM driver to append the device 'devid' value to name of the NVMEM device. Although this is not a problem per-se, for I2C devices such as the AT24, that already have a device unique name, there does not seem much value in appending an additional 0 to the I2C name. For example, appending a 0 to an I2C device name such as 1-0050 does not seem necessary and maybe even a bit confusing. Therefore, fix this by setting the NVMEM config.id to NVMEM_DEVID_NONE for AT24 EEPROMs. Signed-off-by: Jon Hunter --- drivers/misc/eeprom/at24.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c index e9df1ca251df..3f7a3bb6a36c 100644 --- a/drivers/misc/eeprom/at24.c +++ b/drivers/misc/eeprom/at24.c @@ -715,6 +715,7 @@ static int at24_probe(struct i2c_client *client) nvmem_config.name = dev_name(dev); nvmem_config.dev = dev; + nvmem_config.id = NVMEM_DEVID_NONE; nvmem_config.read_only = !writable; nvmem_config.root_only = !(flags & AT24_FLAG_IRUGO); nvmem_config.owner = THIS_MODULE; From patchwork Thu Sep 10 13:42:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Hunter X-Patchwork-Id: 254740 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77AA4C433E2 for ; Thu, 10 Sep 2020 13:55:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 24588208E4 for ; Thu, 10 Sep 2020 13:55:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="YHGlXZ5e" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730669AbgIJNyj (ORCPT ); Thu, 10 Sep 2020 09:54:39 -0400 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:10015 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730984AbgIJNwC (ORCPT ); Thu, 10 Sep 2020 09:52:02 -0400 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Thu, 10 Sep 2020 06:42:48 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Thu, 10 Sep 2020 06:43:02 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Thu, 10 Sep 2020 06:43:02 -0700 Received: from HQMAIL105.nvidia.com (172.20.187.12) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 10 Sep 2020 13:43:01 +0000 Received: from hqnvemgw03.nvidia.com (10.124.88.68) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Thu, 10 Sep 2020 13:43:01 +0000 Received: from moonraker.nvidia.com (Not Verified[10.26.73.219]) by hqnvemgw03.nvidia.com with Trustwave SEG (v7, 5, 8, 10121) id ; Thu, 10 Sep 2020 06:43:01 -0700 From: Jon Hunter To: Bartosz Golaszewski , Rob Herring , Thierry Reding CC: , , , , Jon Hunter Subject: [PATCH 2/5] dt-bindings: eeprom: at24: Add label property for AT24 Date: Thu, 10 Sep 2020 14:42:36 +0100 Message-ID: <20200910134239.192030-3-jonathanh@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200910134239.192030-1-jonathanh@nvidia.com> References: <20200910134239.192030-1-jonathanh@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1599745369; bh=O0fz7iA/JfwFmK2MfkAYul7GJEtbt1EDCkF9bjPsbNQ=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:X-NVConfidentiality: Content-Transfer-Encoding:Content-Type; b=YHGlXZ5eR3KnYr0WLqYJfNL63GaEg7MIK70Q/XgKiQSITGygNF3Ya8kHRzZde8Ibs atPHemPP68PVwWd++WkAFtMU3rc+ou3qR1qtNGvciBu3PjMSiEKa0hjrPPvVm1H/sY Xvj3cDDSjVrmK0y7l3gxYFOAEF7vU35RTpuFsIre7XWIJ/lwuLPLDT7THfkoxddSQv iMQJf7qXL0mzzO92Vs1DkDOMlQDnIu01zyv1jQnkKNmkdz+k9Lwt1iV9nsYX6otQCL isCgac8YX6PsyQ/iycDVeE3oabadlGx+MM0RPpXorSpj5RJrkCpzfGnsbrSNUwg7/3 lqheMt/m12uZA== Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Add a label property for the AT24 EEPROM to allow a custom name to be used for identifying the EEPROM on a board. This is useful when there is more than one EEPROM present. Signed-off-by: Jon Hunter --- Documentation/devicetree/bindings/eeprom/at24.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/eeprom/at24.yaml b/Documentation/devicetree/bindings/eeprom/at24.yaml index 4cee72d53318..5c00d8a146b0 100644 --- a/Documentation/devicetree/bindings/eeprom/at24.yaml +++ b/Documentation/devicetree/bindings/eeprom/at24.yaml @@ -114,6 +114,10 @@ properties: - const: renesas,r1ex24128 - const: atmel,24c128 + label: + description: Descriptive name of the EEPROM. + maxItems: 1 + reg: maxItems: 1 From patchwork Thu Sep 10 13:42:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Hunter X-Patchwork-Id: 254737 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75A24C43461 for ; Thu, 10 Sep 2020 20:53:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1B01420829 for ; Thu, 10 Sep 2020 20:53:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="LFm5fyix" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726769AbgIJUwm (ORCPT ); Thu, 10 Sep 2020 16:52:42 -0400 Received: from hqnvemgate24.nvidia.com ([216.228.121.143]:10168 "EHLO hqnvemgate24.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730500AbgIJO6V (ORCPT ); Thu, 10 Sep 2020 10:58:21 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Thu, 10 Sep 2020 06:40:50 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Thu, 10 Sep 2020 06:43:06 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Thu, 10 Sep 2020 06:43:06 -0700 Received: from HQMAIL101.nvidia.com (172.20.187.10) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 10 Sep 2020 13:43:06 +0000 Received: from hqnvemgw03.nvidia.com (10.124.88.68) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Thu, 10 Sep 2020 13:43:06 +0000 Received: from moonraker.nvidia.com (Not Verified[10.26.73.219]) by hqnvemgw03.nvidia.com with Trustwave SEG (v7, 5, 8, 10121) id ; Thu, 10 Sep 2020 06:43:05 -0700 From: Jon Hunter To: Bartosz Golaszewski , Rob Herring , Thierry Reding CC: , , , , Jon Hunter Subject: [PATCH 4/5] arm64: tegra: Add label properties for EEPROMs Date: Thu, 10 Sep 2020 14:42:38 +0100 Message-ID: <20200910134239.192030-5-jonathanh@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200910134239.192030-1-jonathanh@nvidia.com> References: <20200910134239.192030-1-jonathanh@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1599745250; bh=TmFIrEhD/r+lnGd7gZPolkozi/diWzcIkACJ6iIO42g=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:X-NVConfidentiality: Content-Transfer-Encoding:Content-Type; b=LFm5fyixUUN/5Lc9Ix7kMM8WLtunmR3y7Evl9sIaanXTMG3BdpbjcNHSjcErRZ1az YDGY5MjLo83dn+VX5N6nTwgPi43Ve3eIySDAZVFbgxU+9RU8YbKwA9EvUKIv8vIFu+ doMQVWIYEiMDnmoFonAOIVWNyMPfdnabXg2SXrHMlYVl+4mNs6sh3dLmPnEwXWwc6L khHDW3rMKDI/oSy6ulYe09vBrQMM3zKJ8GeH+/sDmsFnUzt13Etv1BPVBR5b6+79uG K1yBsgISr9sJs2zIlOb2W0UvQKvCQ0mVriLi/oSxzJyPx6d4hiaHSVodAZDhGpP9tR Q78o4RMqMeRnA== Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Populate the label property for the AT24 EEPROMs on the various Jetson platforms. Note that the name 'module' is used to identify the EEPROM on the processor module board and the name 'system' is used to identify the EEPROM on the main base board (which is sometimes referred to as the carrier board). Signed-off-by: Jon Hunter --- arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts | 1 + arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi | 1 + arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi | 1 + arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts | 1 + arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi | 1 + arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts | 1 + arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts | 2 ++ 7 files changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts b/arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts index 802b8c52489a..381a84912ba8 100644 --- a/arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts +++ b/arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts @@ -222,6 +222,7 @@ eeprom@57 { compatible = "atmel,24c02"; reg = <0x57>; + label = "system"; vcc-supply = <&vdd_1v8>; address-width = <8>; pagesize = <8>; diff --git a/arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi b/arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi index 53d92fdd7f06..fd9177447711 100644 --- a/arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi @@ -173,6 +173,7 @@ eeprom@50 { compatible = "atmel,24c02"; reg = <0x50>; + label = "module"; vcc-supply = <&vdd_1v8>; address-width = <8>; pagesize = <8>; diff --git a/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi b/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi index 0ea0bd83cb8e..d71b7a1140fe 100644 --- a/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi @@ -64,6 +64,7 @@ eeprom@50 { compatible = "atmel,24c02"; reg = <0x50>; + label = "module"; vcc-supply = <&vdd_1v8ls>; address-width = <8>; pagesize = <8>; diff --git a/arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts b/arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts index 4d8a0e10250f..54d057beec59 100644 --- a/arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts +++ b/arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts @@ -28,6 +28,7 @@ eeprom@56 { compatible = "atmel,24c02"; reg = <0x56>; + label = "system"; vcc-supply = <&vdd_1v8ls>; address-width = <8>; pagesize = <8>; diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi b/arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi index 85ee7e6b71ac..6077d572d828 100644 --- a/arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi @@ -273,6 +273,7 @@ eeprom@50 { compatible = "atmel,24c02"; reg = <0x50>; + label = "module"; vcc-supply = <&vdd_1v8>; address-width = <8>; pagesize = <8>; diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts b/arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts index 56adf287a82c..4c9c2a054642 100644 --- a/arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts +++ b/arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts @@ -86,6 +86,7 @@ eeprom@57 { compatible = "atmel,24c02"; reg = <0x57>; + label = "system"; vcc-supply = <&vdd_1v8>; address-width = <8>; pagesize = <8>; diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts b/arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts index ba892cd4b5a9..859241db4b4d 100644 --- a/arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts +++ b/arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts @@ -144,6 +144,7 @@ eeprom@50 { compatible = "atmel,24c02"; reg = <0x50>; + label = "module"; vcc-supply = <&vdd_1v8>; address-width = <8>; pagesize = <8>; @@ -155,6 +156,7 @@ eeprom@57 { compatible = "atmel,24c02"; reg = <0x57>; + label = "system"; vcc-supply = <&vdd_1v8>; address-width = <8>; pagesize = <8>;