From nobody Sat Oct 4 15:54:56 2025 Received: from mx07-007fc201.pphosted.com (mx07-007fc201.pphosted.com [185.132.181.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3639B2E9EDB; Thu, 14 Aug 2025 11:28:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.132.181.212 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755170921; cv=none; b=LWkCvg9td7Q+8dVNsbV//lk2PGjNeqJHH6S5yE88a4gGYGrPNsTe7LTyI2cEBuOiAgtY/1yLTFqT8K4WQnfz3g1sabO1lUKSk9MDlh4vYI7XW0mIK4sythAvr94JPFnMexiXA3XvOS7ULR5d+xJa7Sf25dxAxCs1v29ksCrCJCA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755170921; c=relaxed/simple; bh=wpGGVHhLjE6n4GKS18ugJuxE8ffwkBgiBgUXM59+b10=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=R6X0LsFpJryqNIGW4tNELuKrcF9SJeCpgVgZpGVv3s+CCICWFXNr+Knzwg1p6053j23CpkX56NDTHR7lylCbpT9xrZ4Ad04OW2yud75VaaMMfe2xBdN0JytqUJm9APhqkgR4B3fXhkVxuooyPaKeQnAJb/QwGIrqLnsNFMaSzuk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=cab.de; spf=pass smtp.mailfrom=cab.de; dkim=pass (2048-bit key) header.d=cab.de header.i=@cab.de header.b=zhtAFILE; arc=none smtp.client-ip=185.132.181.212 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=cab.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cab.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cab.de header.i=@cab.de header.b="zhtAFILE" Received: from pps.filterd (m0456228.ppops.net [127.0.0.1]) by mx07-007fc201.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 57EBGRg22316998; Thu, 14 Aug 2025 13:16:27 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cab.de; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pp-2025; bh=GB jorvDA3HPkIVr2+0nQydEbz/Zfef6zsEQ4v5OuB9E=; b=zhtAFILEg9roBYf8Ey 2RVAqpV//ZBT9GrL2DvBxH3ezh/ETilmySdCg1y6gT9y++tG1hjX7u95RwY9Goxz BdsyPjZEZrp+QbajgkEdRMjIMtBIpLtlyVWV4EvjYHVY3onp3mMTMUYhyJoiiFo8 UiEyveuTROGn1+pC8/v/zd0PVvkukNsDGV1Agw191Q0ipOBf4Tf1HxkMA/HOzIhv swJ07ZpGSkF+tsGNZBSXIOcfoz6yHJElotvnmX5wHdBl/gdnjrmzsGgjDnFYVfhH X7Jzcvnvh1gyxF5LIOnFy3Ks57H3wiMgl+uXfNJ9HDD2scqimbgTpzkZc9zOaDzV LYKQ== Received: from adranos.cab.de (adranos.cab.de [46.232.229.107]) by mx07-007fc201.pphosted.com (PPS) with ESMTPS id 48fq5w10wh-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Aug 2025 13:16:27 +0200 (MEST) Received: from KAN23-025.cab.de (10.100.0.18) by Adranos.cab.de (10.10.1.54) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.24; Thu, 14 Aug 2025 13:16:42 +0200 From: Markus Heidelberg To: Arnd Bergmann , Greg Kroah-Hartman , CC: Markus Heidelberg , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Christian Eggers , Alexander Sverdlin , Jiri Prchal , Subject: [PATCH 1/3] dt-bindings: eeprom: at25: use "size" for FRAMs without device ID Date: Thu, 14 Aug 2025 13:15:30 +0200 Message-ID: <20250814111546.617131-2-m.heidelberg@cab.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250814111546.617131-1-m.heidelberg@cab.de> References: <20250814111546.617131-1-m.heidelberg@cab.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: Adranos.cab.de (10.10.1.54) To Adranos.cab.de (10.10.1.54) X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwODE0MDA5MyBTYWx0ZWRfX6Tuoi0+xX3Ln wO2Y2JsohVJM8jgPQumTzm7xByRDqSj45QwN160+Y85KiNF2QAaJyoGZf4Wo3G+sEVtxL1o2drU Uhss827ckYuTvgFsapuA5rxUtqJybl63vbodO3L/pMO+JrZYxhLB9ymxcj5MyN6JoTOTkFspYv5 jOnlv9s9+lOG+93wpb9RMrIt0SjUhVDDJPNrZh7ixW5EpmGytB0CA0k5C1Lhqcl3YrJRjn+tdme iN+3pWI0keQ8nn4rO4hWecaSxgHy48RZO3uhcJtbpGZNXb43w8fNK+ExFIvexuuBF97zwHDv4X2 ShGnQbRH7UMEBVh/tGuYmWv/vwP4Qt9eR99eh7ln1a9a2Q8jXi0ukA9xGqmzYI= X-Proofpoint-ORIG-GUID: 85cKqEuc4ri-QMem8YHXBn0DopdlwJdT X-Authority-Analysis: v=2.4 cv=eMkTjGp1 c=1 sm=1 tr=0 ts=689dc58b cx=c_pps a=LmW7qmVeM6tFdl5svFU9Cg==:117 a=LmW7qmVeM6tFdl5svFU9Cg==:17 a=K2GD-7p5giEA:10 a=2OwXVqhp2XgA:10 a=VwQbUJbxAAAA:8 a=8QyJCB_uBBKMM_hJN28A:9 X-Proofpoint-GUID: 85cKqEuc4ri-QMem8YHXBn0DopdlwJdT Content-Type: text/plain; charset="utf-8" Link: https://lore.kernel.org/all/20250401133148.38330-1-m.heidelberg@cab.d= e/ Signed-off-by: Markus Heidelberg --- Documentation/devicetree/bindings/eeprom/at25.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/eeprom/at25.yaml b/Documenta= tion/devicetree/bindings/eeprom/at25.yaml index c31e5e719525..d6fe84091ad4 100644 --- a/Documentation/devicetree/bindings/eeprom/at25.yaml +++ b/Documentation/devicetree/bindings/eeprom/at25.yaml @@ -56,6 +56,7 @@ properties: $ref: /schemas/types.yaml#/definitions/uint32 description: Total eeprom size in bytes. + Also used for FRAMs without device ID where the size cannot be detec= ted. =20 address-width: $ref: /schemas/types.yaml#/definitions/uint32 --=20 2.43.0 From nobody Sat Oct 4 15:54:56 2025 Received: from mx08-007fc201.pphosted.com (mx08-007fc201.pphosted.com [91.207.212.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DAE772F39C3; Thu, 14 Aug 2025 11:43:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.207.212.40 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755171791; cv=none; b=GGEG3HV2wR1Bhtyda4gyPMFKj9pLZV8jMezZogUm1etRpQPpnwJzD3YB372eHW/KRPn5W/5Iq96ky6wQESpAPHKbw6w51s+K4SPuYq/pWWsKWyp7wo4G3H9oJlof6hnPyjzErdKm5U4Ak9z3yyJwuKtuZznERhK1FoQgtImdxEo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755171791; c=relaxed/simple; bh=upg5JXhZmmO3FSdjgRQHF5NKe2rl1q3xV1hXDjIVTkY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=GaVImTLUKZjwD6Fs2qekA9nD3Q94DAzp48tq6fXdUTjrenKXNJ33eOJkIjAOiU0FObg1ZE8M2QRamx/hlD0LQdaEoOwDq0sACeoqj99E2SmosByFsdgZeTwsllq6jNAbDx80A8JwijDjsTj+e9exbIzH7HlbYXkfWCJ52iMm41Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=cab.de; spf=pass smtp.mailfrom=cab.de; dkim=pass (2048-bit key) header.d=cab.de header.i=@cab.de header.b=l52o50km; arc=none smtp.client-ip=91.207.212.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=cab.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cab.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cab.de header.i=@cab.de header.b="l52o50km" Received: from pps.filterd (m0456229.ppops.net [127.0.0.1]) by mx08-007fc201.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 57EAw6TS2274087; Thu, 14 Aug 2025 13:16:28 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cab.de; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pp-2025; bh=BE yDH2oXAwii9qcOUqMXBqBnedSlZHxU+h9s7+WfNso=; b=l52o50kmL9b/P1xJL4 l9L/7geDRKauwf9iZX39OPwLlFI9CXbNgrobAF3EFZr6KNIK2L99rIInW5jpXwIo M38Ed05DAvfKY4xIqk0E0i/eRLW+7qlrmrsyptLJlb1RFmuiNB9WPB8OMGGzv7mj yjo717mD3BtgwQmq+Fu+yo8M7hnMv3eJlN7R220vY+pjJMfRvqQlHmX0gjHDYbaM C6tPXxzJZszFtzA5cPJlV5FpWzbm5yo0EfTa2PdROUS+sUx8LXEQ4WXO9jYnIMb+ ACQur8MV2hIzuMHFVTeLYKmriDeCBSQ2fqAr9IduMNBcbOukHHiEYgto/2LNzW8B KNIg== Received: from adranos.cab.de (adranos.cab.de [46.232.229.107]) by mx08-007fc201.pphosted.com (PPS) with ESMTPS id 48fqcpryv2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Aug 2025 13:16:28 +0200 (MEST) Received: from KAN23-025.cab.de (10.100.0.18) by Adranos.cab.de (10.10.1.54) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.24; Thu, 14 Aug 2025 13:16:42 +0200 From: Markus Heidelberg To: Arnd Bergmann , Greg Kroah-Hartman , CC: Markus Heidelberg , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Christian Eggers , Alexander Sverdlin , Jiri Prchal , Subject: [PATCH 2/3] eeprom: at25: support Cypress FRAMs without device ID Date: Thu, 14 Aug 2025 13:15:31 +0200 Message-ID: <20250814111546.617131-3-m.heidelberg@cab.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250814111546.617131-1-m.heidelberg@cab.de> References: <20250814111546.617131-1-m.heidelberg@cab.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: Adranos.cab.de (10.10.1.54) To Adranos.cab.de (10.10.1.54) X-Proofpoint-ORIG-GUID: 6ZdVIAaDRQQe1cOv17wH31CWj4VXTz9k X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwODE0MDA5MyBTYWx0ZWRfX7obF2Me047TK 7ahLkXO3c1in7crCSIIEFeP3jY/XR06YqZGxjqhsdjJarBry0DCppUDPfMNrRdW2yWPn2obkcC/ e/2Bw5yC8+F8kcUxrHB6MOs0axVMeNt9rOoDplFA03XZkaEreYcOGs/NHsZKMhYQ9yqy+v/1fD0 pq6kU8Rv9HGn3LegazwoNHzFBPUbcipkEgp+jeyKpwbdnAj+BPf6th6LWp1tNvfTpKRQNWiImHB jHZgEhccncSGvrDyhQmFoM071LUWcxUktUUZwhe597DDnK7VaUndnBl4iP2HzB1rabBgSz7bdau KSpesu+1LyyYr5HCtnweP8cRDZMPtLpzCBvijlB+QFo0NiCU+TrXUR06NWN4xk= X-Authority-Analysis: v=2.4 cv=bctrUPPB c=1 sm=1 tr=0 ts=689dc58c cx=c_pps a=LmW7qmVeM6tFdl5svFU9Cg==:117 a=LmW7qmVeM6tFdl5svFU9Cg==:17 a=K2GD-7p5giEA:10 a=2OwXVqhp2XgA:10 a=VwQbUJbxAAAA:8 a=rCJ37w5iS5YF4Iu26g0A:9 X-Proofpoint-GUID: 6ZdVIAaDRQQe1cOv17wH31CWj4VXTz9k Content-Type: text/plain; charset="utf-8" Not all FRAM chips have a device ID and implement the corresponding read command. For such chips this led to the following error on module loading: at25 spi2.0: Error: no Cypress FRAM (id 00) The device ID contains the memory size, so devices without this ID are supported now by setting the size manually in Devicetree using the "size" property. Tested with FM25L16B and "size =3D <2048>;": at25 spi2.0: 2 KByte fm25 fram, pagesize 4096 According to Infineon/Cypress datasheets, these FRAMs have a device ID: FM25V01A FM25V02A FM25V05 FM25V10 FM25V20A FM25VN10 but these do not: FM25040B FM25640B FM25C160B FM25CL64B FM25L04B FM25L16B FM25W256 So all "FM25V*" FRAMs and only these have a device ID. The letter after "FM25" (V/C/L/W) only describes the voltage range, though. Link: https://lore.kernel.org/all/20250401133148.38330-1-m.heidelberg@cab.d= e/ Signed-off-by: Markus Heidelberg Reviewed-by: Alexander Sverdlin --- drivers/misc/eeprom/at25.c | 67 ++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 31 deletions(-) diff --git a/drivers/misc/eeprom/at25.c b/drivers/misc/eeprom/at25.c index 2d0492867054..c90150f72836 100644 --- a/drivers/misc/eeprom/at25.c +++ b/drivers/misc/eeprom/at25.c @@ -379,37 +379,49 @@ static int at25_fram_to_chip(struct device *dev, stru= ct spi_eeprom *chip) struct at25_data *at25 =3D container_of(chip, struct at25_data, chip); u8 sernum[FM25_SN_LEN]; u8 id[FM25_ID_LEN]; + u32 val; int i; =20 strscpy(chip->name, "fm25", sizeof(chip->name)); =20 - /* Get ID of chip */ - fm25_aux_read(at25, id, FM25_RDID, FM25_ID_LEN); - /* There are inside-out FRAM variations, detect them and reverse the ID b= ytes */ - if (id[6] =3D=3D 0x7f && id[2] =3D=3D 0xc2) - for (i =3D 0; i < ARRAY_SIZE(id) / 2; i++) { - u8 tmp =3D id[i]; - int j =3D ARRAY_SIZE(id) - i - 1; + if (!device_property_read_u32(dev, "size", &val)) { + chip->byte_len =3D val; + } else { + /* Get ID of chip */ + fm25_aux_read(at25, id, FM25_RDID, FM25_ID_LEN); + /* There are inside-out FRAM variations, detect them and reverse the ID = bytes */ + if (id[6] =3D=3D 0x7f && id[2] =3D=3D 0xc2) + for (i =3D 0; i < ARRAY_SIZE(id) / 2; i++) { + u8 tmp =3D id[i]; + int j =3D ARRAY_SIZE(id) - i - 1; + + id[i] =3D id[j]; + id[j] =3D tmp; + } + if (id[6] !=3D 0xc2) { + dev_err(dev, "Error: no Cypress FRAM (id %02x)\n", id[6]); + return -ENODEV; + } =20 - id[i] =3D id[j]; - id[j] =3D tmp; + switch (id[7]) { + case 0x21 ... 0x26: + chip->byte_len =3D BIT(id[7] - 0x21 + 4) * 1024; + break; + case 0x2a ... 0x30: + /* CY15B116QN ... CY15B116QN */ + chip->byte_len =3D BIT(((id[7] >> 1) & 0xf) + 13); + break; + default: + dev_err(dev, "Error: unsupported size (id %02x)\n", id[7]); + return -ENODEV; } - if (id[6] !=3D 0xc2) { - dev_err(dev, "Error: no Cypress FRAM (id %02x)\n", id[6]); - return -ENODEV; - } =20 - switch (id[7]) { - case 0x21 ... 0x26: - chip->byte_len =3D BIT(id[7] - 0x21 + 4) * 1024; - break; - case 0x2a ... 0x30: - /* CY15B116QN ... CY15B116QN */ - chip->byte_len =3D BIT(((id[7] >> 1) & 0xf) + 13); - break; - default: - dev_err(dev, "Error: unsupported size (id %02x)\n", id[7]); - return -ENODEV; + if (id[8]) { + fm25_aux_read(at25, sernum, FM25_RDSN, FM25_SN_LEN); + /* Swap byte order */ + for (i =3D 0; i < FM25_SN_LEN; i++) + at25->sernum[i] =3D sernum[FM25_SN_LEN - 1 - i]; + } } =20 if (chip->byte_len > 64 * 1024) @@ -417,13 +429,6 @@ static int at25_fram_to_chip(struct device *dev, struc= t spi_eeprom *chip) else chip->flags |=3D EE_ADDR2; =20 - if (id[8]) { - fm25_aux_read(at25, sernum, FM25_RDSN, FM25_SN_LEN); - /* Swap byte order */ - for (i =3D 0; i < FM25_SN_LEN; i++) - at25->sernum[i] =3D sernum[FM25_SN_LEN - 1 - i]; - } - chip->page_size =3D PAGE_SIZE; return 0; } --=20 2.43.0 From nobody Sat Oct 4 15:54:56 2025 Received: from mx08-007fc201.pphosted.com (mx08-007fc201.pphosted.com [91.207.212.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DAEEE2F39D8; Thu, 14 Aug 2025 11:43:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.207.212.40 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755171790; cv=none; b=p+W3dIYlG0a4fS39S/DuI4ZlY5ZNfZnJva0g4pGuX+Tr1XZi13vnQpFWp2ziXde1h4sMJYl0pssWBPZRJirGSaKUtIIpr/I8Qb+LDtcmJ+CXlSOhRGvgcyDo3aV72Invh/qn86+fOFIq4ToNfmGgQ6zF25vMnzm/+035Wra7FkA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755171790; c=relaxed/simple; bh=MPsbVqQ1BUP3yVgmL+E6RR4UbMs+l8z2Xhj9FN/RhTY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Nsy3kwq1YZrI7gAPm7G+jiJD9uIYT4vemhW/E3DEXVNDIy6rUOvBcQqZ5MfkYEvInZu9sw+qugGs1z9DpR5QH/BKB9Ilgn1BDHgJ77Kpkz0l2N1MeJLAaMV9Ffwb3cyWTCfWiIJwWzeIw2vi0lwQHIadCjHXMX6jwzPtH57Xo3g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=cab.de; spf=pass smtp.mailfrom=cab.de; dkim=pass (2048-bit key) header.d=cab.de header.i=@cab.de header.b=CtMVTgbN; arc=none smtp.client-ip=91.207.212.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=cab.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cab.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cab.de header.i=@cab.de header.b="CtMVTgbN" Received: from pps.filterd (m0456229.ppops.net [127.0.0.1]) by mx08-007fc201.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 57EAw6TT2274087; Thu, 14 Aug 2025 13:16:28 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cab.de; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pp-2025; bh=Ri sNjk6GkS+k71+3EtfCKvjlJdsfL2I8vNugJNfplWo=; b=CtMVTgbNAGkTaMKCiI 8F6YpmTcBaU2AW6ZCqlcWRV9mCt3hv98vPJb3AxheliL4Rp4m/ZrpvZxp87uApDO U3i0NT9PJ18IYWKtEYes7VFFw9can+FptQteROSyNmr9+zx/qGKiJL63x8zlMYXt /Pu3Nh0M2FLEhBd585irLT2Yvb8hBVr0RJ1Z+uTKwv7McppveW8YZj5PXFIVOnS+ I0ZpIH3hak3/IDGh0YI2yHNFHrKsdq3Y9HNzde9O6XeAvuuL8DuxuKO9zpI/ft0/ 6tDCkL6+xAsbpzTtEWg+xPmCNJ/NL9zF1BHpHM+02pkmcxybdL9ZW+2UH9cSw6ya Vm8Q== Received: from adranos.cab.de (adranos.cab.de [46.232.229.107]) by mx08-007fc201.pphosted.com (PPS) with ESMTPS id 48fqcpryv2-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Aug 2025 13:16:28 +0200 (MEST) Received: from KAN23-025.cab.de (10.100.0.18) by Adranos.cab.de (10.10.1.54) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.24; Thu, 14 Aug 2025 13:16:43 +0200 From: Markus Heidelberg To: Arnd Bergmann , Greg Kroah-Hartman , CC: Markus Heidelberg , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Christian Eggers , Alexander Sverdlin , Jiri Prchal , Subject: [PATCH 3/3] eeprom: at25: make FRAM device ID error message more precise Date: Thu, 14 Aug 2025 13:15:32 +0200 Message-ID: <20250814111546.617131-4-m.heidelberg@cab.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250814111546.617131-1-m.heidelberg@cab.de> References: <20250814111546.617131-1-m.heidelberg@cab.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: Adranos.cab.de (10.10.1.54) To Adranos.cab.de (10.10.1.54) X-Proofpoint-ORIG-GUID: tlkgeSqEmLwMhe9rMO4G6JAdvae55LTM X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwODE0MDA5MyBTYWx0ZWRfX0tqB4F4flIdg RuTrfeM4yD1BwgUGOKktQ0/FoGWk0hIrnr7qlBu8rol1srzRSZX4W+udKtkeyb0EhqXz0+QzX7Q KM/Bjejz0R7wDvK4Cn1XfBpA0MWVab03NEJRkbjhLKTKS/5NsqkokaGJoJrLSWnlbC/7DAzqznZ ws4Ljzcqn3p2NADRE1lwlF/tmyuEPs7dDyDgE13wKN0A5kqgjVRuiJifPiv4Gw+d7AOWusaq7CV qR31IxXgoGCXQXKELUuqN2ty8eVfRLImE8Bt/7mnYvkdtOW734Kxej1UqkjM1tRmOE9T/mirCMU Nqyojpox5LTF2vlJoYxXelMayKTAXfPV1PtcDqFJX4x9GswsRk6NEE/H+R8HP8= X-Authority-Analysis: v=2.4 cv=bctrUPPB c=1 sm=1 tr=0 ts=689dc58c cx=c_pps a=LmW7qmVeM6tFdl5svFU9Cg==:117 a=LmW7qmVeM6tFdl5svFU9Cg==:17 a=K2GD-7p5giEA:10 a=2OwXVqhp2XgA:10 a=VCfmM45KO3mYAKdcRPcA:9 X-Proofpoint-GUID: tlkgeSqEmLwMhe9rMO4G6JAdvae55LTM Content-Type: text/plain; charset="utf-8" The error description would be wrong in case the "size" Devicetree property is missing for an FRAM without device ID. Signed-off-by: Markus Heidelberg Reviewed-by: Alexander Sverdlin --- drivers/misc/eeprom/at25.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/eeprom/at25.c b/drivers/misc/eeprom/at25.c index c90150f72836..e2868f7bdb03 100644 --- a/drivers/misc/eeprom/at25.c +++ b/drivers/misc/eeprom/at25.c @@ -399,7 +399,7 @@ static int at25_fram_to_chip(struct device *dev, struct= spi_eeprom *chip) id[j] =3D tmp; } if (id[6] !=3D 0xc2) { - dev_err(dev, "Error: no Cypress FRAM (id %02x)\n", id[6]); + dev_err(dev, "Error: no Cypress FRAM with device ID (manufacturer ID ba= nk 7: %02x)\n", id[6]); return -ENODEV; } =20 --=20 2.43.0