Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8990533ybi; Tue, 23 Jul 2019 19:35:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqzK8S2tPc1yF/JFoUjzPnYoGtYCq4eWT2Y7/JYlOQ0bav7kgIDwL9c7RB8YZ9kKYNB48I3s X-Received: by 2002:a17:902:1004:: with SMTP id b4mr84789844pla.325.1563935721688; Tue, 23 Jul 2019 19:35:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563935721; cv=none; d=google.com; s=arc-20160816; b=MuImS7XEIoFKa+JBbh6hN3PGFsrcVzglcePPalwsvFptyXZ6cwH94Uy/d14DNDvuC5 w/GqMwj0suDcq8NJUjikQDwEP9fm0ZnjItUuPRcbJGcTqt9GZgYfRLxyyilRgBiRPDVe K99ek6kHrgor4rB4TqPv0B1DFrLoT46DxPXKRSsRDbNQpP2bAxiCuJ0z71UrUVJDfTHb V5heXpk+VjAIY01g8CXdw4aRSxmN7H/39w5eexnnz0EFlvnu3oYUqxMkzZB0/lCdV7nV YVVb0of2/0s8dzPWFN6twvZbiXwoXJsrK02DWFslGrz8ZanN7J+w/3lEMwb0Qf5ZUP1A vABg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=BaDjXD/RG0kyUThXx34ExLwb9nVm9t9Qz5HyHcuaCuk=; b=ryVzSDTJMq890WdXJFpFk0LFQkBhhDSdclKpreIbotETH2wWAZTEEuKwNfyo8XRpGM VwJE9Z+gywZzDqisxv8pbWH+a7TqyK+5x4DbnhLGBx2INqJ7Jqt5DcAOTcK1lP9Zb0O7 xqEl2wxKpfF4y4z1xSY/mde20Z9OZRlFxqYipgVU909h9W8TKaH5dOHbxk8m4iYmY6WF WYnWu3QXMCLjBydkOg3GPWb2iS8CX4zahB1MaF/GNxsq1l0suNmhvxTMGd/6ueh3lPIj ZamutGWFJDBttALIV3BBEzCITq1vtufjnJyC5biI193hMVqf549ZEw/9aHhwJAzFWQYf RaGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XU4E26h8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id q15si12560230pgt.150.2019.07.23.19.35.06; Tue, 23 Jul 2019 19:35:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XU4E26h8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S2387842AbfGWWfX (ORCPT + 99 others); Tue, 23 Jul 2019 18:35:23 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:44032 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727761AbfGWWfX (ORCPT ); Tue, 23 Jul 2019 18:35:23 -0400 Received: by mail-pf1-f196.google.com with SMTP id t16so19821657pfe.11 for ; Tue, 23 Jul 2019 15:35:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=BaDjXD/RG0kyUThXx34ExLwb9nVm9t9Qz5HyHcuaCuk=; b=XU4E26h8825oOZUQmz4kbSqxedrUdNsyKDmDiQsMbLg6pw7auVMAtsRu03LejgQ56J tFpYlWDrQVv0NOtgBqFxgxvRvP39mlEoLRwpVpH189VNdu4MA2CRblZW4bAkICmxxU8d cTlOGMH36GlIZnkAjRuNg24F93lggpVYRdewrczApUM1I3GqDS5Dxfv4lcBjDr7QgGwi 4NWeC+mw9uxYNS+A+nyG3Qew8V2SQkjbg9nepj4Vfehg7MAnHAC2zLPrfPwOSe9X9rlR FZj/k25TgdO7Wa96kn7IMSyfu+nk1xDn8osBlF/nbPOJ76Ua87y/ZsSsBmwOIhUr8G0H 1tUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BaDjXD/RG0kyUThXx34ExLwb9nVm9t9Qz5HyHcuaCuk=; b=pEDZhtdj+Lyj2V9B4P3m00GrAWEifPqQTt94j5B/4a99+eD7+jrNjsfaURHatFE3CW XFh6YMZnzK8nhc4qOkqb5t2z9ckWDvNUtg3/yFS1igTjY+D0LKSshIDYX4uc1Hm+3V59 ypLqqzIDWA49roYTIB4pqXc6sgdBeZYrP6wKV/vZTHu5Vs7b0JIs/tTIcbxz9khRo8Wc uaWd+b6tmYXwW1EladaOgvjDt8KKV/rHH5/3mkXWDFs2itus4QYhlgc1CcamN7nCZEIw CENUg39qIadYG/AIAQJYSzb/QASe2ehDERg510EE5KwyNO32lsxbpaufkmcAls+I4WV+ kEuA== X-Gm-Message-State: APjAAAWi07kabuoE+1FmxPSFpDLzv/Jf9yi77z4FWVYJJzdT2Zkei9EG ZatNFXCYJEcMlhqQRnxXkWwUhA== X-Received: by 2002:a17:90a:970a:: with SMTP id x10mr85475018pjo.12.1563921322290; Tue, 23 Jul 2019 15:35:22 -0700 (PDT) Received: from localhost.localdomain ([115.99.187.56]) by smtp.gmail.com with ESMTPSA id h16sm49036917pfo.34.2019.07.23.15.35.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jul 2019 15:35:21 -0700 (PDT) From: Vaishali Thakkar To: agross@kernel.org Cc: david.brown@linaro.org, gregkh@linuxfoundation.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, rafael@kernel.org, bjorn.andersson@linaro.org, vkoul@kernel.org, Vaishali Thakkar Subject: [PATCH v6 0/5] soc: qcom: Add SoC info driver Date: Wed, 24 Jul 2019 04:05:10 +0530 Message-Id: <20190723223515.27839-1-vaishali.thakkar@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset adds SoC info driver which can provide information such as Chip ID, Chip family and serial number about Qualcomm SoCs to user space via sysfs. Furthermore, it allows userspace to get information about custom attributes and various image version information via debugfs. The patchset cleanly applies on top of v5.2-rc7. Changes since v1: - Align ifdefs to left, remove unnecessary debugfs dir creation check and fix function signatures in patch 3 - Fix comment for teh case when serial number is not available in patch 1 Changes since v2: - Reorder patches [patch five -> patch two] Changes since v3: - Add reviewed-bys from Greg - Fix build warning when debugfs is disabled - Remove extra checks for dir creations in patch 5 Changes since v4: - Added Reviewed-bys in multiple patches - Bunch of nitpick fixes in patch 3 - Major refactoring for using core debugfs functions and eliminating duplicate code in patch 4 and 5 [detailed info can be found under --- in each patch] Changes since v5: - No code changes, fix diff.context setting for formatting patches. Version 4 was adding context at the bottom of the file with 'git am'. Vaishali Thakkar (5): base: soc: Add serial_number attribute to soc base: soc: Export soc_device_register/unregister APIs soc: qcom: Add socinfo driver soc: qcom: socinfo: Expose custom attributes soc: qcom: socinfo: Expose image information Documentation/ABI/testing/sysfs-devices-soc | 7 + drivers/base/soc.c | 9 + drivers/soc/qcom/Kconfig | 8 + drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/smem.c | 9 + drivers/soc/qcom/socinfo.c | 468 ++++++++++++++++++++ include/linux/sys_soc.h | 1 + 7 files changed, 503 insertions(+) create mode 100644 drivers/soc/qcom/socinfo.c -- 2.17.1