From patchwork Wed Feb 20 04:57:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaishali Thakkar X-Patchwork-Id: 10821155 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D97E01399 for ; Wed, 20 Feb 2019 04:58:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4B0E2DE0F for ; Wed, 20 Feb 2019 04:58:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A3E222DE40; Wed, 20 Feb 2019 04:58:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 482612DE0F for ; Wed, 20 Feb 2019 04:58:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729805AbfBTE6E (ORCPT ); Tue, 19 Feb 2019 23:58:04 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:41756 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728871AbfBTE6E (ORCPT ); Tue, 19 Feb 2019 23:58:04 -0500 Received: by mail-pf1-f196.google.com with SMTP id d25so2952067pfn.8 for ; Tue, 19 Feb 2019 20:58:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=gTPZi45ZAAaKG7hCoM8NOE3/+aSCZy0SIwKgbcrQrcg=; b=V8/PVS+BmY+RYSxpCCKA7vGUOxr+YTi68f3ivtA2CeaWBW/45fgCPN+IF5MNYfvbEs IA4l2kz3cUVnS4W1fggitIBQTtEb5gAoagEZ1lVcqoDA1aKbbc37ccKRkB01MDmHf/0U Kn01AvKbLFl/3YsgP1vtVcf8ZMTEbfkJ+rRKM1AD4LLLitYF+Qlxx/1pRGco1XQu1nna eKV6ugTQ1qADLsPXs5YOZi+GJq54PMmrKDWxi0Q8ycF9VYkTpa6sQCis4gfQx3aH2zau sjMikD7WSvr+/TLpdOL/wSFAJbVFw0rBioa0DQs/AdTBsG2Xq7X6DgmJOCw/vNVmV8Wi Ib5g== 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=gTPZi45ZAAaKG7hCoM8NOE3/+aSCZy0SIwKgbcrQrcg=; b=cMMCe9l/Tiwvs8zV0RrRrMYajJRh0KErTL+62PfnQ1IbBBttZZBNMry0mUjaol57cI vXBKmpo7UIEX/PRRR3mkgnS62VoevxiuVwrO00yNEHHsAwscH3irlrMryGrdoSmCDYbr Npbf1zL+aFJk8SB2cHbS/cTQJMasZzU+TaK9hVJPT8c7YpfbHH8TDvJyR8Cv+pL4ZWgo dgGILAVKDHMuvn4nsUFrX2u+VUJtp4zk6AAwkwohZgk+k4WeGx8PxMgwJ7ZHizABFHVm Zd7oitz2W1ns7InWzPbus2FvXvGYXT9MjM6Yvmp1Npe2rQ0U8+NQRWAMcEw204tUMNDa Ztbg== X-Gm-Message-State: AHQUAubvTMD6EG4w7At9XDIQ7sO9LInzmG+c1+i3BKzb1Q+nESMl/Pzu UbbzP3AI7WayKwnxQtxGyrGTvg== X-Google-Smtp-Source: AHgI3IZOKJjbx4YMj+pM3INRSd10fua7UVyTPDDCfC698m/zGIRk9FzcAH3DlPGJWmhMp9d5XvSFGg== X-Received: by 2002:a63:575d:: with SMTP id h29mr12777302pgm.442.1550638683446; Tue, 19 Feb 2019 20:58:03 -0800 (PST) Received: from localhost.localdomain ([116.75.87.120]) by smtp.gmail.com with ESMTPSA id n85sm6590683pfj.177.2019.02.19.20.57.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Feb 2019 20:58:02 -0800 (PST) From: Vaishali Thakkar To: andy.gross@linaro.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 v2 0/5] soc: qcom: Add SoC info driver Date: Wed, 20 Feb 2019 10:27:55 +0530 Message-Id: <20190220045755.7293-1-vaishali.thakkar@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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.0-rc6. 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 Vaishali Thakkar (5): base: soc: Add serial_number attribute to soc soc: qcom: Add socinfo driver soc: qcom: socinfo: Expose custom attributes soc: qcom: socinfo: Expose image information base: soc: Export soc_device_register/unregister APIs 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 | 8 + drivers/soc/qcom/socinfo.c | 605 ++++++++++++++++++++ include/linux/sys_soc.h | 1 + 7 files changed, 639 insertions(+) create mode 100644 drivers/soc/qcom/socinfo.c