Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1458911pxf; Fri, 9 Apr 2021 08:55:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDQO7A6TLiNzM+pnfz6yxcsftJA1UdFhWGRolqDUeLYcWW5X3tGrtG2PtKFTS0+iGcWLqX X-Received: by 2002:a17:90a:474e:: with SMTP id y14mr14833062pjg.127.1617983735219; Fri, 09 Apr 2021 08:55:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617983735; cv=none; d=google.com; s=arc-20160816; b=eRr5+OYg+kAUN2lmwdiRbjW5hvek86dhTJTEqgjkN3YD3WGhh8eLenkp+EGRBBL4lC UAUQ7tq6Cha3jUFG4tONRtLnYl/5yPkXr3TjTcFYAYDM+kfFprteTakdyUYyxGpzyfWe i9LBAwcQPmbzdHvGBQnPiThNAxmP2CJ60SjfT34ANpOZdg7pe1gconOzJ8lr043uR1qs bJczMPi9/G4rMGXqPnlUO06FAkGuyIszeTraceWEnk3gpw9ZY5Lmt17+mWZU0CJyuvtC 9EcrdJUGqcDCMv71QgBYdRFWm8yxPvPVy0CWT8QEIexa7V1rq9Pqz3Bea7/URA+1AfpS haVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=/MOOmIiUYc/3Jgicb+YdrlZUzddeghvwGSaM5jKiozk=; b=SwWkScPDFLyuvdXGtODrEd+UqbCmGzqXWPilkFVWy4ixzzHBvcgXkicl2cMlsoe3yX VtkQBBPcyryP/+gzjyyYwnzsRIzegjVmpE8L4XWdKpwGyddP0WjG1RrKm5MwrFeQ9Zhk z+nYuuAjfkBz6gkL+y3xAV0X36zqkUASnHQJFNXHAl43juGU0L1yk1Oa9MIglHWI6wq4 o/ELVVbMIuEej25f8FdxeRacFWAhrZqJ3oiehGmMKP0VPCnLq9iH3GI8FQRPghNqrN8C y/+LQsOZIprtXlQrbBuGqXAd7iqQxK3rnIxJNWRnKyDPyA+Ynat16C/zcSqSwYhWkQ5G yCzg== ARC-Authentication-Results: i=1; mx.google.com; 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 bc4si2541112plb.360.2021.04.09.08.55.22; Fri, 09 Apr 2021 08:55:35 -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; 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 S233983AbhDIPyY (ORCPT + 99 others); Fri, 9 Apr 2021 11:54:24 -0400 Received: from router.aksignal.cz ([62.44.4.214]:36878 "EHLO router.aksignal.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233288AbhDIPyQ (ORCPT ); Fri, 9 Apr 2021 11:54:16 -0400 Received: from localhost (localhost [127.0.0.1]) by router.aksignal.cz (Postfix) with ESMTP id 002204120E; Fri, 9 Apr 2021 17:47:26 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at router.aksignal.cz Received: from router.aksignal.cz ([127.0.0.1]) by localhost (router.aksignal.cz [127.0.0.1]) (amavisd-new, port 10026) with LMTP id KWdKoq8o6wpL; Fri, 9 Apr 2021 17:47:25 +0200 (CEST) Received: from pc-gameroom.prchals.tk (unknown [83.240.30.185]) (Authenticated sender: jiri.prchal@aksignal.cz) by router.aksignal.cz (Postfix) with ESMTPSA id 1678D4120F; Fri, 9 Apr 2021 17:47:25 +0200 (CEST) From: Jiri Prchal To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Rob Herring , Christian Eggers , Jiri Prchal Subject: [PATCH 1/3] nvmem: add things for FRAM Date: Fri, 9 Apr 2021 17:47:18 +0200 Message-Id: <20210409154720.130902-2-jiri.prchal@aksignal.cz> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210409154720.130902-1-jiri.prchal@aksignal.cz> References: <20210409154720.130902-1-jiri.prchal@aksignal.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Added enum and string for FRAM to expose it as "fram". Signed-off-by: Jiri Prchal --- drivers/nvmem/core.c | 4 ++++ include/linux/nvmem-provider.h | 1 + 2 files changed, 5 insertions(+) diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index 177f5bf27c6d..01ef9a934b0a 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -180,6 +180,7 @@ static const char * const nvmem_type_str[] = { [NVMEM_TYPE_EEPROM] = "EEPROM", [NVMEM_TYPE_OTP] = "OTP", [NVMEM_TYPE_BATTERY_BACKED] = "Battery backed", + [NVMEM_TYPE_FRAM] = "FRAM", }; #ifdef CONFIG_DEBUG_LOCK_ALLOC @@ -359,6 +360,9 @@ static int nvmem_sysfs_setup_compat(struct nvmem_device *nvmem, if (!config->base_dev) return -EINVAL; + if (config->type == NVMEM_TYPE_FRAM) + bin_attr_nvmem_eeprom_compat.attr.name = "fram"; + nvmem->eeprom = bin_attr_nvmem_eeprom_compat; nvmem->eeprom.attr.mode = nvmem_bin_attr_get_umode(nvmem); nvmem->eeprom.size = nvmem->size; diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h index e162b757b6d5..890003565761 100644 --- a/include/linux/nvmem-provider.h +++ b/include/linux/nvmem-provider.h @@ -25,6 +25,7 @@ enum nvmem_type { NVMEM_TYPE_EEPROM, NVMEM_TYPE_OTP, NVMEM_TYPE_BATTERY_BACKED, + NVMEM_TYPE_FRAM, }; #define NVMEM_DEVID_NONE (-1) -- 2.25.1