From patchwork Thu Sep 12 09:10:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 173684 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp1854020ilq; Thu, 12 Sep 2019 02:10:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqwUHnD/uMsdSUImyj7V3NVBKmGaCeV3KjiHGuRT9KgcESsnV2r3PZcRNwF6+wZcgCq7MXVR X-Received: by 2002:aa7:d607:: with SMTP id c7mr41534070edr.286.1568279436573; Thu, 12 Sep 2019 02:10:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568279436; cv=none; d=google.com; s=arc-20160816; b=ESNNT3UthV+QmFD6ERDtzfXtepYZ69DECpuWip3f4PZjAVDD8Mouaf9C2w/LetiUGE p010cT4gQICcT4FKq7tPj+Erzt5/QoDmRqm5m3RsGx2toh0/k8OAWt9RMAtYntLGYt9O 7qOPQkvFlaqeBbXjsRAFZhkJtmgQizJbznCPjlpnQxvwYT1l02bg04cyCWTJHJMMjDPR qNN3Dw4J4YBKl62/vJc6NTNU/oN7dOarzOHBag3aeJeY0uXdLZHrHerRgrcpnQm2OA5u wKrY41Rpn/u1MMcr1KhuP/g0y7ZKdU5Cp2XtswfcadCzKy82zZZ1rfZhyOXyFRZAK1su 6vWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Kn+E+YIgEzAwFw6LDS2rhCIDFOekAT5wUT4i1H5I0jU=; b=r6TsV/pOhbUtil5M4yFdtBHHkL8Vo0DBcxOWq8FNX5e/Ot1lREaqDyTT2qsm/U2RlX LYvDirorkKwsIfagbONnk7ff+NPHM0LS/1yJEN1VoLKEnQs32GaTmLmA6X3IRh0kJZFf csrph2cRAiTAM3vZzrVPl+IYY9xmABoxMgE1Q4z31VWKiPzThcxySopqvLhbWjVNV+0E zhMMghJ2NdaiV1PcEtQnSDxGN5Ptmi61eKXc3Ww2RaoHiEE+qaVY89BK9F2qWWBBTibe zjyWR8LYjyODVn948Q3BBy8CnKGBjk2ZCAXGJ61mPxFfzv0P6+fi8IjUhy7Py0ea/F5T 09Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NNhVc4+z; 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 f30si14666797ede.435.2019.09.12.02.10.36; Thu, 12 Sep 2019 02:10:36 -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=NNhVc4+z; 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 S1730527AbfILJKf (ORCPT + 27 others); Thu, 12 Sep 2019 05:10:35 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:45280 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730352AbfILJKf (ORCPT ); Thu, 12 Sep 2019 05:10:35 -0400 Received: by mail-wr1-f66.google.com with SMTP id l16so27492282wrv.12 for ; Thu, 12 Sep 2019 02:10:33 -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:mime-version :content-transfer-encoding; bh=Kn+E+YIgEzAwFw6LDS2rhCIDFOekAT5wUT4i1H5I0jU=; b=NNhVc4+zFj9YKvx2J6B6qN5MzAdlKTHdqGtnT1NG2nSB64+n6K54DSSyyJ1PJh9i/t qgkPmm4Dlocu4Q/kXKmEIw9CaUlN5pPj98lv2NtfOJhCNcb+PkL0GgB/GKKO0QSw/+m+ ux6wA5JnTs0LrWB6mrNFN3GqKdB1O84PQKPIWjCJYmZbzCArKd7pUDbaXCyg+jSqBr79 N0wkh4/lWNPUEBwjexjQerMxu2ukNFPI+TvGscxO+htoGSCzDoXTO9VaYS1ojZpLEdKJ cVaf++Kr4np3A/owArrlJYElzS2drX/Ly7W1aOm2P2sZPmmXNknjygzmHeWNUuAqrDnL ovow== 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:mime-version :content-transfer-encoding; bh=Kn+E+YIgEzAwFw6LDS2rhCIDFOekAT5wUT4i1H5I0jU=; b=O/zrYK0nSTYyhHARdnm3bx0/o8RngaH0AId7Rha0U2IKEFbumTbZztJXHkh29abiMC QlNdIx/u5IQLZ5lD+7om8jnTMFTEkE3jaAGoxBYEwgh7DbaCQ6p3SHIieNIPlzO3F8Xb 7KXbG7jI7+uNa4FdD1eYeOU0nIq+zgz8a1ShmNH2iibPy2KfzmJw+Zr9p8K5ZZVH/Cs2 5eIBHlPy4UntCVBW9erLEfqri+XfSzJvtppmxw3grIpJomqBZ9mdIasyX7qsPpG8cZdk YkFOiQxFf3W3sAAoN90KGgiv0r3+n2xHtns+hEuNb/2gBc7chxCNuYdjDd0txeJz2mHR d9Ew== X-Gm-Message-State: APjAAAWR5WnFjZZ2V0LiVumDH8yqhZS4UCirqc0d2eHIs3KRf8LDoKhe Y4287hlEMRiBTb40ibVJPxnk3g== X-Received: by 2002:adf:ea0c:: with SMTP id q12mr1903410wrm.172.1568279433093; Thu, 12 Sep 2019 02:10:33 -0700 (PDT) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id y14sm39377181wrd.84.2019.09.12.02.10.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2019 02:10:32 -0700 (PDT) From: Srinivas Kandagatla To: andy.gross@linaro.org, bjorn.andersson@linaro.org Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH] soc: qcom: socinfo: add missing soc_id sysfs entry Date: Thu, 12 Sep 2019 10:10:19 +0100 Message-Id: <20190912091019.5334-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org looks like SoC ID is not exported to sysfs for some reason. This patch adds it! This is mostly used by userspace libraries like SNPE. Signed-off-by: Srinivas Kandagatla --- drivers/soc/qcom/socinfo.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.21.0 diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c index 8dc86a74559b..876a3f6612a3 100644 --- a/drivers/soc/qcom/socinfo.c +++ b/drivers/soc/qcom/socinfo.c @@ -422,6 +422,8 @@ static int qcom_socinfo_probe(struct platform_device *pdev) qs->attr.family = "Snapdragon"; qs->attr.machine = socinfo_machine(&pdev->dev, le32_to_cpu(info->id)); + qs->attr.soc_id = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%u", + le32_to_cpu(info->id)); qs->attr.revision = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%u.%u", SOCINFO_MAJOR(le32_to_cpu(info->ver)), SOCINFO_MINOR(le32_to_cpu(info->ver)));