mbox series

[v6,0/5] soc: qcom: Add SoC info driver

Message ID 20190723223515.27839-1-vaishali.thakkar@linaro.org
Headers show
Series soc: qcom: Add SoC info driver | expand

Message

Vaishali Thakkar July 23, 2019, 10:35 p.m. UTC
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

Comments

Vinod Koul July 24, 2019, 4:26 a.m. UTC | #1
On 24-07-19, 04:05, Vaishali Thakkar wrote:
> From: Bjorn Andersson <bjorn.andersson@linaro.org>

> 

> Add new attribute named "serial_number" as a standard interface for

> user space to acquire the serial number of the device.

> 

> For ST-Ericsson SoCs this is exposed by the cryptically named "soc_id"

> attribute, but this provides a human readable standardized name for this

> property.


Reviewed-by: Vinod Koul <vkoul@kernel.org>


-- 
~Vinod
Vinod Koul July 24, 2019, 4:27 a.m. UTC | #2
On 24-07-19, 04:05, Vaishali Thakkar wrote:
> The Qualcomm socinfo provides a number of additional attributes,

> add these to the socinfo driver and expose them via debugfs

> functionality.


Reviewed-by: Vinod Koul <vkoul@kernel.org>


-- 
~Vinod
Vinod Koul July 24, 2019, 4:28 a.m. UTC | #3
On 24-07-19, 04:05, Vaishali Thakkar wrote:
> 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.


And on v5.3-rc1 :) and I have tested this on db845c, seems to work fine
for me

Tested-by: Vinod Koul <vkoul@kernel.org>


-- 
~Vinod